(Maven build failure for my service):Maven Install is giving me this error. and also there is no settings.xml file in .m2 folder.
[INFO] Adapter CSI_ORDERTRACK_STATUS Bundle ............... SUCCESS [ 0.581 s]
[INFO] Adapter CSI_ORDERTRACK_STATUS Bundle Dependencies .. SUCCESS [ 0.011 s]
[INFO] Adapter CSI_ORDERTRACK_STATUS Bundle Service ....... FAILURE [01:12 min]
[INFO] Adapter CSI_ORDERTRACK_STATUS SWM Zip .............. SKIPPED
[INFO] Adapter CSI_ORDERTRACK_STATUS SWM Package .......... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
------------------------------------------------------------------------
[ERROR] Failed to execute goal on project CSI_ORDERTRACK_STATUS-service: Could not resolve dependencies for project maf.service:CSI_ORDERTRACK_STATUS-service:jar:200.0.14: Failed to collect dependencies at maf:adapter-ordertrackdb:jar:200.0.14: Failed to read artifact descriptor for maf:adapter-ordertrackdb:jar:200.0.14: Could not transfer artifact maf:adapter-ordertrackdb:pom:200.0.14 from/to central (https://repo.maven.apache.org/maven2): connect timed out -> [Help 1]
[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
200.0.14 dependency Service_pom is given below:
<groupId>maf.service</groupId>
<artifactId>CSI_ORDERTRACK_STATUS-service</artifactId>
<version>200.0.14</version>
<packaging>jar</packaging>
<name>Adapter CSI_ORDERTRACK_STATUS Bundle Service</name>
<dependencies>
<dependency>
<groupId>maf</groupId>
<artifactId>adapter-ordertrackdb</artifactId>
<version>200.0.14</version>
</dependency>
<dependency>
Have you tried running Maven in offline mode?
mvn -o install
By default Maven will try to fetch external dependencies from central.
Try to build af:adapter-ordertrackdb:pom:200.0.14 first (non recursive - mvn -N install), and then try Maven install.
If you could supply the pom's it could be helpful.
Related
I've created a multi module Maven project in Intellij. The structure is the following
parent
|-module1
|
|-module2
|
|-module3
First I tried to build the parent module, everything was fine. But then I added a class in module2 and used it in module1. So I added a dependency in module1 pom.xml
<dependency>
<groupId>org.example</groupId>
<artifactId>module2</artifactId>
<version>1.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
But when I try to build the parent (or the module1 as well)- I get the following
[INFO] Building 2 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[WARNING] The POM for org.example:module2:jar:1.0-SNAPSHOT is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.188 s
[INFO] Finished at: 2021-12-02T23:29:35+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project module1: Could not resolve dependencies for project org.example:module1:jar:1.0-SNAPSHOT: Could not find artifact org.example:module2:jar:1.0-SNAPSHOT -> [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.
As I understand it tries to download the dependency from the central maven repository. I don't have any repository con1figurations at all.
I am running out of ideas what else to try.
Can you help to fix it?
This is most likely the ordering of your module builds - as specified in the parent POM. Module1 requires a class from module2, and that module (module2) is not yet built. Try swapping the ordering of module1 and module2 in the parent POM so that module2 is built before module1.
I want to make a release with the maven release plugin in two steps:
1. mvn clean release:prepare
2. mvn release:perform
It worked fine the last two releases, but after changing my IDE from intellij to eclipse I am not able to perform a release this way with apache-maven 3.5.3 and eGit 4.9.2.
The general structure of my project is:
parent-dir
-> pom.xml
-> child1-dir
-> pom.xml
-> child2-dir
-> pom.xml
child1 and child2 contain code and packaging to jar, the parent has packaging goal pom.
Configuration of maven-release-plugin in parent pom.xml:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.5.1</version>
<dependencies>
<dependency>
<groupId>org.apache.maven.shared</groupId>
<artifactId>maven-invoker</artifactId>
<version>2.2</version>
</dependency>
</dependencies>
</plugin>
The plugin updates all poms with correct version #, committs changes and pushes to the remote repository for both child modules. But for the parent module I get the following error at the end of the log:
[INFO] Reactor Summary:
[INFO]
[INFO] test Parent 0.12-SNAPSHOT ........................ FAILURE [02:46 min]
[INFO] test Child1 ...................................... SUCCESS [ 0.011 s]
[INFO] test Child2 0.12-SNAPSHOT ........................ SUCCESS [ 0.205 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 02:48 min
[INFO] Finished at: 2018-09-08T12:56:06+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.5.1:prepare (default-cli) on project test-parent: Unable to commit files
[ERROR] Provider message:
[ERROR] The git-push command failed.
[ERROR] Command output:
[ERROR] git#github.com: Permission denied (publickey).
[ERROR] fatal: Could not read from remote repository.
[ERROR]
[ERROR] Please make sure you have the correct access rights
[ERROR] and the repository exists.
[ERROR] -> [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/MojoFailureException
I do not understand why I get this error message after succesfull commiting and pushing the children modules?
You need to add your public key in Github.
For help please refer https://help.github.com/articles/adding-a-new-ssh-key-to-your-github-account/
Maven is not able to download mysql connector 8.0.12 from central, showing the below error:
Downloading: https://repo.maven.apache.org/maven2/mysql/mysql-connector-
java/8.0.12/mysql-connector-java-8.0.12.pom
[INFO] ---------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ---------------------------------------------------------------------
[INFO] Total time: 3.642 s
[INFO] Finished at: 2018-08-21T00:22:03+05:30
[INFO] Final Memory: 10M/113M
[INFO] ---------------------------------------------------------------------
[ERROR] Failed to execute goal on project OneSolution: Could not resolve
dependencies for project OneSolution:OneSolution:jar:1.1.1: Failed to
collect dependencies at mysql:mysql-connector-java:jar:8.0.12: Failed to
read artifact descriptor for mysql:mysql-connector-java:jar:8.0.12: Could
not transfer artifact mysql:mysql-connector-java:pom:8.0.12 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.
any help is appreciated, not getting enough suggestion online, trying here.
Solution 1: Try mvn clean install in console.
Solution 2: It might happen because of the firewall on your computer. Turn off the firewall and try it again.
Solution 3: Check if your pom.xml has similar dependency.
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.12</version>
</dependency>
If you are using intelliJ idea there is also an other option:
In the Maven tool window, click The Toggle Offline Mode button.
This will append the --offline option to all Maven commands that IntelliJ IDEA runs. It will also report any items that cannot be found in the local repository.
Or in Maven settings.xml:
<offline>false</offline>
Use this way in maven :
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.12</version>
</dependency>
I've been happily developing my API in AnypointStudio (Eclipse) 6.2.2 until just now I added a JSON-to-Object transformer to a flow; now when I build mvn clean package -U
I get:
Downloading: https://repository.mulesoft.org/nexus/content/repositories/public/org/mule/extensions/mule-extensions/3.8.3/mule-extensions-3.8.3.pom
[INFO] BUILD FAILURE
[INFO] -----------------------------------------------------------------------
[INFO] Total time: 14.775 s
[INFO] Finished at: 2017-07-19T10:38:10+10:00
[INFO] Final Memory: 25M/644M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project foobar: Could not resolve dependencies for project org.foo:bar:mule:1.0.0-SNAPSHOT: Failed to collect dependencies at org.mule.modules:mule-module-json:jar:3.8.3 -> org.mule.modules:mule-module-validation:jar:3.8.3: Failed to read artifact descriptor for org.mule.modules:mule-module-validation:jar:3.8.3: Could not find artifact org.mule.extensions:mule-extensions:pom:3.8.3 in Central (http://central.maven.org/maven2/) -> [Help 1]
Can anyone suggest what's going wrong? Do I need an EE licence to use JSON-to-Object?
I found the answer to this. My POM was using Mule runtime 3.8.3
<mule.version>3.8.3</mule.version>
However, there is no release of the json module that corresponds to this release. The latest at Mulesoft Releases is 3.8.1:
https://repository.mulesoft.org/nexus/content/repositories/releases/org/mule/modules/mule-module-json/3.8.1/
So, manually changing the version of this dependency in my POM gets around the issue:
<dependency>
<groupId>org.mule.modules</groupId>
<artifactId>mule-module-json</artifactId>
<version>3.8.1</version>
<scope>provided</scope>
</dependency>
I'm trying to setup a project from a svn repo on my eclipse IDE. When ever I try to build the project I'm thrown with the following error.
Errors occurred during the build. Errors running builder 'Maven
Project Builder' on project 'ats'. Could not calculate build plan:
Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of
its dependencies could not be resolved: Failed to read artifact
descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.6
Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of
its dependencies could not be resolved: Failed to read artifact
descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.6
Could not calculate build plan: Plugin
org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its
dependencies could not be resolved: Failed to read artifact descriptor
for org.apache.maven.plugins:maven-resources-plugin:jar:2.6 Plugin
org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its
dependencies could not be resolved: Failed to read artifact descriptor
for org.apache.maven.plugins:maven-resources-plugin:jar:2.6
In order to setup Maven for this project, I've ran the following command on cmd
mvn eclipse:eclipse
Upon running the following, Maven throws a build error with the following info.
[INFO] BUILD FAILURE [INFO]
------------------------------------------------------------------------ [INFO] Total time: 03:10 min [INFO] Finished at:
2015-07-30T09:51:07-04:00 [INFO] Final Memory: 7M/122M [INFO]
------------------------------------------------------------------------ [ERROR] No plugin found for prefix 'eclipse' in the current project
and in the p lugin groups [org.apache.maven.plugins,
org.codehaus.mojo] available from the re positories [local
(C:\Users\user.m2\repository), central (https://repo.mave
n.apache.org/maven2)] -> [Help 1] [ERROR] [ERROR] To see the full
stack trace of the errors, re-run Maven with the -e swit ch. [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 rea d the following articles: [ERROR] [Help 1]
http://cwiki.apache.org/confluence/display/MAVEN/NoPluginFoundF
orPrefixException
Has anyone ran in to this issue in the past that they can help me out with? I'm on Windows 7 64bit.
Thank you for reading.