[ 
http://jira.codehaus.org/browse/MWEBSTART-148?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=240267#action_240267
 ] 

Benjamin Bentmann commented on MWEBSTART-148:
---------------------------------------------

Assuming the call to {{executedProject.getArtifacts()}} is really required 
(instead of getting the artifacts of the current/non-forked project), the 
plugin has to do dependency resolution on its own. Besides the Assembly and 
Dependency Plugin, other source pointers are the [Mojo Developer 
Cookbook|http://docs.codehaus.org/display/MAVENUSER/Mojo+Developer+Cookbook] 
and the {{DefaultPluginManager.resolveTransitiveDependencies()}} method from 
Maven 2.2.1.

> Fix dependency resolution/handling
> ----------------------------------
>
>                 Key: MWEBSTART-148
>                 URL: http://jira.codehaus.org/browse/MWEBSTART-148
>             Project: Maven 2.x Webstart Plugin
>          Issue Type: Bug
>          Components: jnlps
>    Affects Versions: 1.0-alpha-2
>            Reporter: Benjamin Bentmann
>
> From the plugin's source:
> {code:java}
>  * @requiresDependencyResolution runtime
>  */
> public class JnlpMojo
>     extends AbstractJnlpMojo
> {
>     /**
>      * Get the executed project from the forked lifecycle.
>      *
>      * @parameter expression="${executedProject}"
>      * @required
>      * @readonly
>      */
>     private MavenProject executedProject;
> {code}
> and later on in {{processDependencies()}} the equivalent of 
> {{executedProject.getArtifacts()}} is invoked.
> This design is flawed. The annotation {...@requiresdependencyresolution 
> runtime}} applies to the current project only, not the forked one. So when 
> {{executedProject.getArtifacts()}} is called, there is no guarantee that the 
> plugin actually grabs the runtime dependencies. Instead (in Maven 2.x), it 
> grabs the dependencies that have been resolved for the last plugin that 
> participated in the forked {{executedProject}} (see also MNG-3297).

-- 
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 from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to