[ 
http://jira.codehaus.org/browse/MNG-4718?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Benjamin Bentmann closed MNG-4718.
----------------------------------

       Resolution: Fixed
    Fix Version/s: 3.0-beta-2
         Assignee: Benjamin Bentmann

Fixed in [r960855|http://svn.apache.org/viewvc?view=revision&revision=960855].

FYI, {{AttachedArtifact}} is an internal implementation class, you should be 
using {{MavenProjectHelper.attachArtifact()}} instead.

> [regression] Missing Class in 3.0-beta-1: 
> org.apache.maven.project.artifact.AttachedArtifact
> --------------------------------------------------------------------------------------------
>
>                 Key: MNG-4718
>                 URL: http://jira.codehaus.org/browse/MNG-4718
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Artifacts and Repositories
>    Affects Versions: 3.0-beta-1
>         Environment: C:\>mvn --version
> Apache Maven 3.0-beta-1 (r935667; 2010-04-20 03:00:39+1000)
> Java version: 1.5.0
> Java home: C:\SCT\Programs\SDP70\jdk\jre
> Default locale: en_AU, platform encoding: Cp1252
> OS name: "windows xp" version: "5.1 build 2600 service pack 3" arch: "x86" 
> Family: "dos"
>            Reporter: Chris Graham
>            Assignee: Benjamin Bentmann
>             Fix For: 3.0-beta-2
>
>         Attachments: build.log
>
>
> I have a custom plugin that I wrote to support WebSphere Message Broker BAR 
> files.
> It works fine under 2.0.9, 2.0.11 and 2.2.1. I tried it under 3.0-beta-1 and 
> got:
>         at 
> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:129)
>         ... 20 more
> Caused by: java.lang.NoClassDefFoundError: 
> org.apache.maven.project.artifact.AttachedArtifact
>         at 
> com.ibm.issw.maven.plugins.messagebroker.AbstractMessageBrokerMojo.addAttachedArtifact(AbstractMessageBrokerMojo.java:48)
>         at 
> com.ibm.issw.maven.plugins.messagebroker.GenerateDeploymentPackages.generateDeploymentPackages(GenerateDeploymentPackages.java:204)
>         at 
> com.ibm.issw.maven.plugins.messagebroker.GenerateDeploymentPackages.execute(GenerateDeploymentPackages.java:62)
>         at 
> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:105)
>         ... 20 more
> The code that is calling it is:
>     /**
>      * Add an additional file artefact to the Maven project.
>      * @param artefactFile The file to add.
>      * @param classifier A classifier.
>      * @param extension The file type extension.
>      */
>     protected void addAttachedArtifact(String artefactFile, String 
> classifier, final String extension)
>     {
>         Artifact artifact = new AttachedArtifact(project.getArtifact(), 
> project.getPackaging(), classifier, new DefaultArtifactHandler()
>         {
>             public String getExtension()
>             {
>                 return extension;
>             }
>         });
>         artifact.setFile(new File(artefactFile));
>         artifact.setResolved(true);
>         project.addAttachedArtifact(artifact);
>     }
> It's failing on the first line of the method (new AttachedArtifact()...).

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