Hi all,

I have followed the
http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html
to add custom packaging and artifact handler to my plugin.

In the ArtifactHandler configuration section I have defined:
        <extension>war</extension>
        <type>my-type</type>
        <packaging>war</packaging>
        <language>my-language</language>
        <addedToClasspath>false</addedToClasspath>

When binding my WAR mojo to the build lifecycle, i.e.

<package>com.acme:my-plugin:war</package>

then I get a build error with the following description:
"The packaging for this project did not assign a file to the build
artifact".

I tried to see what happens if I bind the Maven JAR mojo, i.e.
          <package>org.apache.maven.plugins:maven-jar-plugin:jar</package>

and changed the ArtifactHandler configuration section to:

        <extension>jar</extension>
        <type>my-type</type>
        <packaging>jar</packaging>
        <language>my-language</language>
        <addedToClasspath>false</addedToClasspath>


then I get a successful build but the extension type of the installed
artifact is not ".jar" but ".my-type". Why?!


Please help I am stuck!

In the lifecycle guide there is a line of Java code
[project.getArtifact().setFile( new File( "target/myFile-2.0.jar" ) );]
which must be executed by the packaging goal. I have built my mojos in
ANT -- how do I accomplish this with ANT code? (I tried the ANT's
<property name="project.artifact.file" value="my.war" /> but did not work)

...and TIA.
Adrian.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to