Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding org.glassfish.jersey.archetypes in eclipse

Tags:

I am trying to create a maven project in eclipse. I am trying create a archetype but getting the below error.

Can't resolve Archetype org.glassfish.jersey.archetypes:jersey-quickstart-webapp:2.16
org.eclipse.core.runtime.CoreException: Could not resolve artifact org.glassfish.jersey.archetypes:jersey-quickstart-webapp:pom:2.16

like image 354
user1326301 Avatar asked Jul 30 '15 10:07

user1326301


People also ask

What is archetype in eclipse?

In short, Archetype is a Maven project templating toolkit. An archetype is defined as an original pattern or model from which all other things of the same kind are made. The name fits as we are trying to provide a system that provides a consistent means of generating Maven projects.

How to create the Jersey archetype in Eclipse?

Here's a quick walk-through of how to create the Jersey archetype in Eclipse Go to File → New → Other In the dialog, select the Maven file the Maven Project, then Next In the next dialog keep all the defaults, and hit Next In this next dialog we will select the Maven archetype. In the search box, type jersey-quickstart-webapp.

What are the different types of Jersey archetypes in Heroku?

Jersey Archetype Heroku Webapp An archetype which contains a quick start Jersey-based web application project capable to run on Heroku. 3. Jersey Archetypes A module containing archetypes for generating Jersey-based applications. 4. Jersey Archetype Grizzly2 An archetype which contains a quick start Jersey project based on Grizzly container. 5.

How do I add an archetype to my project?

Archetype Version: 2.16 [enter the latest version that is available] Choose the newly entered archetype from the Archetype selection screen Enter your project details - Group ID, Artifact ID and Version.

Why am I not seeing any archetypes in the search results?

If you are not seeing any results come up from the search, then it's likely you don't have the archetypes installed. See this Stackoverflow answer for how you can get the archetypes. Once the archetypes load, and you see the jersey-quickstart-webapp in the results list, uncheck "Show the last version of Archetype only".


1 Answers

You can solve this issue by adding a new Maven Archetype.

  1. Open Window > Preferences
  2. Open Maven > Archetypes
  3. Click Add Remote Catalog and add the following:
    • Catalog File: https://repo.maven.apache.org/maven2/archetype-catalog.xml
    • Description: maven catalog
  4. Restart eclipse

Try creating a maven project again. It will work :).

{search filter:jersey-quickstart-webapp} 

You will have the latest version.

like image 141
sreejith v s Avatar answered Sep 20 '22 14:09

sreejith v s