java “mvn install -D”有什么作用?以及相关错误

laximzn5  于 2022-11-27  发布在  Java
关注(0)|答案(1)|浏览(134)

我和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。

szqfcxe2

szqfcxe21#

我已经更新了jdk到1.8,代码中的很多错误都消失了。
之后,我已经建立了项目与这些结果:
mvn安装-D模块

[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] ------------------------------------------------------------------------
    [WARNING] The POM for com.isomorphic.smartgwt.lgpl:smartgwt-lgpl:jar:12.0-p20190920 is missing, no dependency information available
    [WARNING] The POM for fr.opensagres.xdocreport:org.apache.poi.xwpf.converter.pdf:jar:1.0.6 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
    [WARNING] The POM for fr.opensagres.xdocreport:org.apache.poi.xwpf.converter.core:jar:1.0.6 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
    [WARNING] The POM for fr.opensagres.xdocreport:fr.opensagres.xdocreport.itext.extension:jar:1.0.6 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
    [WARNING] The POM for com.isomorphic.smartgwt.lgpl:smartgwt-skins:jar:12.0-p20190920 is missing, no dependency information available
    [WARNING] The POM for commons-net:commons-net:jar:3.6-20160718.114624-7 is missing, no dependency information available
    [WARNING] The POM for org.semanticdesktop.aperture:aperture-mime-identifier-magic:jar:1.4.0 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
    [WARNING] The POM for org.semanticdesktop.aperture:aperture-mime-identifier-core:jar:1.4.0 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
    [WARNING] The POM for org.semanticdesktop.aperture:aperture-util:jar:1.4.0 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
    [WARNING] The POM for javax.media:jai-core:jar:1.1.3 is missing, no dependency information available
    [WARNING] The POM for org.eclipse.osgi.services_3.4.0.v20140312:org.eclipse.osgi.services_3.4.0.v20140312:jar:2051 is missing, no dependency information available
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD FAILURE
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 2.509 s
    [INFO] Finished at: 2022-11-26T17:45:15+01:00
    [INFO] Final Memory: 16M/222M
    [INFO] ------------------------------------------------------------------------
    [ERROR] Failed to execute goal on project AurigaWeb: Could not resolve dependencies for project it.eng.auriga:AurigaWeb:war:1.0.5-AMA-WAVE2-SNAPSHOT: The following artifacts could not be resolved: com.isomorphic.smartgwt.lgpl:smartgwt-skins:jar:12.0-p20190920, it.eng.utility:SezioneCache:jar:1.0.3, javax.media:jai-core:jar:1.1.3: Failure to find com.isomorphic.smartgwt.lgpl:smartgwt-skins:jar:12.0-p20190920 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [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/DependencyResolutionException


mvn全新安装

[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] ------------------------------------------------------------------------
    [WARNING] The POM for com.isomorphic.smartgwt.lgpl:smartgwt-lgpl:jar:12.0-p20190920 is missing, no dependency information available
    [WARNING] The POM for fr.opensagres.xdocreport:org.apache.poi.xwpf.converter.pdf:jar:1.0.6 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
    [WARNING] The POM for fr.opensagres.xdocreport:org.apache.poi.xwpf.converter.core:jar:1.0.6 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
    [WARNING] The POM for fr.opensagres.xdocreport:fr.opensagres.xdocreport.itext.extension:jar:1.0.6 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
    [WARNING] The POM for com.isomorphic.smartgwt.lgpl:smartgwt-skins:jar:12.0-p20190920 is missing, no dependency information available
    [WARNING] The POM for commons-net:commons-net:jar:3.6-20160718.114624-7 is missing, no dependency information available
    [WARNING] The POM for org.semanticdesktop.aperture:aperture-mime-identifier-magic:jar:1.4.0 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
    [WARNING] The POM for org.semanticdesktop.aperture:aperture-mime-identifier-core:jar:1.4.0 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
    [WARNING] The POM for org.semanticdesktop.aperture:aperture-util:jar:1.4.0 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
    [WARNING] The POM for javax.media:jai-core:jar:1.1.3 is missing, no dependency information available
    [WARNING] The POM for org.eclipse.osgi.services_3.4.0.v20140312:org.eclipse.osgi.services_3.4.0.v20140312:jar:2051 is missing, no dependency information available
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD FAILURE
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 2.003 s
    [INFO] Finished at: 2022-11-26T17:46:06+01:00
    [INFO] Final Memory: 16M/222M
    [INFO] ------------------------------------------------------------------------
    [ERROR] Failed to execute goal on project AurigaWeb: Could not resolve dependencies for project it.eng.auriga:AurigaWeb:war:1.0.5-AMA-WAVE2-SNAPSHOT: The following artifacts could not be resolved: com.isomorphic.smartgwt.lgpl:smartgwt-skins:jar:12.0-p20190920, it.eng.utility:SezioneCache:jar:1.0.3, javax.media:jai-core:jar:1.1.3: Failure to find com.isomorphic.smartgwt.lgpl:smartgwt-skins:jar:12.0-p20190920 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [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/DependencyResolutionException

因此,输出相同,并具有以下共同错误:

[ERROR] Failed to execute goal on project AurigaWeb: Could not resolve dependencies for project it.eng.auriga:AurigaWeb:war:1.0.5-AMA-WAVE2-SNAPSHOT: The following artifacts could not be resolved: com.isomorphic.smartgwt.lgpl:smartgwt-skins:jar:12.0-p20190920, it.eng.utility:SezioneCache:jar:1.0.3, javax.media:jai-core:jar:1.1.3: Failure to find com.isomorphic.smartgwt.lgpl:smartgwt-skins:jar:12.0-p20190920 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [Help 1]

所有的依赖项都在本地maven存储库中,所以为什么会出现此错误?

相关问题