You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Carlos Alonso <ca...@unkasoft.com> on 2008/07/24 10:36:39 UTC
Variables in pom specified from external file
Hi all.
I've been searching along both google and mailing list archives without
answer and I'm thinking that there's no possibility to achieve what I want.
The question is: can I define some property for my pom.xml as a variable
i.e. <version>${version}</version> and have it set up from an external
properties file? (neither profile nor settings.xml)
I already know that, by filtering resources there's a chance to perform
this whithin resource files, but I don't know if I can do it in the pom.
Thanks in advance.
Carlos.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Variables in pom specified from external file
Posted by Jeff MAURY <je...@jeffmaury.com>.
You can define properties in your POM. Why do you need to use an external
file ?
Jeff MAURY
On 7/24/08, Carlos Alonso <ca...@unkasoft.com> wrote:
>
> Hi all.
>
> I've been searching along both google and mailing list archives without
> answer and I'm thinking that there's no possibility to achieve what I want.
>
> The question is: can I define some property for my pom.xml as a variable
> i.e. <version>${version}</version> and have it set up from an external
> properties file? (neither profile nor settings.xml)
> I already know that, by filtering resources there's a chance to perform
> this whithin resource files, but I don't know if I can do it in the pom.
>
> Thanks in advance.
> Carlos.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
--
La mélancolie c'est communiste
Tout le monde y a droit de temps en temps
La mélancolie n'est pas capitaliste
C'est même gratuit pour les perdants
La mélancolie c'est pacifiste
On ne lui rentre jamais dedans
La mélancolie oh tu sais ça existe
Elle se prend même avec des gants
La mélancolie c'est pour les syndicalistes
Il faut juste sa carte de permanent
Miossec (2006)
http://www.jeffmaury.com
http://riadiscuss.jeffmaury.com
http://www.lastfm.fr/listen/user/jeffmaury/personal
Re: Variables in pom specified from external file
Posted by Stephen Connolly <st...@gmail.com>.
It can never work for project/version or for project/parent/version as they
need to be defined even before the initialize phase
On Thu, Jul 24, 2008 at 10:15 AM, Manuel EVENO <ma...@gmail.com>
wrote:
> I once use maven-property-plugin
> http://arsenalist.com/2007/02/07/maven-properties-plugin-download/
>
> but I don't if it works for project/version ...
>
> On Thu, Jul 24, 2008 at 10:47 AM, Stephen Connolly <
> stephen.alan.connolly@gmail.com> wrote:
>
> > Property expansion in ./project/version and /project/parent/version is
> not
> > supported by Maven 2 (and AFAIK will never be supported as it makes
> builds
> > irreproducible)
> >
> > Yes, I know that it currently kinda works if you remember to define the
> > property in the command line or settings.xml... but it is not officially
> > supported
> >
> > -Stephen
> >
> > On Thu, Jul 24, 2008 at 9:36 AM, Carlos Alonso <ca...@unkasoft.com>
> > wrote:
> >
> > > Hi all.
> > >
> > > I've been searching along both google and mailing list archives without
> > > answer and I'm thinking that there's no possibility to achieve what I
> > want.
> > >
> > > The question is: can I define some property for my pom.xml as a
> variable
> > > i.e. <version>${version}</version> and have it set up from an external
> > > properties file? (neither profile nor settings.xml)
> > > I already know that, by filtering resources there's a chance to perform
> > > this whithin resource files, but I don't know if I can do it in the
> pom.
> > >
> > > Thanks in advance.
> > > Carlos.
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: users-help@maven.apache.org
> > >
> > >
> >
>
Re: Variables in pom specified from external file
Posted by Manuel EVENO <ma...@gmail.com>.
I once use maven-property-plugin
http://arsenalist.com/2007/02/07/maven-properties-plugin-download/
but I don't if it works for project/version ...
On Thu, Jul 24, 2008 at 10:47 AM, Stephen Connolly <
stephen.alan.connolly@gmail.com> wrote:
> Property expansion in ./project/version and /project/parent/version is not
> supported by Maven 2 (and AFAIK will never be supported as it makes builds
> irreproducible)
>
> Yes, I know that it currently kinda works if you remember to define the
> property in the command line or settings.xml... but it is not officially
> supported
>
> -Stephen
>
> On Thu, Jul 24, 2008 at 9:36 AM, Carlos Alonso <ca...@unkasoft.com>
> wrote:
>
> > Hi all.
> >
> > I've been searching along both google and mailing list archives without
> > answer and I'm thinking that there's no possibility to achieve what I
> want.
> >
> > The question is: can I define some property for my pom.xml as a variable
> > i.e. <version>${version}</version> and have it set up from an external
> > properties file? (neither profile nor settings.xml)
> > I already know that, by filtering resources there's a chance to perform
> > this whithin resource files, but I don't know if I can do it in the pom.
> >
> > Thanks in advance.
> > Carlos.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>
Re: Variables in pom specified from external file
Posted by Stephen Connolly <st...@gmail.com>.
Property expansion in ./project/version and /project/parent/version is not
supported by Maven 2 (and AFAIK will never be supported as it makes builds
irreproducible)
Yes, I know that it currently kinda works if you remember to define the
property in the command line or settings.xml... but it is not officially
supported
-Stephen
On Thu, Jul 24, 2008 at 9:36 AM, Carlos Alonso <ca...@unkasoft.com> wrote:
> Hi all.
>
> I've been searching along both google and mailing list archives without
> answer and I'm thinking that there's no possibility to achieve what I want.
>
> The question is: can I define some property for my pom.xml as a variable
> i.e. <version>${version}</version> and have it set up from an external
> properties file? (neither profile nor settings.xml)
> I already know that, by filtering resources there's a chance to perform
> this whithin resource files, but I don't know if I can do it in the pom.
>
> Thanks in advance.
> Carlos.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>