You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Randy Kamradt <Ra...@jda.com> on 2008/11/25 16:49:07 UTC

pom properties

There has been some confusion in the past about accessing pom properties
using the ${} notation.  I know that to access the project version you
should use ${project.version}.  But for pom defined properties is the
project prefix required?  for instance, in a pom.xml:
 
<properties>
    <one>1</one>
</properties>
 
    ${project.one}
    or....
    ${one}
 
either seems to work, but is there a preferred method?

Re: pom properties

Posted by Gabriele Columbro <g....@sourcesense.com>.
I've noticed OS dependent effects in the expansion of such properties (I
often saw also 'pom.*' notation used)  .

The one which IMHO seems to always work is though:

${project.*}

HTH,
Gab


2008/11/25 Randy Kamradt <Ra...@jda.com>

> There has been some confusion in the past about accessing pom properties
> using the ${} notation.  I know that to access the project version you
> should use ${project.version}.  But for pom defined properties is the
> project prefix required?  for instance, in a pom.xml:
>
> <properties>
>    <one>1</one>
> </properties>
>
>    ${project.one}
>    or....
>    ${one}
>
> either seems to work, but is there a preferred method?
>



-- 
Gabriele Columbro
Alfresco ECM Product Strategy Consultant
+31 627 565 103
Sourcesense - Making sense of open Source

Re: pom properties

Posted by Brett Porter <br...@apache.org>.
${one} in that case, ${project.*} should be used to access the actual  
elements of the project.

- Brett

On 26/11/2008, at 2:49 AM, Randy Kamradt wrote:

> There has been some confusion in the past about accessing pom  
> properties
> using the ${} notation.  I know that to access the project version you
> should use ${project.version}.  But for pom defined properties is the
> project prefix required?  for instance, in a pom.xml:
>
> <properties>
>    <one>1</one>
> </properties>
>
>    ${project.one}
>    or....
>    ${one}
>
> either seems to work, but is there a preferred method?

--
Brett Porter
brett@apache.org
http://blogs.exist.com/bporter/


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