You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Christian Clauss <Ch...@ptv.de> on 2007/04/05 12:41:55 UTC
Property
Hi everybody.
I would like to acces a value defined in the pom.xml
<project>
<dependencies>
<dependency>
<version>"Here's the one I
want"</version>
</dependency>
</dependencies>
</project>
How can I access this value in the same pom.xml? I tried
${project.dependencies.dependency.version} but it didn't work.
Thanks a lot for your help.
Christian
Re: Property
Posted by franz see <fr...@gmail.com>.
Good day to you, Christian,
You cannot do that AFAIK. However, you can do something like this.
<project>
...
<dependencies>
<dependency>
...
<version>${some.var}</version>
</dependency>
</dependencies>
<properties>
<some.var>put version here</some.var>
</properties>
</project>
Then access that ${some.var} somewhere else in your pom.
Cheers,
Franz
Christian Clauss wrote:
>
> Hi everybody.
>
>
>
> I would like to acces a value defined in the pom.xml
>
>
>
> <project>
>
> <dependencies>
>
> <dependency>
>
> <version>"Here's the one I
> want"</version>
>
> </dependency>
>
> </dependencies>
>
> </project>
>
>
>
> How can I access this value in the same pom.xml? I tried
> ${project.dependencies.dependency.version} but it didn't work.
>
>
>
> Thanks a lot for your help.
>
>
>
> Christian
>
>
>
--
View this message in context: http://www.nabble.com/Property-tf3530846s177.html#a9855564
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org