TobiasW
TobiasW

Reputation: 891

Building jersey example is failing

Sorry for this question, but I couldn't find anything similiar to this in the web, so here we go: I am trying to install jersey as follows :

mvn archetype:generate -DarchetypeArtifactId=jersey-quickstart-webapp-DarchetypeGroupId=org.glassfish.jersey.archetypes -DinteractiveMode=false-DgroupId=com.example -DartifactId=simple-service-webapp -Dpackage=com.example-DarchetypeVersion=2.22.1

It's from their website for an example project. This starts to execute, so JAVA_HOME and mvn are set up properly. But as soon as the console states "Generating Project in Batch mode", it fails with a "Build Failure", Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin.... The desired archetype does not exist. I can upload a screenshot of the console log if needed.

Upvotes: 0

Views: 249

Answers (1)

Aurelien
Aurelien

Reputation: 458

From this url I could correctly generate the archetype whith the following step.

1-First I create an empty maven project then I modified the pom file like this

  <groupId>fr.toto</groupId>
  <artifactId>tata</artifactId>
  <version>0.0.1-SNAPSHOT</version>
  <packaging>pom</packaging>
  <repositories>
    <repository>
    <id>snapshot-repository.java.net</id>
    <name>Java.net Snapshot Repository for Maven</name>
    <url>https://maven.java.net/content/repositories/snapshots/</url>
    <layout>default</layout>
</repository>
</repositories>

Then I run the following command inside the root dir of the empty project I created at step 1 :

mvn archetype:generate -DarchetypeArtifactId=jersey-quickstart-grizzly2 \
-DarchetypeGroupId=org.glassfish.jersey.archetypes -DinteractiveMode=false \
-DgroupId=fr.cnamts -DartifactId=tata -Dpackage=fr.cnamts \
-DarchetypeVersion=2.22.1

And voilà it works!

Upvotes: 1

Related Questions