Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jersey-dev] [External] : Failure to find javax.enterprise:cdi-api:jar:3.0.1 ?

 
just a little feedback.
 
by running this  mvn build command line 
 
mvn clean install -DskipTests -DCheckstyle.skip=true
 
I can then run the examples as per README.MD
 
mvn exec:java
 
 
Sent: Thursday, April 08, 2021 at 9:58 AM
From: "Maxim Nesen" <maxim.nesen@xxxxxxxxxx>
To: "jersey-dev@xxxxxxxxxxx" <jersey-dev@xxxxxxxxxxx>
Subject: Re: [jersey-dev] [External] : Failure to find javax.enterprise:cdi-api:jar:3.0.1 ?
Hi Dana,
 
it seems that you've somehow got mixes of 3.x and master branches of Jersey.
 
In order to check out clear 3.x (Jakarta EE 9) project you have to:
 
git checkout 3.x                    #be sure the branch is really checked out, sometimes due to changes git refuses to change the branch
git reset --hard origin/3.x      #this will reset all your changes in the local directory so, if you need somesing, stash it before
git status                               #the resulting branch shall be up to date with actual 3.x branch from remote (origin)
 
perform a build afterwards
 
Regards,
Maxim
 

Od: jersey-dev <jersey-dev-bounces@xxxxxxxxxxx> za uživatele Dana whitelow <DanaWhitelow@xxxxxxxx>
Odesláno: čtvrtek 8. dubna 2021 10:44
Komu: jersey-dev@xxxxxxxxxxx <jersey-dev@xxxxxxxxxxx>
Předmět: [External] : [jersey-dev] Failure to find javax.enterprise:cdi-api:jar:3.0.1 ?
 
Hi,
Just cloned the Jakaratee 9  jersey 3.0 examples
I have done a couple of fixes while running
mvn clean compile exec:java
in  examples/cdi-webapp
unclear what is the value expected for the final error.

mvn clean compile exec:java
[INFO] Scanning for projects...
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[ERROR] Non-resolvable import POM: Could not find artifact org.glassfish.jersey:jersey-bom:pom:2.34-SNAPSHOT @ org.glassfish.jersey.examples:project:2.34-SNAPSHOT, /home/dana/jax-rs/jersey3.0/jersey/examples/pom.xml, line 131, column 25
[ERROR] 'dependencies.dependency.version' for org.glassfish.jersey.inject:jersey-hk2:jar is missing. @ line 32, column 21
[ERROR] 'dependencies.dependency.version' for org.glassfish.jersey.containers:jersey-container-servlet-core:jar is missing. @ line 52, column 21
[ERROR] 'dependencies.dependency.version' for org.glassfish.jersey.containers:jersey-container-grizzly2-http:jar is missing. @ line 57, column 21
[ERROR] 'dependencies.dependency.version' for org.glassfish.jersey.core:jersey-server:jar is missing. @ line 62, column 21
[ERROR] 'dependencies.dependency.version' for org.glassfish.jersey.test-framework.providers:jersey-test-framework-provider-bundle:pom is missing. @ org.glassfish.jersey.examples:webapp-example-parent:2.34-SNAPSHOT, /home/dana/jax-rs/jersey3.0/jersey/examples/webapp-example-parent/pom.xml, line 36, column 21
 @
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]   
[ERROR]   The project org.glassfish.jersey.examples:cdi-webapp:2.34-SNAPSHOT (/home/dana/jax-rs/jersey3.0/jersey/examples/cdi-webapp/pom.xml) has 6 errors
[ERROR]     Non-resolvable import POM: Could not find artifact org.glassfish.jersey:jersey-bom:pom:2.34-SNAPSHOT @ org.glassfish.jersey.examples:project:2.34-SNAPSHOT, /home/dana/jax-rs/jersey3.0/jersey/examples/pom.xml, line 131, column 25 -> [Help 2]
[ERROR]     'dependencies.dependency.version' for org.glassfish.jersey.inject:jersey-hk2:jar is missing. @ line 32, column 21
[ERROR]     'dependencies.dependency.version' for org.glassfish.jersey.containers:jersey-container-servlet-core:jar is missing. @ line 52, column 21
[ERROR]     'dependencies.dependency.version' for org.glassfish.jersey.containers:jersey-container-grizzly2-http:jar is missing. @ line 57, column 21
[ERROR]     'dependencies.dependency.version' for org.glassfish.jersey.core:jersey-server:jar is missing. @ line 62, column 21
[ERROR]     'dependencies.dependency.version' for org.glassfish.jersey.test-framework.providers:jersey-test-framework-provider-bundle:pom is missing. @ org.glassfish.jersey.examples:webapp-example-parent:2.34-SNAPSHOT, /home/dana/jax-rs/jersey3.0/jersey/examples/webapp-example-parent/pom.xml, line 36, column 21
[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/confluence/display/MAVEN/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException
FIX          
change from <version>2.34-SNAPSHOT</version>
to <version>3.0.1</version>

(base) examples>mvn clean compile exec:java
[INFO] Scanning for projects...
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[ERROR] Non-resolvable import POM: Could not find artifact org.glassfish.jersey:jersey-bom:pom:2.34-SNAPSHOT @ line 131, column 25
 @
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]   
[ERROR]   The project org.glassfish.jersey.examples:project:2.34-SNAPSHOT (/home/dana/jax-rs/jersey3.0/jersey/examples/pom.xml) has 1 error
[ERROR]     Non-resolvable import POM: Could not find artifact org.glassfish.jersey:jersey-bom:pom:2.34-SNAPSHOT @ line 131, column 25 -> [Help 2]
[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/confluence/display/MAVEN/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException

FIX examples/webapp-example-parent/pom.xml ?
change from <version>2.34-SNAPSHOT</version>
to <version>3.0.1</version>

mvn clean compile exec:java
[INFO] Scanning for projects...
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[ERROR] 'dependencies.dependency.version' for javax.enterprise:cdi-api:jar is missing. @ line 47, column 21
 @
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]   
[ERROR]   The project org.glassfish.jersey.examples:cdi-webapp:3.0.1 (/home/dana/jax-rs/jersey3.0/jersey/examples/cdi-webapp/pom.xml) has 1 error
[ERROR]     'dependencies.dependency.version' for javax.enterprise:cdi-api:jar is missing. @ line 47, column 21
[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/confluence/display/MAVEN/ProjectBuildingException

line 47:   <dependency>
                <groupId>javax.enterprise</groupId>
                <artifactId>cdi-api</artifactId>
                <scope>provided</scope>
            </dependency>
            
added
         <dependency>
                <groupId>javax.enterprise</groupId>
                <artifactId>cdi-api</artifactId>
                <version>3.0.1</version>
                <scope>provided</scope>
            </dependency>

cdi-webapp>mvn clean compile exec:java
[INFO] Scanning for projects...
[INFO]
[INFO] --------------< org.glassfish.jersey.examples:cdi-webapp >--------------
[INFO] Building jersey-examples-cdi-webapp 3.0.1
[INFO] --------------------------------[ war ]---------------------------------
[WARNING] The POM for javax.enterprise:cdi-api:jar:3.0.1 is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  0.451 s
[INFO] Finished at: 2021-04-08T09:34:37+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project cdi-webapp: Could not resolve dependencies for project org.glassfish.jersey.examples:cdi-webapp:war:3.0.1: Failure to find javax.enterprise:cdi-api:jar:3.0.1 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [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/confluence/display/MAVEN/DependencyResolutionException
           
_______________________________________________ jersey-dev mailing list jersey-dev@xxxxxxxxxxx To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/jersey-dev

Back to the top