Reputation: 10299
I am a newbie to jersey and maven. I am trying to create a new maven project based on the jersey-quickstart-webapp archetype, using Eclipse (Luna).
When I go to create the project, I select the "jersey-quickstart-webapp" archetype. Eclipse finds this archetype in the "Maven Central" catalog:
However, when I go to create the project, I get the message:
I don't understand why I am getting this. The archetype exists in the central repository at http://repo1.maven.org/maven2/org/glassfish/jersey/archetypes/jersey-quickstart-webapp/2.14/
and Eclipse can find it when I search for it using the create new project wizard.
I have also tried to create the project from this archetype using the command line:
mvn archetype:generate -DarchetypeGroupId=org.glassfish.jersey.archetypes -DarchetypeArticfactId=jersey-quickstart.webapp -DarchetypeVersion=2.2
When I do this, the project is created; however, when I import it, I get the following error appearing in my POM file:
so it cannot download the dependency:
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.glassfish.jersey</groupId>
<artifactId>jersey-bom</artifactId>
<version>${jersey.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
When I look in my {homepath}.m2 directory, the contents of the jersey-quickstart-webapp download appear to be there. However, the contents of the {homepath}.m2\repository\org\glassfish\jersey\jersey-bom\2.14 download just shows a .lastUpdated file, with no content. The .lastUpdated file has the contents:
http\://repo.maven.apache.org/maven2/.error=Could not transfer artifact org.glassfish.jersey\:jersey-bom\:pom\:2.14 from/to central (http\://repo.maven.apache.org/maven2)\: Access denied to http\://repo.maven.apache.org/maven2/org/glassfish/jersey/jersey-bom/2.14/jersey-bom-2.14.pom. Error code 403, Forbidden
@default-http\://repo.maven.apache.org/maven2/.lastUpdated=1419265078216
I don't understand why this import is failing. When I open a browser and go to http://repo.maven.apache.org/maven2/org/glassfish/jersey/jersey-bom/2.14/jersey-bom-2.14.pom I can view the contents no problem.
I am not sure how to move forward on this and create a new project based on the jersey-quickstart-webapp archetype. I appreciate any suggestions. Thanks for the help.
Upvotes: 1
Views: 6111
Reputation: 515
Check here: https://books.sonatype.com/m2eclipse-book/reference/repository-sect-repo-view.html
In principle it's central repository which should be updated.
Upvotes: 0
Reputation: 46
Add Java.net repo in your app:
<project ...>
<repositories>
<repository>
<id>java.net</id>
<url>https://maven.java.net/content/repositories/public/</url>
</repository>
</repositories>
</project>
Upvotes: 3