You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by nicolas de loof <ni...@apache.org> on 2009/06/04 18:44:59 UTC

about MCOMPILER-80 (set compiler default to 1.5)

Hi,
just an suggestion for a potential fix to
http://jira.codehaus.org/browse/MCOMPILER-80

as maven 2.0.9 fixes the plugin version in super POM, we can consider that
- if maven 2.0.9 + is detected - any version of maven compiler > 2.0.2 (the
one set in super-pom) has been set by the user. In such case, a 2.0.3
version of the plugin cannot be there because of the LATEST rule and can
break full backward compatility (according this is well documented in the
release note and plugin documentation).

So my idea would be to (pseudo-code) :

if ( mavenSession.getVersion() > 2.0.9 && source == null)
{
    source = 1.5;
}
if ( mavenSession.getVersion() > 2.0.9 && target == null)
{
    target = 1.5;
}

For the same reason compiler 2.0.4 could default to 1.6 and so on.

What's your opinion ?

Nicolas

Re: about MCOMPILER-80 (set compiler default to 1.5)

Posted by nicolas de loof <ni...@gmail.com>.
2009/6/6 Brian Fox <br...@infinity.nu>

> On Sat, Jun 6, 2009 at 8:28 AM, nicolas de loof <nicolas.deloof@gmail.com
> >wrote:
>
> > Could we also :
> > - set 2.0.9+ as maven version prerequisite in a compiler 2.1 branch, so
> > that
> > any user running an older maven version (and may use this 2.1 plugin from
> > LATEST rule) would be warned early during the build and not when
> deploying
> > its app on a Java 1.4 runtime.
> >
>
> No because if they are using java 1.5+ with an older maven, there's no
> problem.


The issue could be on maven < 2.0.9 users that rely on maven compiler to
produce 1.4 classes without having fixed the parameters (consider old
project in maintenance). They will discover the mistake when deploying the
project on a 1.4 runtime as there will be not a single warning before.


>
> >
> > - set java 5 as plugin runtime prerequisite as user willing to compile
> for
> > java 5 have many chances to run maven with this version of the JDK
>
>
> How would you do that?


set the maven-plugin-plugin to report jdk5 and compile the plugin itself to
1.5 ! running on 1.4 will then fail.


>
>
> >
> >
> > Nicolas.
> >
> > 2009/6/5 nicolas de loof <ni...@gmail.com>
> >
> > > Right, so do we agree to upgrade default-value to 1.5 in a new 2.1
> branch
> > > of the compiler plugin (with required warnings in release note) ?
> > >
> > >
> > > 2009/6/5 Olivier Lamy <ol...@apache.org>
> > >
> > > 2009/6/4 Brian Fox <br...@infinity.nu>:
> > >> > On Thu, Jun 4, 2009 at 9:44 AM, nicolas de loof <nicolas@apache.org
> >
> > >> wrote:
> > >> >
> > >> >> Hi,
> > >> >> just an suggestion for a potential fix to
> > >> >> http://jira.codehaus.org/browse/MCOMPILER-80
> > >> >>
> > >> >> as maven 2.0.9 fixes the plugin version in super POM, we can
> consider
> > >> that
> > >> >> - if maven 2.0.9 + is detected - any version of maven compiler >
> > 2.0.2
> > >> (the
> > >> >> one set in super-pom) has been set by the user. In such case, a
> 2.0.3
> > >> >> version of the plugin cannot be there because of the LATEST rule
> and
> > >> can
> > >> >> break full backward compatility (according this is well documented
> in
> > >> the
> > >> >> release note and plugin documentation).
> > >> >
> > >> >
> > >> >
> > >> >>
> > >> >> So my idea would be to (pseudo-code) :
> > >> >>
> > >> >> if ( mavenSession.getVersion() > 2.0.9 && source == null)
> > >> >> {
> > >> >>    source = 1.5;
> > >> >> }
> > >> >> if ( mavenSession.getVersion() > 2.0.9 && target == null)
> > >> >> {
> > >> >>    target = 1.5;
> > >> >> }
> > >> >>
> > >> >
> > >> > -1, more complication than needed.
> > >> >
> > >> >
> > >> >>
> > >> >> For the same reason compiler 2.0.4 could default to 1.6 and so on.
> > >> >>
> > >> >
> > >> >
> > >> > There are lots of votes, change it and mark it loudly in the release
> > >> notes.
> > >>
> > >> +1 too.
> > >>
> > >> >
> > >> >
> > >> >>
> > >> >> What's your opinion ?
> > >> >>
> > >> >> Nicolas
> > >> >>
> > >> >
> > >>
> > >> ---------------------------------------------------------------------
> > >> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> > >> For additional commands, e-mail: dev-help@maven.apache.org
> > >>
> > >>
> > >
> >
>

Re: about MCOMPILER-80 (set compiler default to 1.5)

Posted by Brian Fox <br...@infinity.nu>.
On Sat, Jun 6, 2009 at 8:28 AM, nicolas de loof <ni...@gmail.com>wrote:

> Could we also :
> - set 2.0.9+ as maven version prerequisite in a compiler 2.1 branch, so
> that
> any user running an older maven version (and may use this 2.1 plugin from
> LATEST rule) would be warned early during the build and not when deploying
> its app on a Java 1.4 runtime.
>

No because if they are using java 1.5+ with an older maven, there's no
problem.


>
> - set java 5 as plugin runtime prerequisite as user willing to compile for
> java 5 have many chances to run maven with this version of the JDK


How would you do that?

>
>
> Nicolas.
>
> 2009/6/5 nicolas de loof <ni...@gmail.com>
>
> > Right, so do we agree to upgrade default-value to 1.5 in a new 2.1 branch
> > of the compiler plugin (with required warnings in release note) ?
> >
> >
> > 2009/6/5 Olivier Lamy <ol...@apache.org>
> >
> > 2009/6/4 Brian Fox <br...@infinity.nu>:
> >> > On Thu, Jun 4, 2009 at 9:44 AM, nicolas de loof <ni...@apache.org>
> >> wrote:
> >> >
> >> >> Hi,
> >> >> just an suggestion for a potential fix to
> >> >> http://jira.codehaus.org/browse/MCOMPILER-80
> >> >>
> >> >> as maven 2.0.9 fixes the plugin version in super POM, we can consider
> >> that
> >> >> - if maven 2.0.9 + is detected - any version of maven compiler >
> 2.0.2
> >> (the
> >> >> one set in super-pom) has been set by the user. In such case, a 2.0.3
> >> >> version of the plugin cannot be there because of the LATEST rule and
> >> can
> >> >> break full backward compatility (according this is well documented in
> >> the
> >> >> release note and plugin documentation).
> >> >
> >> >
> >> >
> >> >>
> >> >> So my idea would be to (pseudo-code) :
> >> >>
> >> >> if ( mavenSession.getVersion() > 2.0.9 && source == null)
> >> >> {
> >> >>    source = 1.5;
> >> >> }
> >> >> if ( mavenSession.getVersion() > 2.0.9 && target == null)
> >> >> {
> >> >>    target = 1.5;
> >> >> }
> >> >>
> >> >
> >> > -1, more complication than needed.
> >> >
> >> >
> >> >>
> >> >> For the same reason compiler 2.0.4 could default to 1.6 and so on.
> >> >>
> >> >
> >> >
> >> > There are lots of votes, change it and mark it loudly in the release
> >> notes.
> >>
> >> +1 too.
> >>
> >> >
> >> >
> >> >>
> >> >> What's your opinion ?
> >> >>
> >> >> Nicolas
> >> >>
> >> >
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> >> For additional commands, e-mail: dev-help@maven.apache.org
> >>
> >>
> >
>

Re: about MCOMPILER-80 (set compiler default to 1.5)

Posted by nicolas de loof <ni...@gmail.com>.
Could we also :
- set 2.0.9+ as maven version prerequisite in a compiler 2.1 branch, so that
any user running an older maven version (and may use this 2.1 plugin from
LATEST rule) would be warned early during the build and not when deploying
its app on a Java 1.4 runtime.

- set java 5 as plugin runtime prerequisite as user willing to compile for
java 5 have many chances to run maven with this version of the JDK

Nicolas.

2009/6/5 nicolas de loof <ni...@gmail.com>

> Right, so do we agree to upgrade default-value to 1.5 in a new 2.1 branch
> of the compiler plugin (with required warnings in release note) ?
>
>
> 2009/6/5 Olivier Lamy <ol...@apache.org>
>
> 2009/6/4 Brian Fox <br...@infinity.nu>:
>> > On Thu, Jun 4, 2009 at 9:44 AM, nicolas de loof <ni...@apache.org>
>> wrote:
>> >
>> >> Hi,
>> >> just an suggestion for a potential fix to
>> >> http://jira.codehaus.org/browse/MCOMPILER-80
>> >>
>> >> as maven 2.0.9 fixes the plugin version in super POM, we can consider
>> that
>> >> - if maven 2.0.9 + is detected - any version of maven compiler > 2.0.2
>> (the
>> >> one set in super-pom) has been set by the user. In such case, a 2.0.3
>> >> version of the plugin cannot be there because of the LATEST rule and
>> can
>> >> break full backward compatility (according this is well documented in
>> the
>> >> release note and plugin documentation).
>> >
>> >
>> >
>> >>
>> >> So my idea would be to (pseudo-code) :
>> >>
>> >> if ( mavenSession.getVersion() > 2.0.9 && source == null)
>> >> {
>> >>    source = 1.5;
>> >> }
>> >> if ( mavenSession.getVersion() > 2.0.9 && target == null)
>> >> {
>> >>    target = 1.5;
>> >> }
>> >>
>> >
>> > -1, more complication than needed.
>> >
>> >
>> >>
>> >> For the same reason compiler 2.0.4 could default to 1.6 and so on.
>> >>
>> >
>> >
>> > There are lots of votes, change it and mark it loudly in the release
>> notes.
>>
>> +1 too.
>>
>> >
>> >
>> >>
>> >> What's your opinion ?
>> >>
>> >> Nicolas
>> >>
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>> For additional commands, e-mail: dev-help@maven.apache.org
>>
>>
>

Re: about MCOMPILER-80 (set compiler default to 1.5)

Posted by nicolas de loof <ni...@gmail.com>.
Right, so do we agree to upgrade default-value to 1.5 in a new 2.1 branch of
the compiler plugin (with required warnings in release note) ?


2009/6/5 Olivier Lamy <ol...@apache.org>

> 2009/6/4 Brian Fox <br...@infinity.nu>:
> > On Thu, Jun 4, 2009 at 9:44 AM, nicolas de loof <ni...@apache.org>
> wrote:
> >
> >> Hi,
> >> just an suggestion for a potential fix to
> >> http://jira.codehaus.org/browse/MCOMPILER-80
> >>
> >> as maven 2.0.9 fixes the plugin version in super POM, we can consider
> that
> >> - if maven 2.0.9 + is detected - any version of maven compiler > 2.0.2
> (the
> >> one set in super-pom) has been set by the user. In such case, a 2.0.3
> >> version of the plugin cannot be there because of the LATEST rule and can
> >> break full backward compatility (according this is well documented in
> the
> >> release note and plugin documentation).
> >
> >
> >
> >>
> >> So my idea would be to (pseudo-code) :
> >>
> >> if ( mavenSession.getVersion() > 2.0.9 && source == null)
> >> {
> >>    source = 1.5;
> >> }
> >> if ( mavenSession.getVersion() > 2.0.9 && target == null)
> >> {
> >>    target = 1.5;
> >> }
> >>
> >
> > -1, more complication than needed.
> >
> >
> >>
> >> For the same reason compiler 2.0.4 could default to 1.6 and so on.
> >>
> >
> >
> > There are lots of votes, change it and mark it loudly in the release
> notes.
>
> +1 too.
>
> >
> >
> >>
> >> What's your opinion ?
> >>
> >> Nicolas
> >>
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>

Re: about MCOMPILER-80 (set compiler default to 1.5)

Posted by Olivier Lamy <ol...@apache.org>.
2009/6/4 Brian Fox <br...@infinity.nu>:
> On Thu, Jun 4, 2009 at 9:44 AM, nicolas de loof <ni...@apache.org> wrote:
>
>> Hi,
>> just an suggestion for a potential fix to
>> http://jira.codehaus.org/browse/MCOMPILER-80
>>
>> as maven 2.0.9 fixes the plugin version in super POM, we can consider that
>> - if maven 2.0.9 + is detected - any version of maven compiler > 2.0.2 (the
>> one set in super-pom) has been set by the user. In such case, a 2.0.3
>> version of the plugin cannot be there because of the LATEST rule and can
>> break full backward compatility (according this is well documented in the
>> release note and plugin documentation).
>
>
>
>>
>> So my idea would be to (pseudo-code) :
>>
>> if ( mavenSession.getVersion() > 2.0.9 && source == null)
>> {
>>    source = 1.5;
>> }
>> if ( mavenSession.getVersion() > 2.0.9 && target == null)
>> {
>>    target = 1.5;
>> }
>>
>
> -1, more complication than needed.
>
>
>>
>> For the same reason compiler 2.0.4 could default to 1.6 and so on.
>>
>
>
> There are lots of votes, change it and mark it loudly in the release notes.

+1 too.

>
>
>>
>> What's your opinion ?
>>
>> Nicolas
>>
>

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


Re: about MCOMPILER-80 (set compiler default to 1.5)

Posted by Brian Fox <br...@infinity.nu>.
On Thu, Jun 4, 2009 at 9:44 AM, nicolas de loof <ni...@apache.org> wrote:

> Hi,
> just an suggestion for a potential fix to
> http://jira.codehaus.org/browse/MCOMPILER-80
>
> as maven 2.0.9 fixes the plugin version in super POM, we can consider that
> - if maven 2.0.9 + is detected - any version of maven compiler > 2.0.2 (the
> one set in super-pom) has been set by the user. In such case, a 2.0.3
> version of the plugin cannot be there because of the LATEST rule and can
> break full backward compatility (according this is well documented in the
> release note and plugin documentation).



>
> So my idea would be to (pseudo-code) :
>
> if ( mavenSession.getVersion() > 2.0.9 && source == null)
> {
>    source = 1.5;
> }
> if ( mavenSession.getVersion() > 2.0.9 && target == null)
> {
>    target = 1.5;
> }
>

-1, more complication than needed.


>
> For the same reason compiler 2.0.4 could default to 1.6 and so on.
>


There are lots of votes, change it and mark it loudly in the release notes.


>
> What's your opinion ?
>
> Nicolas
>

Re: about MCOMPILER-80 (set compiler default to 1.5)

Posted by Benjamin Bentmann <be...@udo.edu>.
nicolas de loof wrote:

> So my idea would be to (pseudo-code) :
> 
> if ( mavenSession.getVersion() > 2.0.9 && source == null)
> {
>     source = 1.5;
> }

IMHO, making a default value a function of both the plugin version and 
the Maven version introduces unnecessary complexity to the code and 
confusion for users.

As a user, would you expect that by merely updating from Maven 2.0.9 to 
2.0.10, i.e. a point release, your maven-compiler-plugin, that you 
didn't update, changed it's behavior?

And even if we changed the "> 2.0.9" of the pseudo code to a minor 
update ">= 2.1.0", how would one communicate this behavior properly to 
the user? When I wanted to update my Maven installation, I check out the 
release notes of the Maven core. The solution you propose could 
introduce another change in people's builds that is beyond the core and 
as such not listed in the core's release notes, giving rise to surprises.

> For the same reason compiler 2.0.4 could default to 1.6 and so on.

Changing default values, especially for sensitive configuration 
parameters, should probably not happen in point releases.

> What's your opinion ?

+1 to just change the defaults for source&target to 1.5 in the next 
minor release 2.1 of the plugin. Backward-compat is surely nice but I 
wouldn't like to see future progress sacrificed for it. Also, even those 
bad builds that didn't lock down the plugin version will remain stable 
if users employ any recent Maven version (2.0.9 was released over a year 
ago).


Benjamin

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