You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Michael Meyer <mi...@bluewin.ch> on 2006/03/22 22:43:56 UTC
[M2] Create Ant plugin from a Antlib build.xml file
Hi
I have created a build.xml file with antlib
(http://maven.apache.org/ant-tasks.html).
It looks something like this:
<project ... xmlns:artifact="urn:maven-artifact-ant">
<typedef resource="org/apache/maven/artifact/ant/antlib.xml" uri="urn:maven-artifact-ant">
<classpath>
<pathelement location="lib/maven-artifact-ant-2.0-2-dep.jar" />
</classpath>
</typedef>
<artifact:pom id="maven.project" file="pom.xml" />
<target name="version">
<echo>The version is ${maven.project.version}</echo>
</target>
</project>
Now I would like to create a maven 2 plugin from this build.xml file
(http://maven.apache.org/guides/plugin/guide-ant-plugin-development.html).
Can anybody tell me where I could place the
maven-artifact-ant-2.0-2-dep.jar so that the plugin finds it?
I tried adding it as a dependancy to the plugin, and I added it as a
dependancy to the project that calls the plugin
and i tried adding it to main/src/resources. Nothing worked. I always
get the classical ant error message that a library wasn't found...
Cheers, michael
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
[M2: ant-plugin-development] Is there a description of the basename.mojos.xml
file format?
Posted by Michael Meyer <mi...@bluewin.ch>.
Hi
I tried to fork a new lifecycle in my basename.mojos.xml file as
described on http://maven.apache.org/guides/plugin/guide-ant-plugin-development.html
But I couldn't find out where to put the <execute> tag. I always got a parse error.
Does anybody know where to put the <execute> tag or if there is a documentation
around for the mojos files?
Cheers, michael
Below is the hint that you find on the page:
<pluginMetadata>
<mojos>
<mojo>
.
.
.
<execute>
<lifecycle>my-custom-lifecycle</lifecycle>
<phase>package</phase>
<!-- OR -->
<goal>some:goal</goal>
</execute>
.
.
.
</mojo>
</mojos>
</pluginMetadata>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org