maven-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ceki Gülcü <>
Subject Re: Thoughts on MR-Jar support in Maven
Date Fri, 24 Mar 2017 11:20:16 GMT

Hi Robert,

I would have thought that it was not Maven's responsibility to ascertain 
that test passed in various JDKs, old and new.

Nevertheless,  there is no doubt that once you pay attention to the 
details, things can get messy awfully quick.

BTW, thank you for your previous response.


On 3/24/2017 11:45, Robert Scholte wrote:
> Hi Ceki,
> the compilation-part isn't the real issue (it is acutally the easy
> part), but e.g. the testing-part is.
> You must ensure that surefire is also executed at least twice: once for
> pre-java9 and for java9.
> And what to do with other plugins which are part of the lifecycle up
> until the package-phase? Very likely they need to be executed twice as
> well.
> If you look closer you'll see that you're actually executing 2 build
> lifecycles which are in the end packaged to a single jar.
> The demo-project is the purest form but comes with overhead.
> Maven has a forking mechanism, but I don't think it is strong enough
> (yet) to fully support this.
> thanks,
> Robert
> On Fri, 24 Mar 2017 11:34:20 +0100, Ceki Gülcü <> wrote:
>> Hi All,
>> Currently in the process modularizing the SLF4J project in preperation
>> for Java 9/Jigsaw, I ran into many wrinkles most of which are due to
>> my own ignorance about Java 9 modules. Now that the initial phase of
>> modularization is done, I am looking into creating mutlti-release
>> jars (MR-Jars).
>> Herve's mutli-version demo project [1] (thanks Hervé) while
>> instructional, shows that MR-Jar support in Maven is perhaps lacking
>> at the moment.
>> As a developer, I really don't want to muck about with multiple maven
>> project modules or learn the intricacies of the maven assembly plugin
>> just to add to my project's artifact.
>> As a moderately-skilled Maven user, I would like to see MR-Jar
>> supported by way of directory layout conventions, perhaps along the
>> lines of:
>> src/main/java/  -> target/classes
>> src/test/java/  -> target/test/classes
>> src/main/java-9/ -> target/classes/META-INF/versions/9
>> src/test/java-9/ -> target/test-classes/META-INF/versions/9
>> Thus, I would need to change little in my pom.xml files to support
>> MR-jars. Most of the leg work would be done by the compiler plug-in
>> and Maven conventions.
>> Comments?
>> --
>> Ceki
>> [1]
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail:
>> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message