You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Gaurav Kushwaha <ga...@gmail.com> on 2005/06/28 02:46:31 UTC
Multiproject property overriding.
Hi have a multiproject and multiple sub projects. I have a property
that is defined in each sub project. But occasionally I want to
override it by changing it only in the master project's
project.properties.
So essentially I have "project.version" property in each project's
project.properties file. And I want to override that property in all
the projects just by making that change in the master project's
project.properties file.
Is it possible ? I tried doing it. Wasn't able to.
Will appreciate any help.
Thanks,
Gaurav.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Multiproject property overriding.
Posted by Gaurav Kushwaha <ga...@gmail.com>.
But the point of contention here is the properties specified in
${basedir1}/project.properties and ${basedir2}/build.properties where
${basedir1} is the project root of the sub project and ${basedir2} is
the root of the multiproject project root. My pic was that
${basedir2}/build.properties should override the properties mentioned
in earlier file.
Thanks,
Gaurav.
On 6/28/05, Trygve Laugstøl <tr...@apache.org> wrote:
> On Tue, Jun 28, 2005 at 01:19:09PM +0100, Adam Hardy wrote:
> > Edwin Punzalan on 28/06/05 10:57, wrote:
> > >I will be quoting the maven site:
> > >http://maven.apache.org/reference/properties.html
> > >
> > >The properties files in Maven are processed in the following order:
> > >
> > > 1. Built-in properties are processed
> > > 2. |${basedir}/project.properties| (|basedir| is replaced by the
> > > directory where the |project.xml| file in use resides)
> > > 3. |${basedir}/build.properties|
> > > 4. |${user.home}/build.properties|
> > > 5. System properties
> >
> > I always wanted to know: what's the purpose of having project.properties
> > AND build.properties? Is it purely for ease of conversion from ant?
>
> build.properties are for user specific overrides and are typically not
> stored in your SCM (eg: cvs, svn) while project.properties are.
>
> http://maven.apache.org/reference/properties.html
>
> --
> Trygve
>
>
> BodyID:18190599.2.n.logpart (stored separately)
>
>
--
http://www.gauravkushwaha.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Multiproject property overriding.
Posted by Trygve Laugstøl <tr...@apache.org>.
On Tue, Jun 28, 2005 at 01:19:09PM +0100, Adam Hardy wrote:
> Edwin Punzalan on 28/06/05 10:57, wrote:
> >I will be quoting the maven site:
> >http://maven.apache.org/reference/properties.html
> >
> >The properties files in Maven are processed in the following order:
> >
> > 1. Built-in properties are processed
> > 2. |${basedir}/project.properties| (|basedir| is replaced by the
> > directory where the |project.xml| file in use resides)
> > 3. |${basedir}/build.properties|
> > 4. |${user.home}/build.properties|
> > 5. System properties
>
> I always wanted to know: what's the purpose of having project.properties
> AND build.properties? Is it purely for ease of conversion from ant?
build.properties are for user specific overrides and are typically not
stored in your SCM (eg: cvs, svn) while project.properties are.
http://maven.apache.org/reference/properties.html
--
Trygve
Re: Multiproject property overriding.
Posted by Adam Hardy <ad...@cyberspaceroad.com>.
Edwin Punzalan on 28/06/05 10:57, wrote:
> I will be quoting the maven site:
> http://maven.apache.org/reference/properties.html
>
> The properties files in Maven are processed in the following order:
>
> 1. Built-in properties are processed
> 2. |${basedir}/project.properties| (|basedir| is replaced by the
> directory where the |project.xml| file in use resides)
> 3. |${basedir}/build.properties|
> 4. |${user.home}/build.properties|
> 5. System properties
I always wanted to know: what's the purpose of having project.properties
AND build.properties? Is it purely for ease of conversion from ant?
Adam
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Multiproject property overriding.
Posted by Edwin Punzalan <ep...@exist.com>.
I will be quoting the maven site:
http://maven.apache.org/reference/properties.html
........
The properties files in Maven are processed in the following order:
1. Built-in properties are processed
2. |${basedir}/project.properties| (|basedir| is replaced by the
directory where the |project.xml| file in use resides)
3. |${basedir}/build.properties|
4. |${user.home}/build.properties|
5. System properties
........
The last definition takes precedence, so |${user.home}/build.properties|
will override anything specified in a project, and properties given on
the command line using |-D| will override everything.
........
Gaurav Kushwaha wrote:
>Shouldn't build.properties in master project override the properties
>specified in the individual project's project.properties ?
>
>Thanks,
>Gaurav.
>
>On 6/28/05, Edwin Punzalan <ep...@exist.com> wrote:
>
>
>>Try using the -D option in the command line... that will override all
>>properties in all properties file. ;)
>>
>>
>>Gaurav Kushwaha wrote:
>>
>>
>>
>>>Hi have a multiproject and multiple sub projects. I have a property
>>>that is defined in each sub project. But occasionally I want to
>>>override it by changing it only in the master project's
>>>project.properties.
>>>So essentially I have "project.version" property in each project's
>>>project.properties file. And I want to override that property in all
>>>the projects just by making that change in the master project's
>>>project.properties file.
>>>Is it possible ? I tried doing it. Wasn't able to.
>>>Will appreciate any help.
>>>
>>>Thanks,
>>>Gaurav.
>>>
>>>---------------------------------------------------------------------
>>>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
>>
>>
>>
>>
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Multiproject property overriding.
Posted by Gaurav Kushwaha <ga...@gmail.com>.
Shouldn't build.properties in master project override the properties
specified in the individual project's project.properties ?
Thanks,
Gaurav.
On 6/28/05, Edwin Punzalan <ep...@exist.com> wrote:
> Try using the -D option in the command line... that will override all
> properties in all properties file. ;)
>
>
> Gaurav Kushwaha wrote:
>
> >Hi have a multiproject and multiple sub projects. I have a property
> >that is defined in each sub project. But occasionally I want to
> >override it by changing it only in the master project's
> >project.properties.
> >So essentially I have "project.version" property in each project's
> >project.properties file. And I want to override that property in all
> >the projects just by making that change in the master project's
> >project.properties file.
> >Is it possible ? I tried doing it. Wasn't able to.
> >Will appreciate any help.
> >
> >Thanks,
> >Gaurav.
> >
> >---------------------------------------------------------------------
> >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
>
>
--
http://www.gauravkushwaha.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Multiproject property overriding.
Posted by Edwin Punzalan <ep...@exist.com>.
Try using the -D option in the command line... that will override all
properties in all properties file. ;)
Gaurav Kushwaha wrote:
>Hi have a multiproject and multiple sub projects. I have a property
>that is defined in each sub project. But occasionally I want to
>override it by changing it only in the master project's
>project.properties.
>So essentially I have "project.version" property in each project's
>project.properties file. And I want to override that property in all
>the projects just by making that change in the master project's
>project.properties file.
>Is it possible ? I tried doing it. Wasn't able to.
>Will appreciate any help.
>
>Thanks,
>Gaurav.
>
>---------------------------------------------------------------------
>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