You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Serge Bogatyrjov <se...@mail.ru> on 2005/11/10 12:51:27 UTC

referencing a property defined in pom.xml

Hi,


I have encountered with some problem. I am testing maven-antrun-plugin.
There is excerpt from my pom.xml:


    <build>
        <plugins>
            <plugin>
                <artifactId>maven-antrun-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>clean</phase>
                        <configuration>
                            <sourceRoot></sourceRoot>
                            <tasks>
                                <echo>${pom.name}</echo>
                                <echo>${pom.build}</echo>
                                <echo>${pom.build.directory}</echo>
                            </tasks>
                        </configuration>
                        <goals>
                            <goal>run</goal>
                        </goals>
                    </execution>


...and this is the output:


[INFO] [antrun:run {execution: clean-torque}]
[INFO] Executing tasks
     [echo] Maven Quick Start Archetype
     [echo] org.apache.maven.model.Build@1feca64
     [echo] ${pom.build.directory}
[INFO] Executed tasks


The reason is obvious. The property "pom.build" exists, but there is no
property "pom.build.directory", because "directory" is just a property
of an object stored with "pom.build" key. But is there any way "to
reference a property defined in pom.xml"?


Serge Bogatyrjov.


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