mvn安装工件ID丢失了吗?

时间:2014-04-29 11:28:44

标签: maven jar

您好我正在尝试使用以下方法在我的本地.m2 mvn存储库中手动安装jar库:

mvn install:install-file -Dfile=/Users/me/sdk.jar -DgroupId=com.jr.android.sdk \ -DartifactId=sdk -Dversion=1.0 -Dpackaging=jar

不起作用。我收到以下错误:

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.993 s
[INFO] Finished at: 2014-04-29T12:24:36+00:00
[INFO] Final Memory: 6M/81M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-install-plugin:2.4:install-file (default-cli) on project sdk The artifact information is incomplete or not valid:
[ERROR] [0]  'artifactId' is missing.
[ERROR] -> [Help 1]

1 个答案:

答案 0 :(得分:0)

删除反斜杠并修复它。

maven示例中出现反斜杠:http://maven.apache.org/guides/mini/guide-3rd-party-jars-local.html