You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Ashley Williams <as...@db.com> on 2007/10/05 17:04:02 UTC

maven properties

Hi,

Is it possible to specify pom properties in a properties file? I found a 
reference here: http://maven.apache.org/pom.html#Properties but this just 
refers to other ways of setting properties. I actually want to use a 
property for the version in my parent and child poms as they should all be 
the same. Also it's no good declaring that property in the parent pom - as 
they wouldn't be able to find it in the first place!

Thanks
- Ashley

---

This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and delete this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.

Please refer to http://www.db.com/en/content/eu_disclosures.htm for additional EU corporate and regulatory disclosures.

Re: maven properties

Posted by Ashley Williams <as...@db.com>.
Thanks, I'll give that plugin a go for some other piece of work we need 
doing.
As for the versioning problem, I got this to work:

1. Declare the version property in the parent pom.
2. In the child pom, add the project/parent/relativePath xml element. This 
introduces a source dependency on the parent pom (rather than binary via 
repository) which means that child can use all the parent properties.

Regards
- Ashley

Manos Batsis <ma...@geekologue.com> wrote on 05/10/2007 16:06:52:

> Ashley Williams wrote:
> > Is it possible to specify pom properties in a properties file? I found 
a 
> > reference here: http://maven.apache.org/pom.html#Properties but this 
just 
> > refers to other ways of setting properties. I actually want to use a 
> > property for the version in my parent and child poms as they should 
all be 
> > the same. Also it's no good declaring that property in the parent pom 
- as 
> > they wouldn't be able to find it in the first place!
> 
> I never managed to make stuff like this work (i.e. inheriting or 
> extending parent properties in child properties.
> 
> Regarding property files, google for maven-properties-plugin.
> 
> hth,
> 
> Manos
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 


---

This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and delete this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.

Please refer to http://www.db.com/en/content/eu_disclosures.htm for additional EU corporate and regulatory disclosures.

Re: maven properties

Posted by Manos Batsis <ma...@geekologue.com>.
Ashley Williams wrote:
> Is it possible to specify pom properties in a properties file? I found a 
> reference here: http://maven.apache.org/pom.html#Properties but this just 
> refers to other ways of setting properties. I actually want to use a 
> property for the version in my parent and child poms as they should all be 
> the same. Also it's no good declaring that property in the parent pom - as 
> they wouldn't be able to find it in the first place!

I never managed to make stuff like this work (i.e. inheriting or 
extending parent properties in child properties.

Regarding property files, google for maven-properties-plugin.

hth,

Manos

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


Re: maven properties

Posted by Tim Kettler <ti...@udo.edu>.
Hi,

Ashley Williams schrieb:
> Hi,
> 
> Is it possible to specify pom properties in a properties file? I found a 
> reference here: http://maven.apache.org/pom.html#Properties but this just 
> refers to other ways of setting properties. I actually want to use a 
> property for the version in my parent and child poms as they should all be 
> the same.

If you just want ensure that all children have the same version as the 
parent pom you just can let out the version tag in the child poms and 
they will inherit it from the parent.

Also it's no good declaring that property in the parent pom - as
> they wouldn't be able to find it in the first place!
> 
> Thanks
> - Ashley

-Tim

> ---
> 
> This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and delete this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.
> 
> Please refer to http://www.db.com/en/content/eu_disclosures.htm for additional EU corporate and regulatory disclosures.


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