我和Maven公司有麻烦了。
这些项目的建造应具备:
mvn install -D module
及/或
mvn intall -D config
我没有更多的关于如何建立项目的精确信息,但这些都是知识转移。
如果我尝试使用“mvn install -D module”构建项目,则输出为:
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for it.eng.auriga:AurigaWeb:war:1.0.5-AMA-WAVE2-SNAPSHOT
[WARNING] 'build.plugins.plugin.(groupId:artifactId)' must be unique but found duplicate declaration of plugin org.apache.maven.plugins:maven-dependency-plugin @ line 1119, column 12
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building AurigaWeb 1.0.5-AMA-WAVE2-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] Downloading: https://repo.maven.apache.org/maven2/org/codehaus/mojo/gwt-maven-plugin/2.7.0/gwt-maven-plugin-2.7.0.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.079 s
[INFO] Finished at: 2022-11-26T13:14:13+01:00
[INFO] Final Memory: 10M/153M
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin org.codehaus.mojo:gwt-maven-plugin:2.7.0 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.codehaus.mojo:gwt-maven-plugin:jar:2.7.0: Could not transfer artifact org.codehaus.mojo:gwt-maven-plugin:pom:2.7.0 from/to central (https://repo.maven.apache.org/maven2): Received fatal alert: protocol_version -> [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/PluginResolutionException
而如果我尝试使用“mvn intall -D config”构建项目,则输出为:
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for it.eng.auriga:AurigaWeb:war:1.0.5-AMA-WAVE2-SNAPSHOT
[WARNING] 'build.plugins.plugin.(groupId:artifactId)' must be unique but found duplicate declaration of plugin org.apache.maven.plugins:maven-dependency-plugin @ line 1119, column 12
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building AurigaWeb 1.0.5-AMA-WAVE2-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.105 s
[INFO] Finished at: 2022-11-26T13:19:43+01:00
[INFO] Final Memory: 5M/121M
[INFO] ------------------------------------------------------------------------
[ERROR] Unknown lifecycle phase "intall". You must specify a valid lifecycle phase or a goal in the format <plugin-prefix>:<goal> or <plugin-group-id>:<plugin-artifact-id>[:<plugin-version>]:<goal>. Available lifecycle phases are: validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy, pre-clean, clean, post-clean, pre-site, site, post-site, site-deploy. -> [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/LifecyclePhaseNotFoundException
那么在这两种情况下,构建都会失败。
查看“mvn install -D module”的输出,插件org.codehaus.mojo:gwt-maven-plugin:2.7.0在本地maven库的正确路径中,但它还是失败了。
查看“mvn install -D config”的输出,似乎缺少了一些东西。
有人知道这些选项是如何工作的吗?
如果插件在本地maven存储库的正确路径中,我也会在pom.xml中出现缺少工件的错误:
Missing artifact com.isomorphic.smartgwt.lgpl:smartgwt-skins:jar:12.0-p20190920
Missing artifact it.eng.utility:SezioneCache:jar:1.0.3
Missing artifact javax.media:jai-core:jar:1.1.3
有人知道我如何才能消除这些错误吗?
Eclipse是Oxygen。操作系统上的Java版本是1.8。JDK兼容性是1.7。安装的JRE是1.7。
1条答案
按热度按时间szqfcxe21#
我已经更新了jdk到1.8,代码中的很多错误都消失了。
之后,我已经建立了项目与这些结果:
mvn安装-D模块
或
mvn全新安装
因此,输出相同,并具有以下共同错误:
所有的依赖项都在本地maven存储库中,所以为什么会出现此错误?