You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by juju <ju...@hcuge.ch> on 2006/04/26 18:01:05 UTC
[M2] xdoc pom properties
Hi,
Is it possible to use a property of pom in xdoc file ?
Pom
****
<properties>
<my.value>Scratch</my.value>
</properties>
xDoc
****
Hello $project.getProperties().get("my.value")
I can to use that in a velocity template, but I would like to do that in a
xdoc file.
thanks.
--
View this message in context: http://www.nabble.com/-M2-xdoc-pom-properties-t1512658.html#a4104278
Sent from the Maven - Users forum at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: [M2] xdoc pom properties
Posted by juju <ju...@hcuge.ch>.
thanks Jamie,
But I've tried this in a xdoc file and no result...
${pom.properties.value}
${project.properties.value}
$project.properties.get("value")
$pom.properties.value
$project.getProperties().get("value")
But in the velocity template of maven, these three methods are ok and return
Scratch :
$project.getProperties().get("value")
$project.properties.get("value")
$project.properties.value
Is there another method to substitute a value in xdoc file with a value in
the pom.xml or another value in a file.properties ?
--
View this message in context: http://www.nabble.com/-M2-xdoc-pom-properties-t1512658.html#a4127432
Sent from the Maven - Users forum at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: [M2] xdoc pom properties
Posted by Jamie Bisotti <jb...@gmail.com>.
On 4/26/06, juju <ju...@hcuge.ch> wrote:
>
>
> Hi,
>
> Is it possible to use a property of pom in xdoc file ?
>
> Pom
> ****
> <properties>
> <my.value>Scratch</my.value>
> </properties>
>
> xDoc
> ****
> Hello $project.getProperties().get("my.value")
>
> I can to use that in a velocity template, but I would like to do that in a
> xdoc file.
>
> thanks.
> --
> View this message in context:
> http://www.nabble.com/-M2-xdoc-pom-properties-t1512658.html#a4104278
> Sent from the Maven - Users forum at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
If the POM looked like this:
<properties>
<value>Scratch</value>
</properties>
I think ${pom.properties.value} would work; however, the period in "my.value"
may be problematic. I'm not totally sure though.
--
Jamie