Project does not support Java 9 and module-info

Issue #247 resolved
Cheena Malhotra created an issue

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)

  1. Vladimir Dzhuvinov

    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)

  2. Cheena Malhotra 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

  3. Cheena Malhotra 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.

  4. Vladimir Dzhuvinov

    Hmm, what a discovery :) The commands:

    mvn release:clean
    mvn release:prepare
    mvn release:perform
    
  5. Cheena Malhotra 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.

  6. Vladimir Dzhuvinov

    I suppose you just did mvn package -Pjdk10?

    I'll create a separate ticket as you suggested.

  7. Cheena Malhotra 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.

  8. Log in to comment