You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Nitko2 <ni...@gmail.com> on 2005/11/15 10:52:09 UTC
[m2] Can't read maven properties in ant file
Hi,
I'm calling ant tasks defined in external build.xml file but I can't read maven properties inside
build.xml.
pom.xml
--------
...
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>id1</id>
<phase>verify</phase>
<configuration>
<tasks>
<ant antfile="build.xml" dir="ant-scripts" target="obfuscate" inheritRefs="true"/>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
....
build.xml
----------
.......
<target name="init">
<echo message="******************"/>
<echo message="${project.version}"/>
<echo message="*******************"/>
</target>
........
ant output says that project.version property is not set and I get:
******************
${project.version}
******************
Any ideas?
Tahnks, Filip.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: [m2] Can't read maven properties in ant file
Posted by Brett Porter <br...@gmail.com>.
There is an open bug to implement this feature. Not possible at
present other than to manually set the properties you want first.
- brett
On 11/15/05, Nitko2 <ni...@gmail.com> wrote:
> Hi,
> I'm calling ant tasks defined in external build.xml file but I can't read maven properties inside
> build.xml.
>
> pom.xml
> --------
> ...
> <plugin>
> <artifactId>maven-antrun-plugin</artifactId>
> <executions>
> <execution>
> <id>id1</id>
> <phase>verify</phase>
>
> <configuration>
> <tasks>
> <ant antfile="build.xml" dir="ant-scripts" target="obfuscate" inheritRefs="true"/>
> </tasks>
> </configuration>
> <goals>
> <goal>run</goal>
> </goals>
> </execution>
> ....
>
>
> build.xml
> ----------
>
> .......
> <target name="init">
> <echo message="******************"/>
> <echo message="${project.version}"/>
> <echo message="*******************"/>
> </target>
> ........
>
> ant output says that project.version property is not set and I get:
> ******************
> ${project.version}
> ******************
>
>
> Any ideas?
>
> Tahnks, Filip.
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org