SOAPUI build with maven failed - java

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.

Related

Jersey-server Maven - Could not resolve dependencies for project

It looks like the Jersey server has moved to glassfish, but I changed to use correct GAV values and yet I am not having any luck! A simple Jersey helloworld REST project wont build ! Here is my maven dependencies relevant to Jersey
<dependency>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-servlet</artifactId>
<version>2.25</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-server</artifactId>
<version>2.25</version>
</dependency>
Here is the error I am getting:
[INFO] Scanning for projects...
[INFO]
[INFO] ---------------------< com.xxxxxxx >----------------------
[INFO] Building xxxxxxx Server 0.0.1-SNAPSHOT
[INFO] --------------------------------[ war ]---------------------------------
Downloading from central: http://repo1.maven.org/maven2/org/glassfish/jersey/containers/jersey-container-servlet/2.25/jersey-container-servlet-2.25.pom
Downloading from central: http://repo1.maven.org/maven2/org/glassfish/jersey/core/jersey-server/2.25/jersey-server-2.25.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.197 s
[INFO] Finished at: 2020-12-25T13:41:38-05:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project restserver: Could not resolve dependencies for project com.xxxxxxx:restserver:war:0.0.1-SNAPSHOT: Failed to collect dependencies at org.glassfish.jersey.co
ntainers:jersey-container-servlet:jar:2.25: Failed to read artifact descriptor for org.glassfish.jersey.containers:jersey-container-servlet:jar:2.25: Could not transfer artifact org.glassfish.jersey.containers:jersey-container-servlet:pom:2.25 from/to central (http://repo1.maven.org/maven2): Failed to transfer file http://repo1.maven.org/maven2/org/glassfish/jersey/containers/jersey-container-serv
let/2.25/jersey-container-servlet-2.25.pom with status code 501 -> [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
I am going to answer my own question, just so this helps someone and it is easily noticeable.
This has to be the smallest answer - append 's' to http in settings.xml. Not sure how my other projects were building.
Just out of curiosity, after a successful build, I removed the 's' and rebuilt the project without any changes and it starts to pass. It may have cached the binaries in my local repo... and then eventually started failing after a while, so put it back!

spring maven install or clean error, why?

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

The POM for org.sonarsource.sonarqube:sonar-check-api:jar:7.0-SNAPSHOT is missing, no dependency information available

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.

Maven can't download its plugin (as clean), can this situation depend by a proxy configuration issue?

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

Cannot run mvn clean

When i run "mvn clean " getting error message like below on windows 7 PC.
i tried re-installing maven still error not solved. All other command except mvn clean is running fine.
[INFO] Scanning for projects...
[INFO]
[INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building SpringMVC Maven Webapp 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for org.apache.maven.plugins:maven-clean-plugin:jar:2.5 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.222 s
[INFO] Finished at: 2014-03-24T13:02:22+05:30
[INFO] Final Memory: 4M/15M
[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: 1 problem was encountered while building the effective model
[ERROR] [FATAL] Non-parseable POM C:\Users\suresh\.m2\repository\org\apache\maven\plugins\maven-clean-plugin\2.5\maven-clean-plugin-2.5.pom: end tag name </head> must be the same as start tag <meta> from line 4 (position: TEXT seen ...<meta http-equiv="pragma" content="no-cache">\r\n</head>... #5:8) # line 5, column 8
[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
Seems like somehow your clean plugin got corrupted when downloading. Just delete the C:\Users\suresh\.m2\repository\org\apache\maven\plugins\maven-clean-plugin\2.5 directory entirely and retry.

Categories