[ http://jira.codehaus.org/browse/MNG-1251?page=all ]
John Casey updated MNG-1251:
----------------------------
Description:
Use case: a project triggers a plugin which generates several files. I want to
put all these files in a zip file and install it when calling install.
So I bind my plugin to the package phase, I keep the project packaging as pom,
and then i tri to do soemthing like projectHelper.attachArtifact( project,
"zip", null, toFile ); in my execute() method
this fails in 2 places:
- empty or null classifier is disallowed by AttachedArtifact
- then AttachedArtifact inherits the parent's ArtifactHandler which then will
return "pom" as extension instead of "zip" (the type) .
Thus my artifact ends up being installed in finalName-forcedClassifier.pom
instead of finalName.zip...
Blocks my webstart plugin development,
Note that project.attachArtifact() looks empty...
was:
Use case: a project triggers a plugin which generates several files. I want to
put all these files in a zip file and install it when calling install.
So I bind my plugin to the package phase, I keep the project packaging as pom,
and then i tri to do soemthing like projectHelper.attachArtifact( project,
"zip", null, toFile ); in my execute() method
this fails in 2 places:
- empty or null classifier is disallowed by AttachedArtifact
- then AttachedArtifact inherits the parent's ArtifactHandler which then will
return "pom" as extension instead of "zip" (the type) .
Thus my artifact ends up being installed in finalName-forcedClassifier.pom
instead of finalName.zip...
Blocks my webstart plugin development,
Note that project.attachArtifact() looks empty...
Complexity: Expert (was: Intermediate)
Remaining Estimate: 1 hour
Original Estimate: 1 hour
Environment:
changed the MavenProjectHelper to lookup and pass the proper ArtifactHandler to
the AttachedArtifact constructor. Then, I changed the AttachedArtifact to only
delegate those methods that need to be kept up to date WRT the main artifact.
Wherever a method delegates instead of using its own data, I've disabled the
corresponding setter method by throwing UnsupportedOperationException that has
a message explaining why it's disabled.
> attachArtifact doesn't allow to attach an artifact with different type and no
> assembly
> --------------------------------------------------------------------------------------
>
> Key: MNG-1251
> URL: http://jira.codehaus.org/browse/MNG-1251
> Project: Maven 2
> Type: Bug
> Components: maven-project
> Versions: 2.0
> Reporter: Jerome Lacoste
> Assignee: John Casey
> Priority: Blocker
> Fix For: 2.0.1
> Attachments: MNG-1251_more_flexible_attach_artifact.diff
>
> Original Estimate: 1 hour
> Remaining: 1 hour
>
> Use case: a project triggers a plugin which generates several files. I want
> to put all these files in a zip file and install it when calling install.
> So I bind my plugin to the package phase, I keep the project packaging as
> pom, and then i tri to do soemthing like projectHelper.attachArtifact(
> project, "zip", null, toFile ); in my execute() method
> this fails in 2 places:
> - empty or null classifier is disallowed by AttachedArtifact
> - then AttachedArtifact inherits the parent's ArtifactHandler which then will
> return "pom" as extension instead of "zip" (the type) .
> Thus my artifact ends up being installed in finalName-forcedClassifier.pom
> instead of finalName.zip...
> Blocks my webstart plugin development,
> Note that project.attachArtifact() looks empty...
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]