You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Rahamim, Zvi (Zvi)" <zr...@avaya.com> on 2007/03/08 16:02:27 UTC

Load properties from file/url to pom.xml

Hi,
I know that inside pom.xml there is a section that I can define
properties.
Is there a way to load properties from a property file / url?
I need this because I have a couple of pom.xml files that should load
the same property file.
Thanks!

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


Re: RE: Load properties from file/url to pom.xml

Posted by Thorsten Heit <th...@gmx.de>.
> The problem is that the couple of pom.xml file already have different
> parents...

What prevents you to let these pom.xml files be children of a common pom.xml that contains your properties?


Cheers

Thorsten

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


RE: Load properties from file/url to pom.xml

Posted by "Rahamim, Zvi (Zvi)" <zr...@avaya.com>.
My problem is that the property file should be used by users that are in
different countries... 

-----Original Message-----
From: Wayne Fay [mailto:waynefay@gmail.com] 
Sent: Thursday, March 08, 2007 6:24 PM
To: Maven Users List
Subject: Re: Load properties from file/url to pom.xml

Since you can't use a shared parent, I'd go the settings.xml route then
with a single profile that you share between multiple projects.

You can activate multiple profiles during a build so I don't think this
will have any undesired effects on your process, and is probably the
best way forward for you.

Wayne

On 3/8/07, Rahamim, Zvi (Zvi) <zr...@avaya.com> wrote:
> The problem is that the couple of pom.xml file already have different 
> parents...
> Can you give me a hint of how to implement this?(I need that when 
> loading - before build time - the properties will be available) 
> Thanks!
>
> -----Original Message-----
> From: Wayne Fay [mailto:waynefay@gmail.com]
> Sent: Thursday, March 08, 2007 5:22 PM
> To: Maven Users List
> Subject: Re: Load properties from file/url to pom.xml
>
> The use of externally properties files was purposefully abandoned in
M2.
>
> In your case, I'd make a single shared parent pom and have the other 
> poms use it as their parent, so you will inherit the properties set in

> the parent. Or utilize profiles.xml or settings.xml to share the 
> properties.
>
> Otherwise, you will need to write a plugin to access the properties 
> file and read the contents etc.
>
> Wayne
>
> On 3/8/07, Rahamim, Zvi (Zvi) <zr...@avaya.com> wrote:
> > Hi,
> > I know that inside pom.xml there is a section that I can define 
> > properties.
> > Is there a way to load properties from a property file / url?
> > I need this because I have a couple of pom.xml files that should 
> > load the same property file.
> > Thanks!
> >
> > --------------------------------------------------------------------
> > - 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
>
>

---------------------------------------------------------------------
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: Load properties from file/url to pom.xml

Posted by Wayne Fay <wa...@gmail.com>.
Since you can't use a shared parent, I'd go the settings.xml route
then with a single profile that you share between multiple projects.

You can activate multiple profiles during a build so I don't think
this will have any undesired effects on your process, and is probably
the best way forward for you.

Wayne

On 3/8/07, Rahamim, Zvi (Zvi) <zr...@avaya.com> wrote:
> The problem is that the couple of pom.xml file already have different
> parents...
> Can you give me a hint of how to implement this?(I need that when
> loading - before build time - the properties will be available)
> Thanks!
>
> -----Original Message-----
> From: Wayne Fay [mailto:waynefay@gmail.com]
> Sent: Thursday, March 08, 2007 5:22 PM
> To: Maven Users List
> Subject: Re: Load properties from file/url to pom.xml
>
> The use of externally properties files was purposefully abandoned in M2.
>
> In your case, I'd make a single shared parent pom and have the other
> poms use it as their parent, so you will inherit the properties set in
> the parent. Or utilize profiles.xml or settings.xml to share the
> properties.
>
> Otherwise, you will need to write a plugin to access the properties file
> and read the contents etc.
>
> Wayne
>
> On 3/8/07, Rahamim, Zvi (Zvi) <zr...@avaya.com> wrote:
> > Hi,
> > I know that inside pom.xml there is a section that I can define
> > properties.
> > Is there a way to load properties from a property file / url?
> > I need this because I have a couple of pom.xml files that should load
> > the same property file.
> > Thanks!
> >
> > ---------------------------------------------------------------------
> > 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
>
>

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


RE: Load properties from file/url to pom.xml

Posted by "Rahamim, Zvi (Zvi)" <zr...@avaya.com>.
The problem is that the couple of pom.xml file already have different
parents...
Can you give me a hint of how to implement this?(I need that when
loading - before build time - the properties will be available)
Thanks!

-----Original Message-----
From: Wayne Fay [mailto:waynefay@gmail.com] 
Sent: Thursday, March 08, 2007 5:22 PM
To: Maven Users List
Subject: Re: Load properties from file/url to pom.xml

The use of externally properties files was purposefully abandoned in M2.

In your case, I'd make a single shared parent pom and have the other
poms use it as their parent, so you will inherit the properties set in
the parent. Or utilize profiles.xml or settings.xml to share the
properties.

Otherwise, you will need to write a plugin to access the properties file
and read the contents etc.

Wayne

On 3/8/07, Rahamim, Zvi (Zvi) <zr...@avaya.com> wrote:
> Hi,
> I know that inside pom.xml there is a section that I can define 
> properties.
> Is there a way to load properties from a property file / url?
> I need this because I have a couple of pom.xml files that should load 
> the same property file.
> Thanks!
> 
> ---------------------------------------------------------------------
> 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: Load properties from file/url to pom.xml

Posted by Wayne Fay <wa...@gmail.com>.
The use of externally properties files was purposefully abandoned in M2.

In your case, I'd make a single shared parent pom and have the other poms use it as their parent, so you will inherit the properties set in the parent. Or utilize profiles.xml or settings.xml to share the properties.

Otherwise, you will need to write a plugin to access the properties file and read the contents etc.

Wayne

On 3/8/07, Rahamim, Zvi (Zvi) <zr...@avaya.com> wrote:
> Hi,
> I know that inside pom.xml there is a section that I can define
> properties.
> Is there a way to load properties from a property file / url?
> I need this because I have a couple of pom.xml files that should load
> the same property file.
> Thanks!
> 
> ---------------------------------------------------------------------
> 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