I concluded that this was a missing feature of maven-war-plugin, where it
simply wasn't looking to see if there were attached resources.

I supplied a simple patch to the handleArtifacts() method to have that
method also handle attached artifacts,  You can see the report here.
https://jira.codehaus.org/browse/MWAR-304

-Richard

-----Original Message-----
From: Richard Sand [mailto:[email protected]] 
Sent: Monday, August 19, 2013 6:19 PM
To: 'Maven Users List'
Subject: artifact attached by plugin not appearing in subsequent plugins

Hi all - I've been stuck for a while trying to get an artifact injected by a
plugin to apply to subsequent plugins/goals in a project.

I have a project which generates a web application. My use case here is the
obfuscator plugin which I wrote, which creates a jar file called
"<projectname>-small.jar". The plugin creates jar file using
MavenProjectHelper.attachArtifact(). The plugin executes during the
packaging phase, before the maven-war-plugin. The jar file is created
successfully, and the call to attachArtifact() returns with no errors, but
the maven-war-plugin does not "see" the jar file and therefore doesn't
include it in the results. When I turn on debugging I can see
maven-war-plugin copying the other project artifacts into
target/<projectname>/WEB-INF/lib.

Have I missed a step? I know I can explicitly configure maven-war-plugin to
grab the new artifact, but I thought the point of "attachArtifact" was to
inject the new artifact into the flow. 

Appreciate any insight into what I'm doing wrong...

Thanks!

-Richard




---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]




---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to