eclipse-ee4j / jersey

Eclipse Jersey Project - Read our Wiki:
https://github.com/eclipse-ee4j/jersey/wiki
Other
692 stars 355 forks source link

[examples/groovy] doesn't work properly #3730

Open jerseyrobot opened 6 years ago

jerseyrobot commented 6 years ago

I just build the sample as README.MD says:

$ mvn clean compile exec:java
[INFO] Scanning for projects...
[INFO] 
[INFO] ------------------------------------------------------------------------
[INFO] Building jersey-examples-groovy 2.27-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ groovy ---
[INFO] Deleting /home/screw/projects/upwork/jersey/examples/groovy/target
[INFO] 
[INFO] --- maven-enforcer-plugin:1.4.1:enforce (enforce-versions) @ groovy ---
[INFO] 
[INFO] --- maven-checkstyle-plugin:2.16:check (verify) @ groovy ---
[INFO] Starting audit...
Audit done.
[INFO] 
[INFO] --- gmaven-plugin:1.3:generateStubs (default) @ groovy ---
[INFO] Generated 1 Java stub
[INFO] 
[INFO] --- gmaven-plugin:1.3:compile (default) @ groovy ---
[INFO] Compiled 1 Groovy class
[INFO] 
[INFO] --- gmaven-plugin:1.3:generateTestStubs (default) @ groovy ---
[INFO] Generated 1 Java stub
[INFO] 
[INFO] --- gmaven-plugin:1.3:testCompile (default) @ groovy ---
[INFO] Compiled 1 Groovy class
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ groovy ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/screw/projects/upwork/jersey/examples/groovy/src/main/resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ groovy ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to /home/screw/projects/upwork/jersey/examples/groovy/target/classes
[INFO] 
[INFO] >>> exec-maven-plugin:1.2.1:java (default-cli) > validate @ groovy >>>
[INFO] 
[INFO] --- maven-enforcer-plugin:1.4.1:enforce (enforce-versions) @ groovy ---
[INFO] 
[INFO] --- maven-checkstyle-plugin:2.16:check (verify) @ groovy ---
[INFO] Starting audit...
Audit done.
[INFO] 
[INFO] <<< exec-maven-plugin:1.2.1:java (default-cli) < validate @ groovy <<<
[INFO] 
[INFO] 
[INFO] --- exec-maven-plugin:1.2.1:java (default-cli) @ groovy ---
дек 06, 2017 6:06:07 PM org.glassfish.jersey.internal.inject.Providers checkProviderRuntime
WARNING: A provider org.glassfish.jersey.examples.groovy.GroovyResource registered in SERVER runtime does not implement any provider interfaces applicable in the SERVER runtime. Due to constraint configuration problems the provider org.glassfish.jersey.examples.groovy.GroovyResource will be ignored. 
дек 06, 2017 6:06:07 PM org.glassfish.grizzly.http.server.NetworkListener start
INFO: Started listener bound to [localhost:9998]
дек 06, 2017 6:06:07 PM org.glassfish.grizzly.http.server.HttpServer start
INFO: [HttpServer] Started.
Jersey app started with WADL available at http://localhost:9998/application.wadl
Try out http://localhost:9998/groovy
Hit  enter to stop it...

Then in other terminal window:

$ curl -v http://localhost:9998/groovy
*   Trying 127.0.0.1...
* Connected to localhost (127.0.0.1) port 9998 (#0)
> GET /groovy HTTP/1.1
> Host: localhost:9998
> User-Agent: curl/7.50.1
> Accept: */*
>
< HTTP/1.1 404 Not Found
< Content-Length: 0
<
* Connection #0 to host localhost left intact

But test passed:

$ mvn test
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building jersey-examples-groovy 2.27-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-enforcer-plugin:1.4.1:enforce (enforce-versions) @ groovy ---
[INFO]
[INFO] --- maven-checkstyle-plugin:2.16:check (verify) @ groovy ---
[INFO] Starting audit...
Audit done.
[INFO]
[INFO] --- gmaven-plugin:1.3:generateStubs (default) @ groovy ---
[INFO] Generated 1 Java stub
[INFO]
[INFO] --- gmaven-plugin:1.3:compile (default) @ groovy ---
[INFO] Compiled 1 Groovy class
[INFO]
[INFO] --- gmaven-plugin:1.3:generateTestStubs (default) @ groovy ---
[INFO] Generated 1 Java stub
[INFO]
[INFO] --- gmaven-plugin:1.3:testCompile (default) @ groovy ---
[INFO] Compiled 1 Groovy class
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ groovy ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/screw/projects/upwork/jersey/examples/groovy/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ groovy ---
[INFO] Nothing to compile - all classes are up to date  
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ groovy ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/screw/projects/upwork/jersey/examples/groovy/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ groovy ---
[INFO] Nothing to compile - all classes are up to date  
[INFO]
[INFO] --- maven-surefire-plugin:2.18.1:test (default-test) @ groovy ---
[INFO] Surefire report directory: /home/screw/projects/upwork/jersey/examples/groovy/target/surefire-reports

------------------------------------------------------- 
 T E S T S
------------------------------------------------------- 
Running org.glassfish.jersey.examples.groovy.GroovyResourceTest
дек 06, 2017 6:11:28 PM org.glassfish.jersey.test.grizzly.GrizzlyTestContainerFactory$GrizzlyTestContainer <init>
INFO: Creating GrizzlyTestContainer configured at the base URI http://localhost:9998/
дек 06, 2017 6:11:29 PM org.glassfish.grizzly.http.server.NetworkListener start
INFO: Started listener bound to [localhost:9998]
дек 06, 2017 6:11:29 PM org.glassfish.grizzly.http.server.HttpServer start
INFO: [HttpServer] Started.
дек 06, 2017 6:11:30 PM org.glassfish.grizzly.http.server.NetworkListener shutdownNow
INFO: Stopped listener bound to [localhost:9998]
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.309 sec - in org.glassfish.jersey.examples.groovy.GroovyResourceTest

Results :

Tests run: 1, Failures: 0, Errors: 0, Skipped: 0

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7.304 s
[INFO] Finished at: 2017-12-06T18:11:30+07:00
[INFO] Final Memory: 30M/375M
[INFO] ------------------------------------------------------------------------

What I'm doing wrong?

jerseyrobot commented 6 years ago