我使用的命令(根据maven的官方教程:maven):
mvn install:install-file -Dfile=algs4-1.0.4.jar -DgroupID=edu.princeton.cs -DartifactID=algs4 -Dversion=1.0.4 -Dpackaging=jar
缺少告诉groupID
和artifactID
的错误信息,因此我尝试修改命令:
mvn install:install-file -Dfile=algs4-1.0.4.jar -groupID=edu.princeton.cs -artifactID=algs4 -Dversion=1.0.4 -Dpackaging=jar
你知道,那更糟。
我还在这里尝试一些答案,但它们也不起作用。
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------< org.apache.maven:standalone-pom >-------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] --------------------------------[ pom ]---------------------------------
[INFO]
[INFO] --- maven-install-plugin:2.4:install-file (default-cli) @ standalone-pom ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.460 s
[INFO] Finished at: 2019-04-09T00:23:39+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-install-plugin:2.4:install-file (default-cli) on project standalone-pom: The artifact information is incomplete or not valid:
[ERROR] [0] 'groupId' is missing.
[ERROR] [1] 'artifactId' is missing.
[ERROR]
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
答案 0 :(得分:0)
您将groupId
和artifactId
拼错为groupID
和artifactID
。