Home > database >  What does "mvn install -D" do? And errors related
What does "mvn install -D" do? And errors related

Time:11-29

I'm in trouble with maven projects inerithed.

The projects should be built with:

mvn install -D module

and/or

mvn intall -D config

I've no more precise info about how to built the projects but these are the knowledge transfered.

If i try to build the project with "mvn install -D module" the output is:

[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

while if I try to build the project with "mvn intall -D config" then the output is:

[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

Then in both cases the build fails.

Looking at the output of "mvn install -D module", the Plugin org.codehaus.mojo:gwt-maven-plugin:2.7.0 is in the right path of local maven repository but it fails anyway.

Looking at the output of "mvn install -D config" instead, seems that something is missing.

Someone know how these options works?

I have also missing artifacts errors in pom.xml also if the plugin are in the right path of local maven repository:

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

Someone know how I can remove these errors?

Eclipse is Oxygen. Java version is 1.8 on OS. JDK compliance is 1.7. Installed JRE is 1.7.

CodePudding user response:

I've updated jdk to 1.8 and a lot of errors in the code disappear.

After that i have built the project with these results:

mvn install -Dmodule

    [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

or

mvn clean install

    [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

So the ouput is the same and has in common the following error:

    [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]

All the dependencies are in the local maven repository so Why this error rise?

CodePudding user response:

I've found this that works. In details these command unlock the dependecies issue:

  • Run command mvn eclipse:clean
  • Run command mvn eclipse:eclipse

Of course now there are other issue but the previous disappear.

Eclipse console error

Of course the plugin is in the repo, so why this error?

  • Related