On 26 November 2013 15:59, Malte Skoruppa <[email protected]>wrote:

> Hi,
>
> thanks for your quick answer.
>
>
>
>
>>  Generally, I don't want to do that. On the one hand, I would like for
>>> Maven to simply use the latest version of the maven-compiler-plugin that
>>> is
>>> available (the default behaviour).
>>>
>> Not the default behaviour any more.... at least since 2.0.9 IIRC... the
>> "core" plugins all have a version specified in the über-pom that is
>> embedded within Maven. Thus if you do not specify a version, you get the
>> version specified in the über-pom... for non-core plugins you will get the
>> latest, but your build is now irreproducible. Best practice is to specify
>> the version for all plugins.
>>
>
> Yes, I can see how specifying a version of the maven-compiler-plugin to
> use would be a good thing to do in order to make the build reproducible.
> It's a "never change a winning team" sort of paradigm, and one I'm not
> opposed to at all. Yet, please do note that the generated pom.xml from the
> archetype maven-archetype-quickstart does *not* specify a
> maven-compiler-plugin version to use. So does this imply that the
> maven-archetype-quickstart archetype actually does not conform to the "best
> practice" to do things?
>
> So, maybe I wasn't entirely clear. What really kind of surprises me is not
> that I have to specify a maven-compiler-plugin version per se. What
> suprises me is more this "if you configure this, you also have to configure
> that" thing. If I only want to change the default configuration w.r.t. the
> Java version I would like to use, why do I also have to change the default
> configuration w.r.t. the maven-compiler-plugin version I want to use?
>
>
>
>
>  I would imagine that this is not such a rare scenario:
>>> (1) I do want to use Java features higher than those available in Java
>>> 1.3;
>>>
>>>  Then set source and target to 1.3... and hope you never upgrade to Java
>> 8
>>
>
> Uh, sorry, but... did you read my question? I want to use Java features
> HIGHER than 1.3. So why would I set source to 1.3? That is the opposite of
> what I want. And what does this have to do with Java 8?


I read that as you wanting to only use features of Java 1.3 (madness I say)
which will break once you have Java 8 as its javac will only support down
to -source 1.6 IIRC (but it may be 1.5)

I think it is current and two back that is the new policy that is being
introduced from Java 8 onwards...


>
>
>
>
>>  (2) I do *not* want having to monitor the maven-compiler-plugin by myself
>>> all the time in order to check for updates and keep my pom.xml referring
>>> to
>>> the currently latest version;
>>>
>>>  Incompatible goal. If you have a version of the compiler plugin that is
>> working. Leave it as is. If it isn't broken, don't fix it. If you decide
>> that it is broken (e.g. you think the version you have is not compiling
>> fast enough) then try upgrading... this way you have control over your
>> build
>>
>
> My question is precisely *why* this goal is incompatible. You see, I am
> allowed to not specify the maven-compiler-plugin version when I'm happy
> with the default Java version. But as soon as I decide that I want to use
> another Java version, I have to commit on a maven-compiler-plugin version.
> That is suprising, is it not? :)
>
>
>
>>  (3) yet I do *not* want Maven complaining about my project.xml being
>>> malformed either.
>>>
>>>  Specify the version, or live with Maven complaining.
>>
>> The Maven way is to make doing "the right thing" easy... doing the "not so
>> right thing" should encounter some friction... but unless we have good
>> reason we should not prevent you from shooting your foot off... we can
>> make
>> it difficult to aim the gun at your foot though!
>>
>
> So what you're saying is that the maven-archetype-quickstart archetype
> does a "not so right thing" since it does not specify a
> maven-compiler-plugin version in its POM?
>
>
> Thanks,
>
> Malte
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to