[ 
http://jira.codehaus.org/browse/MNG-3119?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_122340
 ] 

John Casey commented on MNG-3119:
---------------------------------

I'm applying this, with slight modification:

I'm turning the exception class into an unchecked exception, so it can bypass 
the calling Mojo stack frames and be intercepted by the DefaultPluginManager, 
which will wrap it as a PluginExecutionException. In trunk, this gives me a 
binding point for an error reporter. In 2.0.x, it means that the error will 
simply be reported as-is to the console. In both cases, the wrapped error 
should be reported in the MavenExecutionResult.

I can't think of a better solution right now than an unchecked exception, even 
though it's technically more of a configuration problem than a developer's 
problem (the typical domain for runtime exceptions, since they typically 
require code changes). We can't really change the throws clause of the 
MavenProjectHelper methods, since these will create compatibility problems that 
cannot be amended easily through an aspect (I think), and in any case this 
would cause major problems for porting the solution to the 2.0.9 codebase.

I'll also include tests before I commit.

> Duplicate attached artifacts should not be allowed.
> ---------------------------------------------------
>
>                 Key: MNG-3119
>                 URL: http://jira.codehaus.org/browse/MNG-3119
>             Project: Maven 2
>          Issue Type: Improvement
>          Components: General
>    Affects Versions: 2.0.7
>            Reporter: Paul Gier
>            Assignee: John Casey
>             Fix For: Reviewed Pending Version Assignment
>
>         Attachments: MNG-3119-maven-project-r558713.patch
>
>
> Currently, a project allows duplicate artifacts to be attached.  This causes 
> the second and other additional artifacts to overwrite the first attached 
> artifact.  This occurs during the package, install, and deploy phases.
> This can be reproduced by adding three instances of the source plugin (with 
> different ids) to a project build configuration.  The 2nd plugin will 
> overwrite the first, and the third will overwrite the second.
> The desired behaviour is that the user should receive a warning or error when 
> this happens.

-- 
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

        

Reply via email to