You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Peter Anning <PA...@dialectsolutions.com> on 2006/08/29 07:40:49 UTC
maven-script-ant path id problem in the ant build file
Hi,
I am trying to build an Ant plugin for Maven 2. Having followed the Hello World example on the maven site and got everything working I now have the following problem in the real world. A path defined in the build.xml is not being created properly when calling from maven but works from Ant.
Maven 2.0.4
maven-script-ant 2.0.1
in my projectName.build.xml I define a path
<project>
<path id="dbmstools-jython-classpath">
<pathelement location="${library.jython-task.jar}" />
<pathelement location="${library.jython.jar}" />
</path>
...
<target name="print-build-properties">
<echo message="Jython Task Jar: ${library.jython-task.jar}"/>
<echo message="Main Jython Lib Jar: ${library.jython.jar}"/>
<property name="my-dbmstools-jython-classpath" refid="dbmstools-jython-classpath"/>
<echo message="Jython Classpath: ${my-dbmstools-jython-classpath}"/>
</target>
</project>
In my projectName.mojos.xml I define the parameters
<pluginMetadata>
<mojos>
<mojo>
...
<parameter>
<name>library.jython.jar</name>
<property>library.jython.jar</property>
<required>true</required>
<expression>${library.jython.jar}</expression>
<type>java.lang.String</type>
<description>The Jython Jar</description>
</parameter>
<parameter>
<name>library.jython-task.jar</name>
<property>library.jython-task.jar</property>
<required>true</required>
<expression>${library.jython-task.jar}</expression>
<type>java.lang.String</type>
<description>The Jython Task Jar</description>
</parameter>
The output from running the plugin is:
[echo] Jython Task Jar: E:\path\to\jython-task-0.3.8.jar
[echo] Main Jython Lib Jar: E:\path\to\jython-2.1.jar
[echo] Jython Classpath: E:\path\to\project\${library.jython-task.jar};E:\path\to\project\{library.jython.jar}
So its not picking up the correct path as input via the properties.
Running it from from ant works fine:
[echo] Jython Task Jar: E:\path\to\jython-task-0.3.8.jar
[echo] Main Jython Lib Jar: E:\path\to\jython-2.1.jar
[echo] Jython Classpath: E:\path\to\jython-task-0.3.8.jar;E:\path\to\jython-2.1.jar
I have searched and searched for help with this plugin but have found next to nothing. Anybody know what I can try or the best source of info.
Thanks and Regards
Peter Anning
Sr. Software Engineer