When I use maven install or clean for my spring project following error occurred.
this problem was occurred in Eclipse 2018-09 version.
when I use eclipse photon version, did not occur this problem.
The error message.
[INFO] Scanning for projects...
[INFO]
[INFO] -----------------------------< >-----------------------------
[INFO] Building 1.0.0-BUILD-SNAPSHOT
[INFO] -------------------------------- [ war ]---------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.442 s
[INFO] Finished at: 2018-12-02T23:32:35+09:00
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin org.apache.maven.plugins:maven-surefire-plugin:2.12.4 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-surefire-plugin:jar:2.12.4: Could not transfer artifact org.apache.maven.plugins:maven-surefire-plugin:pom:2.12.4 from/to central (https://repo.maven.apache.org/maven2): Cannot access https://repo.maven.apache.org/maven2 with type default using the available connector factories: BasicRepositoryConnectorFactory: Cannot access https://repo.maven.apache.org/maven2 using the registered transporter factories: WagonTransporterFactory: java.util.NoSuchElementException
[ERROR] role: org.apache.maven.wagon.Wagon
[ERROR] roleHint: https
[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/PluginResolutionException
Why can't maven install or clean.
It seems that this problem occurs when you run Maven with the JDK7.
It worked until April 2019, but then it stopped working failing the Maven build with this error.
Java 7 uses TLS v1 as default, so open a terminal and run mvn and specify TLS v1.2 version:
mvn -Dhttps.protocols=TLSv1.2 clean install
More info
Related
I'm trying to build some custom dependencies in Maven with an Azure DevOps pipeline. I followed instructions at this url: https://learn.microsoft.com/en-us/azure/devops/artifacts/get-started-maven?view=azure-devops and so I linked my dependencies to my feed.
Img
I added them to the pom.xml but it failes at building:
Downloaded from central: https://repo.maven.apache.org/maven2/io/reactivex/rxjava3/rxjava/3.1.4/rxjava-3.1.4.jar (2.7 MB at 3.7 MB/s)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.331 s
[INFO] Finished at: 2022-11-21T15:58:57Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project PS_Custom: Could not resolve dependencies for project XXX:XXX:jar:0.0.7-SNAPSHOT: The following artifacts could not be resolved: com.xxx:yyy-2.6.2:jar:1.0, com.xxx:zzz:jar:1.0: Could not find artifact com.xxx:yyy-2.6.2:jar:1.0 in central (https://repo.maven.apache.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
The process '/usr/bin/mvn' failed with exit code 1
Could not retrieve code analysis results - Maven run failed.
##[error]Build failed.
Finishing: Maven
Can you help me about how to import correctly these dependencies please ?
I am a fresh in Sonar.When I try to use this example to write custom rules,the dependency "sonar-plugin-api" I see is version 6.7. But my Sonar's version is 7.0. I don't know what's the matter with the difference. So I download the SonarSource 7.0 to get the jar. But I get the following errors when I build the Maven project "sonar-plugin-api".
[INFO] os.detected.name: windows
[INFO] os.detected.arch: x86_64
[INFO] os.detected.version: 10.0
[INFO] os.detected.version.major: 10
[INFO] os.detected.version.minor: 0
[INFO] os.detected.classifier: windows-x86_64
[INFO]
[INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1
[INFO]
[INFO] --------------------------------------------------------------------- ---
[INFO] Building SonarQube :: Plugin API 7.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for org.sonarsource.sonarqube:sonar-check-api:jar:7.0- SNAPSHOT is missing, no dependency information available
[WARNING] The POM for org.sonarsource.sonarqube:sonar-duplications:jar:7.0-SNAPSHOT is missing, no dependency information available
[WARNING] The POM for org.sonarsource.sonarqube:sonar-testing-harness:jar:7.0-SNAPSHOT is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6.468 s
[INFO] Finished at: 2018-05-16T18:41:47+08:00
[INFO] Final Memory: 9M/121M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project sonar-plugin-api: Could not resolve dependencies for project org.sonarsource.sonarqube:sonar-plugin-api:jar:7.0-SNAPSHOT: The following artifacts could not be resolved: org.sonarsource.sonarqube:sonar-check-api:jar:7.0-SNAPSHOT, org.sonarsource.sonarqube:sonar-duplications:jar:7.0-SNAPSHOT, org.sonarsource.sonarqube:sonar-testing-harness:jar:7.0-SNAPSHOT: Could not find artifact org.sonarsource.sonarqube:sonar-check-api:jar:7.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.
[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
Seems like you are adding wrong libraries to the project. Refer this Maven Sonar Api and add the required version of dependency in the pom file and execute mvn clean install instead adding jar file.
Which example are you talking about ?
Your error is that you are building a submodule without building all the module of SonarQube. Go to your clone root and just do a mvn install.
Any help appreciated.
I'm new to Maven. I got the below command from tutorials point
mvn archetype:generate -DgroupId=com.tutorialpoint.app -DartifactId=camel-first-app -DarchetypeGroupId=org.apache.camel.archetypes -DarchetypeArtifactId=camel-archetype-spring -DinteractiveMode=false
it is failing with below error:
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> maven-archetype-plugin:3.0.1:generate (default-cli) # standalone-pom >>>
[INFO]
[INFO] <<< maven-archetype-plugin:3.0.1:generate (default-cli) # standalone-pom <<<
[INFO]
[INFO] --- maven-archetype-plugin:3.0.1:generate (default-cli) # standalone-pom ---
Downloading:
http://repo.maven.apache.org/maven2/org/codehaus/groovy/groovy/1.8.3/groovy-1.8.3.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.981s
[INFO] Finished at: Tue Nov 14 23:11:42 IST 2017
[INFO] Final Memory: 10M/184M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:3.0.1:generate (default-cli) on project standalone-pom: Execution default-cli of goal org.apache.maven.plugins:maven-archetype-plugin:3.0.1:generate failed: Plugin org.apache.maven.plugins:maven-archetype-plugin:3.0.1 or one of its dependencies could not be resolved: Could not transfer artifact org.codehaus.groovy:groovy:jar:1.8.3 from/to central (http://repo.maven.apache.org/maven2): GET request of: org/codehaus/groovy/groovy/1.8.3/groovy-1.8.3.jar from central failed: Connection reset -> [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
Can someone please help.
The relevant error is pointing to a connection problem:
Could not transfer artifact org.codehaus.groovy:groovy:jar:1.8.3
from/to central (http://repo.maven.apache.org/maven2): GET request
of: org/codehaus/groovy/groovy/1.8.3/groovy-1.8.3.jar from central
failed: Connection reset
The command which you posted actually runs fine on my machine. If you execute this maven command and you do not have the Groovy libraries yet, you will see that it actually downloads the following files:
https://repo.maven.apache.org/maven2/org/codehaus/groovy/groovy/1.8.3/groovy-1.8.3.pom
https://repo.maven.apache.org/maven2/org/codehaus/groovy/groovy/1.8.3/groovy-1.8.3.jar
It might be that you have only access to the internet via a proxy. In this case you will need to setup a proxy in the Maven configuration.
This blog here contains a fairly good description on how to setup a proxy for Maven, so that Maven can access the repository libraries.
Another option to tackle your problem would be to manually download this file using your browser:
https://repo.maven.apache.org/maven2/org/codehaus/groovy/groovy/1.8.3/groovy-1.8.3.jar
And then install it in your repository manually using:
mvn install:install-file -Dfile=<path-to-file> -DgroupId=org.codehaus.groovy \
-DartifactId=groovy -Dversion=1.8.3 -Dpackaging=jar
But normally you should not have to do this manual download + installation. Maven should be doing this for you.
I am not so into Maven and I have the following problem:
I have download a project (that use Spring) from the SVN repository of my company and there are some building errors that seems depends by the fact that some dependencies are missing (for example all the Spring dependencies).
So I tried to select the project and do a Run as ---> Maven Clean as first step before building the project (also if it should perform the clean before the build if I do Maven build but this is not important at this stage) and I obtain this error message:
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building GestioneUtenzeCloud 1.0.0-BUILD-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] Downloading: http://srvabc02.soft.it:8888/artifactory/plugins-release/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.pom
[INFO] Downloading: http://srvabc02.soft.it:8888/artifactory/plugins-snapshot/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.561 s
[INFO] Finished at: 2015-08-19T12:35:43+02:00
[INFO] Final Memory: 7M/123M
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin org.apache.maven.plugins:maven-clean-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-clean-plugin:jar:2.5: Could not transfer artifact org.apache.maven.plugins:maven-clean-plugin:pom:2.5 from/to central (http://srvabc02.soft.it:8888/artifactory/plugins-release): srvabc02.soft.it: Unknown host srvabc02.soft.it -> [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
So it seems that it can't download the Maven plugin (in this case the clean plugin).
My computer is connected to Internet passing through the company proxy so I think that is can not download the Maven plugin because the proxy is not configured on my Eclipse...is it possible? What can I do to solve this issue?
Solved by myself. I have added the Maven proxy settings into the settings.xml file that is into the .m2 directory.
As explained here on the official documentation: https://maven.apache.org/guides/mini/guide-proxies.html
I git clone soapui 5.1.2, installed maven 3.3.1 and as instructed https://github.com/SmartBear/soapui try to build soapui with
mvn clean install
In the end I got this error in screenshot
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] SoapUI project ..................................... SUCCESS [01:05 min]
[INFO] SoapUI ............................................. FAILURE [02:16 min]
[INFO] SoapUI Maven plugin ................................ SKIPPED
[INFO] SoapUI installer ................................... SKIPPED
[INFO] SoapUI Maven plugin tester ......................... SKIPPED
[INFO] SoapUI system test ................................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 03:21 min
[INFO] Finished at: 2015-03-23T16:44:23+01:00
[INFO] Final Memory: 13M/217M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project soapui: Could not resolve dependencies
for project com.smartbear.soapui:soapui:jar:5.2.0-SNAPSHOT: Could not find arti
fact org.sonatype.install4j:i4jruntime:jar:5.1.14 in smartbear-sweden-repository
(http://www.soapui.org/repository/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/DependencyReso
lutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :soapui
My connectivity is fine. But I can't see org.sonatype.install4j:i4jruntime:jar:5.1.14 in http://www.soapui.org/repository/maven2/
Why ? Does it mean the editor forget to put it so it's a mistake from them not me doing something wrong ? How to fix this ? Contact the editor ?
As per the error, the problem is in the soapui/pom.xml. They are referencing:
<dependency>
<groupId>org.sonatype.install4j</groupId>
<artifactId>i4jruntime</artifactId>
<version>5.1.14</version>
</dependency>
twice, just to be sure I guess. This jar is indeed not available at Maven Central.
Their entire project has only one custom repository specified - their own (also mentioned in the error) - and this jar is not there either. Chances are they have this jar in their local artifactory, and just never bothered updating the dependencies.
Keep in mind that Maven is just a tool, and just like any tool, if you use it wrong it will do the wrong things. You could remove the dependency from their pom and see if the project builds, or search the Internet for this jar and manually place it in your local repository.