I’m using maven version 3.6.3
mvn package
command fails with the below error message:
[INFO] Scanning for projects...
[INFO]
[INFO] ---------------------< mypdf:mypdf >----------------------
[INFO] Building mypdf 1.0
[INFO] --------------------------------[ war ]---------------------------------
Downloading from maven.oracle.com: https://repo1.maven.org/maven2/commonTools/commonTools/1.0/commonTools-1.0.pom
Warning: The POM for commonTools:commonTools:jar:1.0 is missing, no dependency information available
Downloading from maven.oracle.com: https://repo1.maven.org/maven2/jakarta-oro/jakarta-oro/2.0.8/jakarta-oro-2.0.8.pom
Warning: The POM for jakarta-oro:jakarta-oro:jar:2.0.8 is missing, no dependency information available
Downloading from maven.oracle.com: https://repo1.maven.org/maven2/jFdfTk/jFdfTk/1.0/jFdfTk-1.0.pom
Warning: The POM for jFdfTk:jFdfTk:jar:1.0 is missing, no dependency information available
Downloading from maven.oracle.com: https://repo1.maven.org/maven2/ddchanger/ddchanger/1.0/ddchanger-1.0.pom
Warning: The POM for ddchanger:ddchanger:jar:1.0 is missing, no dependency information available
Downloading from maven.oracle.com: https://repo1.maven.org/maven2/cwmfa/io/swagger/mfa-swagger-java-client-dm/1.0.0/mfa-swagger-java-client-dm-1.0.0.pom
Warning: The POM for cwmfa.io.swagger:mfa-swagger-java-client-dm:jar:1.0.0 is missing, no dependency information available
Downloading from maven.oracle.com: https://repo1.maven.org/maven2/commonTools/commonTools/1.0/commonTools-1.0.jar
Downloading from maven.oracle.com: https://repo1.maven.org/maven2/jakarta-oro/jakarta-oro/2.0.8/jakarta-oro-2.0.8.jar
Downloading from maven.oracle.com: https://repo1.maven.org/maven2/jFdfTk/jFdfTk/1.0/jFdfTk-1.0.jar
Downloading from maven.oracle.com: https://repo1.maven.org/maven2/ddchanger/ddchanger/1.0/ddchanger-1.0.jar
Downloading from maven.oracle.com: https://repo1.maven.org/maven2/com/oracle/ojdbc14/10.2.0.2.0/ojdbc14-10.2.0.2.0.jar
Downloading from maven.oracle.com: https://repo1.maven.org/maven2/cwmfa/io/swagger/mfa-swagger-java-client-dm/1.0.0/mfa-swagger-java-client-dm-1.0.0.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.165 s
[INFO] Finished at: 2023-10-26T12:43:04-05:00
[INFO] ------------------------------------------------------------------------
Error: Failed to execute goal on project mypdf: Could not resolve dependencies for project mypdf:mypdf:war:1.0: The following artifacts could not be resolved: commonTools:commonTools:jar:1.0, jakarta-oro:jakarta-oro:jar:2.0.8, jFdfTk:jFdfTk:jar:1.0, ddchanger:ddchanger:jar:1.0, com.oracle:ojdbc14:jar:10.2.0.2.0, cwmfa.io.swagger:mfa-swagger-java-client-dm:jar:1.0.0: Could not find artifact commonTools:commonTools:jar:1.0 in maven.oracle.com (https://repo1.maven.org/maven2/) -> [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: Process completed with exit code 1.
I then tried to suppress the error by adding the below under <profiles>
in <MAVEN_HOME>\conf\settings.xml
but it did not help.
<profiles>
<profile>
<id>ignore-missing-pom-warnings</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<maven.compiler.failOnMissingPom>false</maven.compiler.failOnMissingPom>
</properties>
</profile>
<!-- profile
| Specifies a set of introductions to the build process, to be activated using one or more of the
….
……
Can you please suggest how can I address or suppress the warnings in the mvn build process?
Your project is referencing dependencies that are not available and that causes it to fail. You need to either find the correct dependencies or find replacements. Another option is to replace completely the code that depends on those dependencies if possible. The later is not always possible.
I'll make an educated guess that most if not all of these dependencies fall into two buckets:
For 1) you need to install those dependencies in the local Maven repository of were the build is running, or in a Maven repository.
For 2) you need to search the dependencies and find if they were moved or if the version used is no longer available. In the later case you may be able to find a newer version.