我创建了自己的jar文件,并通过运行将其包含在我的项目中:
mvn install:install-file -Dfile=/Users/vladioffe/git/evappcom/evappcom/evapcom-1.0.jar -DgroupId=com.evapp.code -DartifactId=evappcom -Dversion={1.0} -Dpackaging=jar
构建成功 - 这是输出:
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building EvApp_Server 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-install-plugin:2.3.1:install-file (default-cli) @ EvApp_Server ---
[INFO] Installing /Users/vladioffe/git/evappcom/evappcom/evappcom-1.0.jar to /Users/vladioffe/.m2/repository/com/evapp/code/evappcom/{1.0}/evappcom-{1.0}.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.557s
[INFO] Finished at: Tue Jan 21 14:46:32 IST 2014
[INFO] Final Memory: 3M/81M
[INFO] ------------------------------------------------------------------------
当我将依赖项添加到pom文件时遇到错误,这里是依赖项:
<dependency>
<groupId>com.evapp.code</groupId>
<artifactId>evappcom</artifactId>
<version>1.0</version>
</dependency>
我在<dependency>
标记附近看到的错误是:
Missing artifact com.evapp.code:evappcom:jar:
1.0
我试图:
谢谢!
答案 0 :(得分:4)
版本不应放在括号中:
-Dversion={1.0} // it must be -Dversion=1.0