You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Stephen Connolly <st...@gmail.com> on 2008/08/15 14:58:06 UTC

Re: Changing default compiler version for maven-compiler-plugin (outside pom.xml)

Have all your projects with a common parent.

In the common parent add a pluginManagement section that defines the
defaults for the compiler plugin.

On Fri, Aug 15, 2008 at 1:51 PM, monika7 <mo...@maco-tech.com> wrote:

>
> I know that current default for maven-compiler-plugin is java 1.3 and that
> I
> can override it in pom.xml file by adding source and target attributes to
> the plugin configuration.
> However I would prefer to override the default compiler version permanently
> without having to include the plugin in pom.xml.
> I don't see anything in the settings.xml that would allow me to do it. Is
> that possible and if yes, can someone suggest how to do it?
> --
> View this message in context:
> http://www.nabble.com/Changing-default-compiler-version-for--maven-compiler-plugin-%28outside-pom.xml%29-tp18998146p18998146.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Changing default compiler version for maven-compiler-plugin (outside pom.xml)

Posted by Benjamin Smith-Mannschott <bs...@gmail.com>.
On Aug 16, 2008, at 01:51, monika7 wrote:

>
> I didn't know that and always assumed that parent pom is used only for
> project nesting.

Yea.  So did I.  Figure 9.5 in _Maven Definitive Guide_ Beta 0.14 pg  
213 was enlightening.

>
> Where is parent pom file located (local maven repository?) and how  
> does the
> maven recognize it from the scope of child project. Can you  
> recommend a
> working example I could use as basis of my setup?
>

Well, I'll give an attempt at describing what I'm doing with one of my  
more trivial projects. I'd recommend _Maven Definitive Guide_ for  
further guidance.  Of the three maven books I've used, it's been the  
most helpful.  Virtually all of the pitifully little I understand  
about maven can be found there.  (Does anyone else get the feeling  
that learning maven is like climbing an endless mountain? I guess it's  
sort of like emacs that way...)

Well, In my case, I've got a project named "dinky" with four parts.   
"dinky_parent/pom.xml" looks like this:

<project ...>
   ...
   <groupId>at.gv.justiz.erv</groupId>
   <artifactId>dinky</artifactId>
   <packaging>pom</packaging>
   <version>1.1.4-SNAPSHOT</version>
   <name>Dinky</name>
   ...
</project>

dinky_core/pom.xml looks like this:

<project ...>
   ...
   <parent>
     <groupId>at.gv.justiz.erv</groupId>
     <artifactId>dinky</artifactId>
     <version>1.1.4-SNAPSHOT</version>
   </parent>
   <artifactId>dinky_core</artifactId>
   <packaging>jar</packaging>
   <name>Dinky Core</name>
   ...
</project>

Now, in my case dinky_parent also happens to be a multi-module build  
which refers to it's children.  That's just to make my life easier  
since it means reactor does the work of figuring out the order in  
which dinky's submodules should be built.

dinky_core and its parent don't have to be related at all.

Consider this little bit that I left out of dinky_parent/pom.xml above:

<project...>
   ...
   <parent>
     <groupId>at.gv.justiz.erv</groupId>
     <artifactId>erv-super-parent</artifactId>
     <version>2.0.1</version>
   </parent>

So dinky_core extends dinky_parent
dinky_parent extends erv-super-parent

erv-super-parent is a completely separate project in my svn  
repository. It's built and deployed separately.  When we build it's  
retrieved from our maven repository and cached in the local .m2  
repository.

>
>
> Stephen Connolly-2 wrote:
>>
>> actually the parent _does not have to be in the parent directory_
>>
>> in fact a number of people specifically recommend having the parent  
>> in
>> a different directory entirely
>>
>> Sent from my iPod
>>
>> On 15 Aug 2008, at 22:21, monika7 <mo...@maco-tech.com> wrote:
>>
>>>
>>> But that is not much different from having plugin configuration in  
>>> the
>>> project file.
>>> Besides, if I use parent pom file, don't I need to have physically  
>>> all
>>> children projects in subdirectories of the parent project? If that
>>> is the
>>> case, than this is not going to work for me, because I am trying to
>>> establish common environment for a development team that may work on
>>> unrelated projects.
>>>
>>> As far as I know, it is impossible to configure a plugin in
>>> settings.xml.
>>>
>>> Wouldn't be nice if the plugin were capable to pickup the compiler
>>> version
>>> based on e.g. JAVA_HOME variable?
>>>
>>>
>>>
>>> Stephen Connolly-2 wrote:
>>>>
>>>> Have all your projects with a common parent.
>>>>
>>>> In the common parent add a pluginManagement section that defines  
>>>> the
>>>> defaults for the compiler plugin.
>>>>
>>>> On Fri, Aug 15, 2008 at 1:51 PM, monika7 <mo...@maco-tech.com>
>>>> wrote:
>>>>
>>>>>
>>>>> I know that current default for maven-compiler-plugin is java 1.3
>>>>> and
>>>>> that
>>>>> I
>>>>> can override it in pom.xml file by adding source and target
>>>>> attributes to
>>>>> the plugin configuration.
>>>>> However I would prefer to override the default compiler version
>>>>> permanently
>>>>> without having to include the plugin in pom.xml.
>>>>> I don't see anything in the settings.xml that would allow me to do
>>>>> it. Is
>>>>> that possible and if yes, can someone suggest how to do it?
>>>>> --
>>>>> View this message in context:
>>>>> http://www.nabble.com/Changing-default-compiler-version-for--maven-compiler-plugin-%28outside-pom.xml%29-tp18998146p18998146.html
>>>>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>>>>
>>>>>
>>>>> ---
>>>>> ------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>>>> For additional commands, e-mail: users-help@maven.apache.org
>>>>>
>>>>>
>>>>
>>>>
>>>
>>> -- 
>>> View this message in context:
>>> http://www.nabble.com/Changing-default-compiler-version-for--maven-compiler-plugin-%28outside-pom.xml%29-tp18998146p19005153.html
>>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: users-help@maven.apache.org
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>>
>
> -- 
> View this message in context: http://www.nabble.com/Changing-default-compiler-version-for--maven-compiler-plugin-%28outside-pom.xml%29-tp18998146p19007162.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>


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


Re: Changing default compiler version for maven-compiler-plugin (outside pom.xml)

Posted by Anders Hammar <an...@hammar.net>.
For an example, please have a look at the parent pom for all Apache projects:
http://repo1.maven.org/maven2/org/apache/apache/4/apache-4.pom

This example does not specify anything regarding plugin management, but you
could do that for your scenario. Also, notice that it is located separated
from all Apache projects. Also notice that it is versioned a little bit
different (just v1, v2, v3, etc.). IMHO it is sufficient to use this kind of
versioning for a corporate parent pom (no need for major.minor[.bugfix]).

Regarding defining the compiler version in the settings.xml file, I would
strongly recommend against that (even if it would be possible). Builds would
then rely on the user's configuration to be correct. This kind of settings
should be in the pom.

/Anders


monika7 wrote:
> 
> I didn't know that and always assumed that parent pom is used only for
> project nesting.
> Where is parent pom file located (local maven repository?) and how does
> the maven recognize it from the scope of child project. Can you recommend
> a working example I could use as basis of my setup?
> 
> 
> 
> Stephen Connolly-2 wrote:
>> 
>> actually the parent _does not have to be in the parent directory_
>> 
>> in fact a number of people specifically recommend having the parent in  
>> a different directory entirely
>> 
>> Sent from my iPod
>> 
>> On 15 Aug 2008, at 22:21, monika7 <mo...@maco-tech.com> wrote:
>> 
>>>
>>> But that is not much different from having plugin configuration in the
>>> project file.
>>> Besides, if I use parent pom file, don't I need to have physically all
>>> children projects in subdirectories of the parent project? If that  
>>> is the
>>> case, than this is not going to work for me, because I am trying to
>>> establish common environment for a development team that may work on
>>> unrelated projects.
>>>
>>> As far as I know, it is impossible to configure a plugin in  
>>> settings.xml.
>>>
>>> Wouldn't be nice if the plugin were capable to pickup the compiler  
>>> version
>>> based on e.g. JAVA_HOME variable?
>>>
>>>
>>>
>>> Stephen Connolly-2 wrote:
>>>>
>>>> Have all your projects with a common parent.
>>>>
>>>> In the common parent add a pluginManagement section that defines the
>>>> defaults for the compiler plugin.
>>>>
>>>> On Fri, Aug 15, 2008 at 1:51 PM, monika7 <mo...@maco-tech.com>  
>>>> wrote:
>>>>
>>>>>
>>>>> I know that current default for maven-compiler-plugin is java 1.3  
>>>>> and
>>>>> that
>>>>> I
>>>>> can override it in pom.xml file by adding source and target  
>>>>> attributes to
>>>>> the plugin configuration.
>>>>> However I would prefer to override the default compiler version
>>>>> permanently
>>>>> without having to include the plugin in pom.xml.
>>>>> I don't see anything in the settings.xml that would allow me to do  
>>>>> it. Is
>>>>> that possible and if yes, can someone suggest how to do it?
>>>>> --
>>>>> View this message in context:
>>>>> http://www.nabble.com/Changing-default-compiler-version-for--maven-compiler-plugin-%28outside-pom.xml%29-tp18998146p18998146.html
>>>>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>>>>
>>>>>
>>>>> --- 
>>>>> ------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>>>> For additional commands, e-mail: users-help@maven.apache.org
>>>>>
>>>>>
>>>>
>>>>
>>>
>>> -- 
>>> View this message in context:
>>> http://www.nabble.com/Changing-default-compiler-version-for--maven-compiler-plugin-%28outside-pom.xml%29-tp18998146p19005153.html
>>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: users-help@maven.apache.org
>>>
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>> 
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Changing-default-compiler-version-for--maven-compiler-plugin-%28outside-pom.xml%29-tp18998146p19029582.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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


Re: Changing default compiler version for maven-compiler-plugin (outside pom.xml)

Posted by monika7 <mo...@maco-tech.com>.
I didn't know that and always assumed that parent pom is used only for
project nesting.
Where is parent pom file located (local maven repository?) and how does the
maven recognize it from the scope of child project. Can you recommend a
working example I could use as basis of my setup?



Stephen Connolly-2 wrote:
> 
> actually the parent _does not have to be in the parent directory_
> 
> in fact a number of people specifically recommend having the parent in  
> a different directory entirely
> 
> Sent from my iPod
> 
> On 15 Aug 2008, at 22:21, monika7 <mo...@maco-tech.com> wrote:
> 
>>
>> But that is not much different from having plugin configuration in the
>> project file.
>> Besides, if I use parent pom file, don't I need to have physically all
>> children projects in subdirectories of the parent project? If that  
>> is the
>> case, than this is not going to work for me, because I am trying to
>> establish common environment for a development team that may work on
>> unrelated projects.
>>
>> As far as I know, it is impossible to configure a plugin in  
>> settings.xml.
>>
>> Wouldn't be nice if the plugin were capable to pickup the compiler  
>> version
>> based on e.g. JAVA_HOME variable?
>>
>>
>>
>> Stephen Connolly-2 wrote:
>>>
>>> Have all your projects with a common parent.
>>>
>>> In the common parent add a pluginManagement section that defines the
>>> defaults for the compiler plugin.
>>>
>>> On Fri, Aug 15, 2008 at 1:51 PM, monika7 <mo...@maco-tech.com>  
>>> wrote:
>>>
>>>>
>>>> I know that current default for maven-compiler-plugin is java 1.3  
>>>> and
>>>> that
>>>> I
>>>> can override it in pom.xml file by adding source and target  
>>>> attributes to
>>>> the plugin configuration.
>>>> However I would prefer to override the default compiler version
>>>> permanently
>>>> without having to include the plugin in pom.xml.
>>>> I don't see anything in the settings.xml that would allow me to do  
>>>> it. Is
>>>> that possible and if yes, can someone suggest how to do it?
>>>> --
>>>> View this message in context:
>>>> http://www.nabble.com/Changing-default-compiler-version-for--maven-compiler-plugin-%28outside-pom.xml%29-tp18998146p18998146.html
>>>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>>>
>>>>
>>>> --- 
>>>> ------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>>> For additional commands, e-mail: users-help@maven.apache.org
>>>>
>>>>
>>>
>>>
>>
>> -- 
>> View this message in context:
>> http://www.nabble.com/Changing-default-compiler-version-for--maven-compiler-plugin-%28outside-pom.xml%29-tp18998146p19005153.html
>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Changing-default-compiler-version-for--maven-compiler-plugin-%28outside-pom.xml%29-tp18998146p19007162.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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


Re: Changing default compiler version for maven-compiler-plugin (outside pom.xml)

Posted by Stephen Connolly <st...@gmail.com>.
actually the parent _does not have to be in the parent directory_

in fact a number of people specifically recommend having the parent in  
a different directory entirely

Sent from my iPod

On 15 Aug 2008, at 22:21, monika7 <mo...@maco-tech.com> wrote:

>
> But that is not much different from having plugin configuration in the
> project file.
> Besides, if I use parent pom file, don't I need to have physically all
> children projects in subdirectories of the parent project? If that  
> is the
> case, than this is not going to work for me, because I am trying to
> establish common environment for a development team that may work on
> unrelated projects.
>
> As far as I know, it is impossible to configure a plugin in  
> settings.xml.
>
> Wouldn't be nice if the plugin were capable to pickup the compiler  
> version
> based on e.g. JAVA_HOME variable?
>
>
>
> Stephen Connolly-2 wrote:
>>
>> Have all your projects with a common parent.
>>
>> In the common parent add a pluginManagement section that defines the
>> defaults for the compiler plugin.
>>
>> On Fri, Aug 15, 2008 at 1:51 PM, monika7 <mo...@maco-tech.com>  
>> wrote:
>>
>>>
>>> I know that current default for maven-compiler-plugin is java 1.3  
>>> and
>>> that
>>> I
>>> can override it in pom.xml file by adding source and target  
>>> attributes to
>>> the plugin configuration.
>>> However I would prefer to override the default compiler version
>>> permanently
>>> without having to include the plugin in pom.xml.
>>> I don't see anything in the settings.xml that would allow me to do  
>>> it. Is
>>> that possible and if yes, can someone suggest how to do it?
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Changing-default-compiler-version-for--maven-compiler-plugin-%28outside-pom.xml%29-tp18998146p18998146.html
>>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>>
>>>
>>> --- 
>>> ------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: users-help@maven.apache.org
>>>
>>>
>>
>>
>
> -- 
> View this message in context: http://www.nabble.com/Changing-default-compiler-version-for--maven-compiler-plugin-%28outside-pom.xml%29-tp18998146p19005153.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>

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


Re: Changing default compiler version for maven-compiler-plugin (outside pom.xml)

Posted by monika7 <mo...@maco-tech.com>.
But that is not much different from having plugin configuration in the
project file. 
Besides, if I use parent pom file, don't I need to have physically all
children projects in subdirectories of the parent project? If that is the
case, than this is not going to work for me, because I am trying to
establish common environment for a development team that may work on
unrelated projects.

As far as I know, it is impossible to configure a plugin in settings.xml. 

Wouldn't be nice if the plugin were capable to pickup the compiler version
based on e.g. JAVA_HOME variable?



Stephen Connolly-2 wrote:
> 
> Have all your projects with a common parent.
> 
> In the common parent add a pluginManagement section that defines the
> defaults for the compiler plugin.
> 
> On Fri, Aug 15, 2008 at 1:51 PM, monika7 <mo...@maco-tech.com> wrote:
> 
>>
>> I know that current default for maven-compiler-plugin is java 1.3 and
>> that
>> I
>> can override it in pom.xml file by adding source and target attributes to
>> the plugin configuration.
>> However I would prefer to override the default compiler version
>> permanently
>> without having to include the plugin in pom.xml.
>> I don't see anything in the settings.xml that would allow me to do it. Is
>> that possible and if yes, can someone suggest how to do it?
>> --
>> View this message in context:
>> http://www.nabble.com/Changing-default-compiler-version-for--maven-compiler-plugin-%28outside-pom.xml%29-tp18998146p18998146.html
>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/Changing-default-compiler-version-for--maven-compiler-plugin-%28outside-pom.xml%29-tp18998146p19005153.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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


RE: Changing default compiler version for maven-compiler-plugin (outside pom.xml)

Posted by "Brian E. Fox" <br...@reply.infinity.nu>.
Yes, that's wrong. What you can do in your settings is specify the properties in the profile and the plugin will pick them up if they declare an expression. Otherwise you can pass the property to the config and provide a default in the pom. Then the settings value will supercede it.

-----Original Message-----
From: Trent Rosenbaum [mailto:trent.j.rosenbaum@gmail.com] 
Sent: Friday, August 15, 2008 6:59 AM
To: Maven Users List
Subject: Re: Changing default compiler version for maven-compiler-plugin (outside pom.xml)

I use the pom approach suggested, but the sonatype book shows an example of
configuring a plugin within the .m2/settings.xml in example 11.7 page 256 in
the book and 275 when viewed through adobe.  Is this wrong then?

Trent

On 15/08/2008, Stephen Connolly <st...@gmail.com> wrote:
>
> Profiles in settings.xml cannot have plugin configurations
>
> On Fri, Aug 15, 2008 at 2:07 PM, Trent Rosenbaum <
> trent.j.rosenbaum@gmail.com> wrote:
>
> > I was wondering if this might be a good case to use a profile that is
> > activated by default?
> > I was thinking that you could define the plugin within the development
> > profile and then configure the source and target elements as normal.
> > This profile could then be placed in the .m2/settings.xml file and would
> > cover all projects.
> >
> > Trent
> >
> >
> > On 15/08/2008, Stephen Connolly <st...@gmail.com> wrote:
> > >
> > > Have all your projects with a common parent.
> > >
> > > In the common parent add a pluginManagement section that defines the
> > > defaults for the compiler plugin.
> > >
> > > On Fri, Aug 15, 2008 at 1:51 PM, monika7 <mo...@maco-tech.com> wrote:
> > >
> > > >
> > > > I know that current default for maven-compiler-plugin is java 1.3 and
> > > that
> > > > I
> > > > can override it in pom.xml file by adding source and target
> attributes
> > to
> > > > the plugin configuration.
> > > > However I would prefer to override the default compiler version
> > > permanently
> > > > without having to include the plugin in pom.xml.
> > > > I don't see anything in the settings.xml that would allow me to do
> it.
> > Is
> > > > that possible and if yes, can someone suggest how to do it?
> > > > --
> > > > View this message in context:
> > > >
> > >
> >
> http://www.nabble.com/Changing-default-compiler-version-for--maven-compiler-plugin-%28outside-pom.xml%29-tp18998146p18998146.html
> > > > Sent from the Maven - Users mailing list archive at Nabble.com.
> > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > > For additional commands, e-mail: users-help@maven.apache.org
> > > >
> > > >
> > >
> >
>

Re: Changing default compiler version for maven-compiler-plugin (outside pom.xml)

Posted by Trent Rosenbaum <tr...@gmail.com>.
I use the pom approach suggested, but the sonatype book shows an example of
configuring a plugin within the .m2/settings.xml in example 11.7 page 256 in
the book and 275 when viewed through adobe.  Is this wrong then?

Trent

On 15/08/2008, Stephen Connolly <st...@gmail.com> wrote:
>
> Profiles in settings.xml cannot have plugin configurations
>
> On Fri, Aug 15, 2008 at 2:07 PM, Trent Rosenbaum <
> trent.j.rosenbaum@gmail.com> wrote:
>
> > I was wondering if this might be a good case to use a profile that is
> > activated by default?
> > I was thinking that you could define the plugin within the development
> > profile and then configure the source and target elements as normal.
> > This profile could then be placed in the .m2/settings.xml file and would
> > cover all projects.
> >
> > Trent
> >
> >
> > On 15/08/2008, Stephen Connolly <st...@gmail.com> wrote:
> > >
> > > Have all your projects with a common parent.
> > >
> > > In the common parent add a pluginManagement section that defines the
> > > defaults for the compiler plugin.
> > >
> > > On Fri, Aug 15, 2008 at 1:51 PM, monika7 <mo...@maco-tech.com> wrote:
> > >
> > > >
> > > > I know that current default for maven-compiler-plugin is java 1.3 and
> > > that
> > > > I
> > > > can override it in pom.xml file by adding source and target
> attributes
> > to
> > > > the plugin configuration.
> > > > However I would prefer to override the default compiler version
> > > permanently
> > > > without having to include the plugin in pom.xml.
> > > > I don't see anything in the settings.xml that would allow me to do
> it.
> > Is
> > > > that possible and if yes, can someone suggest how to do it?
> > > > --
> > > > View this message in context:
> > > >
> > >
> >
> http://www.nabble.com/Changing-default-compiler-version-for--maven-compiler-plugin-%28outside-pom.xml%29-tp18998146p18998146.html
> > > > Sent from the Maven - Users mailing list archive at Nabble.com.
> > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > > For additional commands, e-mail: users-help@maven.apache.org
> > > >
> > > >
> > >
> >
>

Re: Changing default compiler version for maven-compiler-plugin (outside pom.xml)

Posted by Stephen Connolly <st...@gmail.com>.
Profiles in settings.xml cannot have plugin configurations

On Fri, Aug 15, 2008 at 2:07 PM, Trent Rosenbaum <
trent.j.rosenbaum@gmail.com> wrote:

> I was wondering if this might be a good case to use a profile that is
> activated by default?
> I was thinking that you could define the plugin within the development
> profile and then configure the source and target elements as normal.
> This profile could then be placed in the .m2/settings.xml file and would
> cover all projects.
>
> Trent
>
>
> On 15/08/2008, Stephen Connolly <st...@gmail.com> wrote:
> >
> > Have all your projects with a common parent.
> >
> > In the common parent add a pluginManagement section that defines the
> > defaults for the compiler plugin.
> >
> > On Fri, Aug 15, 2008 at 1:51 PM, monika7 <mo...@maco-tech.com> wrote:
> >
> > >
> > > I know that current default for maven-compiler-plugin is java 1.3 and
> > that
> > > I
> > > can override it in pom.xml file by adding source and target attributes
> to
> > > the plugin configuration.
> > > However I would prefer to override the default compiler version
> > permanently
> > > without having to include the plugin in pom.xml.
> > > I don't see anything in the settings.xml that would allow me to do it.
> Is
> > > that possible and if yes, can someone suggest how to do it?
> > > --
> > > View this message in context:
> > >
> >
> http://www.nabble.com/Changing-default-compiler-version-for--maven-compiler-plugin-%28outside-pom.xml%29-tp18998146p18998146.html
> > > Sent from the Maven - Users mailing list archive at Nabble.com.
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: users-help@maven.apache.org
> > >
> > >
> >
>

Re: Changing default compiler version for maven-compiler-plugin (outside pom.xml)

Posted by Trent Rosenbaum <tr...@gmail.com>.
I personally would go with the common parent and the use of pluginManagment
element.  I guess the profile approach could be used if you were producing
different artifacts that worked with different java environments.

On 15/08/2008, Trent Rosenbaum <tr...@gmail.com> wrote:
>
> I was wondering if this might be a good case to use a profile that is
> activated by default?
> I was thinking that you could define the plugin within the development
> profile and then configure the source and target elements as normal.
> This profile could then be placed in the .m2/settings.xml file and would
> cover all projects.
>
> Trent
>
>
>  On 15/08/2008, Stephen Connolly <st...@gmail.com> wrote:
>>
>> Have all your projects with a common parent.
>>
>> In the common parent add a pluginManagement section that defines the
>> defaults for the compiler plugin.
>>
>> On Fri, Aug 15, 2008 at 1:51 PM, monika7 <mo...@maco-tech.com> wrote:
>>
>> >
>> > I know that current default for maven-compiler-plugin is java 1.3 and
>> that
>> > I
>> > can override it in pom.xml file by adding source and target attributes
>> to
>> > the plugin configuration.
>> > However I would prefer to override the default compiler version
>> permanently
>> > without having to include the plugin in pom.xml.
>> > I don't see anything in the settings.xml that would allow me to do it.
>> Is
>> > that possible and if yes, can someone suggest how to do it?
>> > --
>> > View this message in context:
>> >
>> http://www.nabble.com/Changing-default-compiler-version-for--maven-compiler-plugin-%28outside-pom.xml%29-tp18998146p18998146.html
>> > Sent from the Maven - Users mailing list archive at Nabble.com.
>> >
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> > For additional commands, e-mail: users-help@maven.apache.org
>> >
>> >
>>
>
>

Re: Changing default compiler version for maven-compiler-plugin (outside pom.xml)

Posted by Trent Rosenbaum <tr...@gmail.com>.
I was wondering if this might be a good case to use a profile that is
activated by default?
I was thinking that you could define the plugin within the development
profile and then configure the source and target elements as normal.
This profile could then be placed in the .m2/settings.xml file and would
cover all projects.

Trent


On 15/08/2008, Stephen Connolly <st...@gmail.com> wrote:
>
> Have all your projects with a common parent.
>
> In the common parent add a pluginManagement section that defines the
> defaults for the compiler plugin.
>
> On Fri, Aug 15, 2008 at 1:51 PM, monika7 <mo...@maco-tech.com> wrote:
>
> >
> > I know that current default for maven-compiler-plugin is java 1.3 and
> that
> > I
> > can override it in pom.xml file by adding source and target attributes to
> > the plugin configuration.
> > However I would prefer to override the default compiler version
> permanently
> > without having to include the plugin in pom.xml.
> > I don't see anything in the settings.xml that would allow me to do it. Is
> > that possible and if yes, can someone suggest how to do it?
> > --
> > View this message in context:
> >
> http://www.nabble.com/Changing-default-compiler-version-for--maven-compiler-plugin-%28outside-pom.xml%29-tp18998146p18998146.html
> > Sent from the Maven - Users mailing list archive at Nabble.com.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>