users@jersey.java.net

[Jersey] Re: Maven archetype for Jersey is broken - where's one that actually works?

From: Martin Matula <martin.matula_at_oracle.com>
Date: Thu, 14 Jun 2012 13:13:56 +0200

The fix is now committed to the source repo - usually it takes a few hours to propagate to the maven central.
Sorry for this - I've added archetype tests to our commit verification test suite, so hopefully this won't happen again.
Martin

On Jun 14, 2012, at 11:35 AM, Martin Matula wrote:

> Oops, looks like we are not testing these regularly. Let me fix it right away.
> Martin
>
> On Jun 14, 2012, at 1:20 AM, Shawn Becker wrote:
>
>> Jersey folks, please tell me where I can download a Maven archetype for Jersey that actually works!!
>>
>>
>> I downloaded the mvn archetype listed in section
>> 1.1. Creating a New Project from Maven Archetype
>> at
>> http://jersey.java.net/nonav/documentation/snapshot/getting-started.html#new-from-archetype
>>
>> mvn archetype:generate \
>> -DarchetypeArtifactId=jersey-quickstart-grizzly2 \
>> -DarchetypeGroupId=org.glassfish.jersey.archetypes \
>> -DinteractiveMode=false \
>> -DgroupId=com.example \
>> -DartifactId=simple-service \
>> -Dpackage=com.example \
>> -DarchetypeVersion=2.0-SNAPSHOT
>>
>> then I run
>>
>> mvn compile
>>
>> and I get the following compiler errors:
>>
>> [ERROR] BUILD FAILURE
>> [INFO] ------------------------------------------------------------------------
>> [INFO] Compilation failure
>>
>> simple-service/src/main/java/com/example/webservice/Main.java:[4,36] package org.glassfish.jersey.grizzly2 does not exist
>>
>> simple-service/src/main/java/com/example/webservice/Main.java:[5,34] cannot find symbol
>> symbol : class JerseyApplication
>> location: package org.glassfish.jersey.server
>>
>> simple-service/src/main/java/com/example/webservice/Main.java:[26,48] cannot find symbol
>> symbol : method builder()
>> location: class org.glassfish.jersey.server.ResourceConfig
>>
>> simple-service/src/main/java/com/example/webservice/Main.java:[29,8] cannot find symbol
>> symbol : class JerseyApplication
>> location: class com.example.webservice.Main
>>
>> simple-service/src/main/java/com/example/webservice/Main.java:[29,32] cannot find symbol
>> symbol : variable JerseyApplication
>> location: class com.example.webservice.Main
>>
>> simple-service/src/main/java/com/example/webservice/Main.java:[33,15] cannot find symbol
>> symbol : variable GrizzlyHttpServerFactory
>> location: class com.example.webservice.Main
>>
>>
>> So your archetype is broken.
>>
>> Where's one that actually works?
>>
>> -- Shawn
>>
>> Shawn Becker
>> sbecker11_at_me.com
>>
>>
>