0

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.

MWiesner
  • 8,868
  • 11
  • 36
  • 70
giasqui
  • 3
  • 4
  • In the second one you misspelled `install` as `intall` – greg-449 Nov 26 '22 at 12:45
  • 1
    The option `-D` defines properties which I doubt is correct. If that's really the need you should remove the space between `module` and `-D` like this: `mvn -Dmodule install`? – khmarbaise Nov 26 '22 at 12:45
  • 1
    Also I've seen `rg/maven2): Received fatal alert: protocol_version` that looks like you are using JDK7 where you need to define `-Dhttps.protocols=TLSv1.3` because central only allows TLSv1.3 apart from that I strongly recommend to upgrade your JDK version... and use `--release`option to produce JDK 7 compatible code. Also your Eclipse version really out of date...Also there are a number of maven plugins in the meantime which require JDK8 at minimum... (even JDK8 is of 2014!) – khmarbaise Nov 26 '22 at 12:56
  • Yes @greg-449, my mistake. Of course is install. – giasqui Nov 26 '22 at 14:24
  • @khmarbaise the output of "mvn -Dmodule install" is the same. Always the same error. Moreover, I've rollback eclipse from 2020-06 to oxygen and jdk from 17 to 1.8 and at least to 1.7 in order to resolve a lot of error. The source code is too old and I think that it was written with 1.7. Anyway I will try again with eclipse 2020-06 and jdk1.8. – giasqui Nov 26 '22 at 14:26
  • Do you possibly mean 'mvn install -P module' or 'mvn install -P config'? '-P' stands for Maven Profile. – Michael Katt Nov 26 '22 at 16:16
  • @MichaelKatt I've tested it but in both cases the output is: "[WARNING] The requested profile "module" could not be activated because it does not exist." or "[WARNING] The requested profile "config" could not be activated because it does not exist." and then [ERROR]. – giasqui Nov 26 '22 at 16:48

2 Answers2

0

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?

giasqui
  • 3
  • 4
  • Use -U option to force update. Sometimes you have to delete any *-not-available files in your local maven repository of earlier attempts before the desired artifacts will be downloaded. As alternative you could delete your whole local maven repository. – Michael Katt Nov 26 '22 at 17:59
  • @MichaelKatt also with the options -U the error persist: "[[1;31mERROR[m] Failed to execute goal on project [36mAurigaWeb[m: [1;31mCould 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, javax.media:jai-core:jar:1.1.3, it.eng.utility:SezioneCache:jar:1.0.3: Could not find artifact com.isomorphic.smartgwt.lgpl:smartgwt-skins:jar:12.0-p20190920 in central (https://repo.maven.apache.org/maven2)[m -> [1m[Help 1][m" – giasqui Nov 28 '22 at 09:48
  • are you using any proxy in your maven settings.xml? Or VPN? – Michael Katt Nov 28 '22 at 11:54
  • No @MichaelKatt. This is my settings.xml: C:\Users\GSQUICCIMARRO\.m2\repository – giasqui Nov 28 '22 at 20:58
0

Looking at the [ERROR] in the build output and searching I've found this:

How to pass parameters to maven build using pom.xml?

that suggest to me how to complete the command.

Then I passed these two variables with -D options:

mvn clean install -Dmodule=auriga -Dconfig=AMA_SVIL

and than the BUILD SUCCESS!

giasqui
  • 3
  • 4