eclipse-ee4j / eclipse-ee4j/jersey
Classes packaged with jar command are not loaded
- Dominant language
- Java
- Stars
- 730
- Forks
- 382
- PR merge metrics
- No merged PRs in 30d
Description
We are currently migrating von Jersey 1.x to 2.x and hit now the problem that root resource classes are not found when we create a jar from our source code.
As long as we load these classes from the file system the resources are found and working, but as soon as we create a jar from the compiled classes (using the jar program) and run the program the resource classes are not found.
Interesting enough, when we open the jar and move the contents into a newly created zip file and rename this zip file extension to jar, the classes are also found, the same when we use maven to create the package.
Since our build system depends on using jar to create the complete project we need to find out what is causing this.
I am providing a small git project that demonstrates the behaviour.
* It compiles our test code with javac/jar that does not work;
* it contains a newly created zip archive where we simply moved the compiled classes from the not working jar and that works,
* and finally a pom file that creates a package from the same sources that also works.
https://github.com/tweimer/jersey2-bug-report
Contributor guide
Assessment
This issue has not been assessed yet.