Re: Thoughts on MR-Jar support in Maven

2017-03-24 Thread Hervé BOUTEMY
not really IMHO
the question here is to create one multi-release jar, not how to maintain many 
(one-)release jars from one sourcecode: MR jars are done to avoid the release-
specific jar approach (that preprocessing makes viable)

Regards,

Hervé

Le vendredi 24 mars 2017, 11:08:49 CET Aldrin Leal a écrit :
> Wouldn't preprocessing help?
> 
> https://blog.jooq.org/2016/03/01/how-to-support-java-6-8-9-in-a-single-api/
> 
> --
> -- Aldrin Leal,  / http://about.me/aldrinleal
> 
> On Fri, Mar 24, 2017 at 11:01 AM, Andreas Sewe <
> 
> s...@st.informatik.tu-darmstadt.de> wrote:
> > Hi,
> > 
> > > I would have thought that it was not Maven's responsibility to ascertain
> > > that test passed in various JDKs, old and new.
> > 
> > I agree that is is not Maven's responsibility to (out of the box)
> > execute the tests against multiple JREs. If you think it is, one can
> > just as well argue that it should run tests for OSGi bundles built with
> > Maven using all different permutations that the bundle's Import-Package
> > version ranges allow.
> > 
> > Yes, there are projects where that level of double-checking is
> > warranted, but IMHO this is the domain of Jenkins matrix projects or
> > similar mechanisms.
> > 
> > The bigger issue with the "multiple source folder per project" approach
> > is whether popular IDEs can express the fact that src/main/java needs to
> > be compiled against one JRE whereas src/main/java-9 needs to be compiled
> > against another.
> > 
> > Just my two cents.
> > 
> > Andreas



-
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org



Re: Thoughts on MR-Jar support in Maven

2017-03-24 Thread Aldrin Leal
Wouldn't preprocessing help?

https://blog.jooq.org/2016/03/01/how-to-support-java-6-8-9-in-a-single-api/

--
-- Aldrin Leal,  / http://about.me/aldrinleal

On Fri, Mar 24, 2017 at 11:01 AM, Andreas Sewe <
s...@st.informatik.tu-darmstadt.de> wrote:

> Hi,
>
> > I would have thought that it was not Maven's responsibility to ascertain
> > that test passed in various JDKs, old and new.
>
> I agree that is is not Maven's responsibility to (out of the box)
> execute the tests against multiple JREs. If you think it is, one can
> just as well argue that it should run tests for OSGi bundles built with
> Maven using all different permutations that the bundle's Import-Package
> version ranges allow.
>
> Yes, there are projects where that level of double-checking is
> warranted, but IMHO this is the domain of Jenkins matrix projects or
> similar mechanisms.
>
> The bigger issue with the "multiple source folder per project" approach
> is whether popular IDEs can express the fact that src/main/java needs to
> be compiled against one JRE whereas src/main/java-9 needs to be compiled
> against another.
>
> Just my two cents.
>
> Andreas
>
>


Re: Thoughts on MR-Jar support in Maven

2017-03-24 Thread Andreas Sewe
Hi,

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

I agree that is is not Maven's responsibility to (out of the box)
execute the tests against multiple JREs. If you think it is, one can
just as well argue that it should run tests for OSGi bundles built with
Maven using all different permutations that the bundle's Import-Package
version ranges allow.

Yes, there are projects where that level of double-checking is
warranted, but IMHO this is the domain of Jenkins matrix projects or
similar mechanisms.

The bigger issue with the "multiple source folder per project" approach
is whether popular IDEs can express the fact that src/main/java needs to
be compiled against one JRE whereas src/main/java-9 needs to be compiled
against another.

Just my two cents.

Andreas



signature.asc
Description: OpenPGP digital signature


Re: Thoughts on MR-Jar support in Maven

2017-03-24 Thread Robert Scholte

On Fri, 24 Mar 2017 12:20:16 +0100, Ceki Gülcü  wrote:

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


With the classic setup there's only one JDK and all tests are at least  
executed with that JDK, all out-of-the-box. In this case you can call it  
Maven's responsibility to execute all tests.
I hope we can figure out a way to easy add the MRJAR feature to a project  
where everybody can keep the same assumptions as a classic jar. Up until  
now the multimodule setup can do that, but I have to admit, it is not  
perfect.


Robert

-
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org



Re: Thoughts on MR-Jar support in Maven

2017-03-24 Thread Ceki Gülcü


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.

--
Ceki


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 module-info.java 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] https://github.com/hboutemy/maven-jep238

-
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org


-
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org



Re: Thoughts on MR-Jar support in Maven

2017-03-24 Thread Robert Scholte

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 module-info.java 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] https://github.com/hboutemy/maven-jep238

-
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org


-
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org