Project does not support Java 9 and module-info
It would be good to see support for Java 9 and Jigsaw module available for 'com.nimbusds.oauth2' so parent applications can modularize their projects.
Comments (15)
-
-
reporter Yes, you can do that without making any changes to code.
Add a new build profile (builds project with JDK10) and write 'Automatic-Module-Name' in Manifest file as directed here: http://branchandbound.net/blog/java/2017/12/automatic-module-name/
-
Thanks Cheena. Would you be interested in submitting a PR? :)
-
reporter Hi Vladimir,
I somehow don't have rights to create a PR - but you can find changes in POM.xml in my Forked branch "module".
I've added 2 profiles for jdk8 and jdk10 where jdk10 profile exposes automatic module. I've also updated maven plugins but somehow was facing problems with Javadocs plugin, so I left that as it is. You may have to make adjustments as per your build process but I leave that upto your project configuration. I also updated build profile names to jdk6, jdk7 for older ones, since we are stepping in jdk11 soon, and in 2-3 years would conflict with jdk16, jdk17 actual versions.
You may want to keep it as before, but I would recommend making that change sooner rather than later. Feel free to create PR against this branch.
Thanks! Cheena Malhotra
-
reporter I managed to create PR, kindly review.
[new to BitBucket :)]
-
- changed status to resolved
Fixed the Maven issue (expired GPG key :))
http://repo1.maven.org/maven2/com/nimbusds/oauth2-oidc-sdk/5.64.1/
Thanks for contributing!
-
reporter Looks good! Just tested for sanity.
-
- changed status to open
The last pom.xml updates didn't make any difference:
http://repo1.maven.org/maven2/com/nimbusds/oauth2-oidc-sdk/5.64.2/
This is odd :)
-
reporter It looks like only 1 jar is being built (jdk6 version). Both jre6 and default jars are exactly same and looks like it's always been this way. Can you elaborate on the commands you use to build and release project? It looks like a build issue.
-
Hmm, what a discovery :) The commands:
mvn release:clean mvn release:prepare mvn release:perform
-
reporter Maven release plugin doesn't seem to work appropriately with multiple release profiles. It just picks up the first active profile (jdk6 in this case) and releases that profile in default jar and classified jar (jre6).
Since this was already existing issue with maven release plugin, I think it should be tracked separately (not part of this issue). I have tested build profile jdk10 which after build, runs fine and exposes module as expected.
-
I suppose you just did
mvn package -Pjdk10
?I'll create a separate ticket as you suggested.
-
reporter mvn clean install -Pjdk10
Also tested with
mvn release:prepare
activating jdk10 profile by default, it does seem to build jdk10 jar and same jdk10 version jar as default.
Tested those jars as well.
-
Hi Cheena,
At long last, found the proper way to structure the pom.xml so that all builds get properly deployed to Central:
https://search.maven.org/artifact/com.nimbusds/oauth2-oidc-sdk/5.64.4/jar
What I did is replace the build profiles with multiple executions of the compile and jar plugins:
Happy coding!
-
- changed status to resolved
All builds are now correct in v5.64.4
- Log in to comment
I would also love to see that :)
Do you think just creating a build profile would do the trick? (and leaving the source code as it is)