users@jersey.java.net

[Jersey] Re: Error with new project Maven archetype

From: Thad Humphries <thad.humphries_at_gmail.com>
Date: Sat, 3 Sep 2016 18:44:59 -0400

Remove the profile? I've tried with and without the profile, both times
from an empty directory.

On Sat, Sep 3, 2016 at 6:10 PM, Pavel Bucek <pavel.bucek_at_oracle.com> wrote:

> remove it completely (keep the http proxy if you need it) and try again.
>
>
> On 04/09/16 00:04, Thad Humphries wrote:
>
> To my ~/.m2/settings.xml I added:
>
> <profile>
> <id>javanet</id>
> <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>
> </repository>
> </repositories>
> </profile>
>
> <activeProfiles>
> <activeProfile>javanet</activeProfile>
> </activeProfiles>
>
>
> and ran your Maven command with -Djavanet. It still failed:
>
> Downloading: https://maven-central.storage.googleapis.com/org/glassfish/j
> ersey/archetypes/jersey-quickstart-grizzly2/2.23.2/jersey-
> quickstart-grizzly2-2.23.2.jar
> [INFO] ------------------------------------------------------------
> ------------
> [INFO] BUILD FAILURE
> [INFO] ------------------------------------------------------------
> ------------
> [INFO] Total time: 01:31 min
> [INFO] Finished at: 2016-09-03T18:00:18-04:00
> [INFO] Final Memory: 16M/123M
> [INFO] ------------------------------------------------------------
> ------------
> [WARNING] The requested profile "javanet" could not be activated because
> it does not exist.
> [ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.4:generate
> (default-cli) on project standalone-pom: The desired archetype does not
> exist (org.glassfish.jersey.archetypes:jersey-quickstart-grizzly2:2.23.2)
> -> [Help 1]
> [ERROR]
> [ERROR] To see the full stack trace of the errors, re-run Maven with the
> -e switch.
> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
> [ERROR]
> [ERROR] For more information about the errors and possible solutions,
> please read the following articles:
> [ERROR] [Help 1] http://cwiki.apache.org/conflu
> ence/display/MAVEN/MojoFailureException
>
>
>
> On Sat, Sep 3, 2016 at 2:16 PM, Pavel Bucek <pavel.bucek_at_oracle.com>
> wrote:
>
>> Hi Thad,
>>
>> I just did this:
>>
>> mvn archetype:generate -DarchetypeArtifactId=jersey-quickstart-grizzly2
>> -DarchetypeGroupId=org.glassfish.jersey.archetypes
>> -DinteractiveMode=false -DgroupId=com.example -DartifactId=simple-service
>> -Dpackage=com.example -Dmaven.repo.local=./repo
>>
>> (last param is just to ensure that I'm not using my local repo, which has
>> jersey in there for sure) and result:
>>
>> ...
>> [INFO] ------------------------------------------------------------
>> ----------------
>> [INFO] Using following parameters for creating project from Old (1.x)
>> Archetype: jersey-quickstart-grizzly2:2.23.2
>> [INFO] ------------------------------------------------------------
>> ----------------
>> [INFO] Parameter: basedir, Value: /Users/pavel/jersey/jersey/tmo
>> [INFO] Parameter: package, Value: com.example
>> [INFO] Parameter: groupId, Value: com.example
>> [INFO] Parameter: artifactId, Value: simple-service
>> [INFO] Parameter: packageName, Value: com.example
>> [INFO] Parameter: version, Value: 1.0-SNAPSHOT
>> [INFO] project created from Old (1.x) Archetype in dir:
>> /Users/pavel/jersey/jersey/tmo/simple-service
>> [INFO] ------------------------------------------------------------
>> ------------
>> [INFO] BUILD SUCCESS
>> [INFO] ------------------------------------------------------------
>> ------------
>> [INFO] Total time: 19.128 s
>> [INFO] Finished at: 2016-09-03T20:14:21+02:00
>> [INFO] Final Memory: 15M/150M
>> [INFO] ------------------------------------------------------------
>> ------------
>>
>> Please check your ~/.m2/settings.xml file, https://maven-central.storage.
>> googleapis.com
>> <https://maven-central.storage.googleapis.com/org/glassfish/jersey/archetypes/jersey-quickstart-grizzly2/2.23.2/jersey-quickstart-grizzly2-2.23.2.jar>
>> (from your execution) is very suspicious - maybe you have some proxies or
>> mirrors defined, which are not mirroring maven central correctly.
>>
>> Regards,
>> Pavel
>>
>>
>> On 03/09/16 15:43, Thad Humphries wrote:
>>
>> I am trying to explore Jersey. However when I run the Maven archetype
>> given in the Chapter 1 example (at https://jersey.java.net/docume
>> ntation/latest/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.23.2
>>
>>
>> I get the following error:
>>
>> ...
>> [INFO] Generating project in Batch mode
>> [INFO] Archetype repository not defined. Using the one from
>> [org.glassfish.jersey.archetypes:jersey-quickstart-grizzly2:2.23.2]
>> found in catalog remote
>> Downloading: https://maven-central.storage.googleapis.com/org/glassfish/j
>> ersey/archetypes/jersey-quickstart-grizzly2/2.23.2/jersey-
>> quickstart-grizzly2-2.23.2.jar
>> [INFO] ------------------------------------------------------------
>> ------------
>> [INFO] BUILD FAILURE
>> [INFO] ------------------------------------------------------------
>> ------------
>> [INFO] Total time: 45.122 s
>> [INFO] Finished at: 2016-09-03T09:29:36-04:00
>> [INFO] Final Memory: 14M/81M
>> [INFO] ------------------------------------------------------------
>> ------------
>> [ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.4:generate
>> (default-cli) on project standalone-pom: The desired archetype does not
>> exist (org.glassfish.jersey.archetypes:jersey-quickstart-grizzly2:2.23.2)
>> -> [Help 1]
>> [ERROR]
>> [ERROR] To see the full stack trace of the errors, re-run Maven with the
>> -e switch.
>> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
>> [ERROR]
>> [ERROR] For more information about the errors and possible solutions,
>> please read the following articles:
>> [ERROR] [Help 1] http://cwiki.apache.org/conflu
>> ence/display/MAVEN/MojoFailureException
>>
>>
>>
>> I am using Apache Maven 3.3.9 with Java 1.8.0_101.
>>
>> --
>> "Hell hath no limits, nor is circumscrib'd In one self-place; but where
>> we are is hell, And where hell is, there must we ever be" --Christopher
>> Marlowe, *Doctor Faustus* (v. 121-24)
>>
>>
>>
>
>
> --
> "Hell hath no limits, nor is circumscrib'd In one self-place; but where we
> are is hell, And where hell is, there must we ever be" --Christopher
> Marlowe, *Doctor Faustus* (v. 121-24)
>
>
>


-- 
"Hell hath no limits, nor is circumscrib'd In one self-place; but where we
are is hell, And where hell is, there must we ever be" --Christopher
Marlowe, *Doctor Faustus* (v. 121-24)