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!
Related
I'm trying to download maven dependencies to my netbeans build maven web application. ince I couldn't update dependencies through IDE I tried to do it using
mvn clean install
Command trough cmd.
But I still got the same error.
Please help. I'm trying to figure this out for days. (Internet connection is working pretty fine.)
THank you
EDIT
This is the output.
C:\Users\Dilini\Documents\NetBeansProjects\NewSpring>mvn clean install
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building NewSpring 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for org.springframework:spring-core:jar:5.0.0.RC3 is missing, no dependency information available
[WARNING] The POM for org.springframework:spring-beans:jar:5.0.0.RC3 is missing, no dependency information available
[WARNING] The POM for org.springframework:spring-context:jar:5.0.0.RC3 is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.552 s
[INFO] Finished at: 2017-08-24T15:24:58+05:30
[INFO] Final Memory: 8M/155M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project NewSpring: Could not resolve dependencies for project com.dilini:NewSpring:war:1.0-SNAPSHOT: The following artifacts could not be resolved: org.springframework:spring-core:jar:5.0.0.RC3, org.springframework:spring-beans:jar:5.0.0.RC3, org.springframework:spring-context:jar:5.0.0.RC3: Failure to find org.springframework:spring-core:jar:5.0.0.RC3 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
C:\Users\Dilini\Documents\NetBeansProjects\NewSpring>
You need to add this repo to your pom file:
<repositories>
<repository>
<id>repository.spring.milestone</id>
<name>Spring Milestone Repository</name>
<url>http://repo.spring.io/milestone</url>
</repository>
</repositories>
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.
I have a dependency on JBoss's teiid framwork. If I add the dependency on older version it downloads the jar file while if I add dependency on newer version it only downloads pom file. below is my pom config
repository:
<repository>
<id>jboss-public-repository-group</id>
<url>http://repository.jboss.org/nexus/content/groups/public/</url>
</repository>
This will download jar
<dependency>
<groupId>org.jboss.teiid</groupId>
<artifactId>teiid-client</artifactId>
<version>8.5.0.Final</version>
</dependency>
This will download only pom file
<dependency>
<groupId>org.jboss.teiid</groupId>
<artifactId>teiid-client</artifactId>
<version>8.9.1</version>
</dependency>
Update:
Maven log
[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 hello-teiid 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] Downloading: http://repository.jboss.org/nexus/content/groups/public/org/jboss/teiid/teiid-client/8.9.1/teiid-client-8.9.1.pom
[INFO] Downloaded: http://repository.jboss.org/nexus/content/groups/public/org/jboss/teiid/teiid-client/8.9.1/teiid-client-8.9.1.pom (2 KB at 1.4 KB/sec)
[INFO] Downloading: http://repository.jboss.org/nexus/content/groups/public/org/jboss/as/jboss-as-parent/7.4.0.Final-redhat-4/jboss-as-parent-7.4.0.Final-redhat-4.pom
[INFO] Downloading: http://repo.maven.apache.org/maven2/org/jboss/as/jboss-as-parent/7.4.0.Final-redhat-4/jboss-as-parent-7.4.0.Final-redhat-4.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.047 s
[INFO] Finished at: 2015-01-28T09:41:17-05:00
[INFO] Final Memory: 6M/123M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project hello-teiid: Could not resolve dependencies for project hello:hello-teiid:jar:0.0.1-SNAPSHOT: Failed to collect dependencies at org.jboss.teiid:teiid-client:jar:8.9.1: Failed to read artifact descriptor for org.jboss.teiid:teiid-client:jar:8.9.1: Could not find artifact org.jboss.as:jboss-as-parent:pom:7.4.0.Final-redhat-4 in jboss-public-repository-group (http://repository.jboss.org/nexus/content/groups/public/) -> [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
If you search for this artifact in the jboss repo, you can see that in version 8.9.1 its packaging is "bundle", while in version 8.5.0 it was defaulted to "jar".
Now that we have noticed this, we can relate to the comment of #AlexandrM, OSGI Bundle vs jar dependency,
or to be even more specific, Why can't maven find an osgi bundle dependency? (note the 2nd answer, not the accepted one. Basically, you need to add a plugin that defines it, namely the maven-bundle-plugin).
I have downloaded Apache Maven 3.1.1 on windows xp and the installation works.However,i want to start jetty but i am thinking there is a way i have to tell maven where to find jetty first but i went ahead anyway and i got this
C:\maven>mvn jetty:run
[INFO] Scanning for projects...
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-
metadata.xml
Downloading: http://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadat
a.xml
Downloaded: http://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadata
.xml (22 KB at 3.2 KB/sec)
Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-m
etadata.xml (13 KB at 1.8 KB/sec)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 20.339s
[INFO] Finished at: Thu Jan 23 10:17:40 EAT 2014
[INFO] Final Memory: 5M/13M
[INFO] ------------------------------------------------------------------------
[ERROR] No plugin found for prefix 'jetty' in the current project and in the plu
gin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repo
sitories [local (C:\Documents and Settings\Karl Meiwes\.m2\repository), central
(http://repo.maven.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
C:\maven>
Will i have to tell maven where to find jetty and how do i install the jetty plugin?.In this version of maven,i find the plugins directory.Should there be one?.
You'll need to add the plug-in to your pom.xml . Here's the documentation.
Try adding the plugin in pom.xml
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>9.0.5.v20130815</version>
</plugin>