Adding org.glassfish.jersey.archetypes in eclipse

59,268

Solution 1

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.

Solution 2

Steps

  1. Open Eclipse
  2. Choose New > Project > Maven Project
  3. Choose Add Archetype and enter the following details:
    • Archetype Group ID: org.glassfish.jersey.archetypes
    • Archetype Artifact ID: jersey-quickstart-webapp
    • Archetype Version: 2.16 [enter the latest version that is available]
  4. Choose the newly entered archetype from the Archetype selection screen
  5. Enter your project details - Group ID, Artifact ID and Version.

More Information: https://javabrains.io/courses/javaee_jaxrs/lessons/Setting-Up

Solution 3

You can solve this issue by adding a new Maven Archetype locally. By locally, I mean-

  1. Go to this URL and download the XML file at your local file system.
  2. Open Window > Preferences
  3. Open Maven > Archetypes
  4. Click Add Local Catalog > Browse to the location of your archetype-catalog.xml file
  5. Add Descritpion
    1. OK

Hope this will help you.

Solution 4

Try to change the version 2.21 insted of 2.16 :

org.glassfish.jersey.archetypes jersey-quickstart-webapp 2.21

Solution 5

Thanks @sreejith v s . The above mentioned method worked completely fine .I'll repeat the same steps here:-

  1. Open Window > Preferences
  2. Open Maven > Archetypes
  3. Click Add Remote Catalog and add the following:

    3.1 Catalog File: http://repo1.maven.org/maven2/archetype-catalog.xml

    3.2 Description: maven catalog

  4. Restart eclipse

While creating maven project your window might take time to load all the Archetype but it does load all of them because here we have added the archetype-catalog.xml as remote catalog file.

Share:
59,268
Admin
Author by

Admin

Updated on September 28, 2020

Comments

  • Admin
    Admin over 3 years

    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