我是节点的新手,在任何"适当"的环境中开发.我为我当前的项目安装了gulp,以及mocha和其他一些模块.这是我的gulpfile.js:
var gulp = require('gulp');
var mocha = require('gulp-mocha');
var eslint = require('gulp-eslint');
gulp.task('lint', function () {
return gulp.src(['js/**/*.js'])
// eslint() attaches the lint output to the eslint property
// of the file object so it can be used by other modules.
.pipe(eslint())
// eslint.format() outputs the lint results to the console.
// Alternatively use eslint.formatEach() (see Docs).
.pipe(eslint.format())
// To have the process exit with an error code (1) on
// lint error, return the stream and pipe to …Run Code Online (Sandbox Code Playgroud) 在过去的几个小时里,我一直试图解决这个问题而且我无处可去.我刚刚安装了Maven for Eclipse插件(M2E,我认为)以及maven,mvn.我创建了一个非常简单的Hello World项目,并尝试使用以下命令运行构建的jar:java -jar pimidi-0.0.1-SNAPSHOT.jar
无论我尝试什么,我总是得到相同的错误:没有主要的清单属性,在目标/ pimidi-0.0.1-SNAPSHOT.jar
这是我的pom.xml:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.dan</groupId>
<artifactId>pimidi</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>pimidi</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
<configuration>
<wtpversion>1.5</wtpversion>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.4</version>
<configuration>
<archive>
<manifest>
<mainClass>com.dan.pimidi.App</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
</plugins>
</build>
Run Code Online (Sandbox Code Playgroud)
我已经在POM的清单节点(类路径,清单位置),不同的插件(汇编,编译等)中尝试了无数不同的选项,但无济于事.在查看Eclipse中的有效POM时,我可以看到maven-jar-plugin已经包含在更高级别的POM中,对项目POM的任何更改都被省略.
有没有人对如何使这个工作有任何想法?如果这个问题缺乏细节,我会道歉 - 我今晚的精神力已经过期了.任何帮助将不胜感激!
我想将以下命令放入我的~/.bash_aliases文件中:
grep screen /var/log/auth.log|grep "$(date|awk '{print $2" "$3}')"
Run Code Online (Sandbox Code Playgroud)
我尝试将以下内容放入别名文件中:
alias unlocks=grep screen /var/log/auth.log|grep "$(date|awk '{print $2" "$3}')"
Run Code Online (Sandbox Code Playgroud)
但我得到以下信息:
bash:别名:屏幕:未找到
bash:别名:/var/log/auth.log:找不到
据推测,这是因为命令字符串中存在空格,通常可以通过引用整个字符串来解决,但我已经使用了两种类型的引号,并且无法弄清楚如何正确转义它们。
请问有人可以帮忙吗?