[ http://jira.codehaus.org/browse/MNG-1436?page=all ]

Jason van Zyl updated MNG-1436:
-------------------------------

    Affects Version/s:     (was: 2.0)
        Fix Version/s:     (was: 2.1.x)

> Unable to load maven-model-2.0-all from a plugin
> ------------------------------------------------
>
>                 Key: MNG-1436
>                 URL: http://jira.codehaus.org/browse/MNG-1436
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Plugins and Lifecycle
>            Reporter: fabrizio giustina
>            Priority: Critical
>
> The org.apache.maven:maven-model artifact is available with the "all" 
> classifier in the maven repo. The "all" version also contains project v3 
> classes and reader/writer.
> Adding a dependency with:
> <dependency>
>       <groupId>org.apache.maven</groupId>
>       <artifactId>maven-model</artifactId>
>       <version>2.0</version>
>       <type>jar</type>
>       <classifier>all</classifier>
> </dependency>
> let you use project 3 classes in a plugin and install successfully.
> However, when running the plugin, the maven-model-2.0-all artifact seems to 
> be ignored and replaced by the version in m2/lib _also if the classifier is 
> different_.
> This is the debug log from an execution of a plugin that uses this dependency:
> [INFO] Searching repository for plugin with prefix: 'maven1'.
> [DEBUG] maven-maven1-plugin: using locally installed snapshot
> [DEBUG] maven-maven1-plugin: using locally installed snapshot
> [DEBUG] 
> org.apache.maven.plugins:maven-maven1-plugin:maven-plugin:2.0-SNAPSHOT 
> (selected for runtime)
> [DEBUG]   org.codehaus.plexus:plexus-utils:jar:1.0.4 (selected for runtime)
> [DEBUG] Retrieving parent-POM from the repository for project: 
> org.apache.maven:maven-model:jar:2.0
> [DEBUG]   org.apache.maven:maven-model:jar:all:2.0 (selected for runtime)
> [DEBUG]     org.codehaus.plexus:plexus-utils:jar:1.0.4 (selected for runtime)
> [DEBUG]   dom4j:dom4j:jar:1.4 (selected for runtime)
> [DEBUG] Configuring mojo 
> 'org.apache.maven.plugins:maven-maven1-plugin:2.0-SNAPSHOT:convert' -->
> [DEBUG]   (f) basedir = \testconvert 
> [DEBUG] -- end configuration --
> [INFO] [1:convert]
> [WARNING] pom.xml in \testconvert already exists, overwriting
> [INFO] 
> ----------------------------------------------------------------------------
> [ERROR] FATAL ERROR
> [INFO] 
> ----------------------------------------------------------------------------
> [INFO] org/apache/maven/model/v3_0_0/io/xpp3/MavenXpp3Reader
> [INFO] 
> ----------------------------------------------------------------------------
> [DEBUG] Trace
> java.lang.NoClassDefFoundError: 
> org/apache/maven/model/v3_0_0/io/xpp3/MavenXpp3Reader
> At the moment this makes impossible to use pom v.3 in mvn.
> Apart from the classifier issue that could be solved in a future m2 release, 
> I would like to find out a workaroud in order to use v3 poms for a mvn plugin 
> that could automatically convert maven 1 project.xml to mvn pom.xml for 
> making migration from maven 1 easier.
> The current options I can think at are:
> - embedding the org.apache.maven.model.v3_0_0.* classes in the plugin
> - releasing maven-model-2.0-all with a different artifactId 
> (maven-model-all-2.0 or maven-model-v3-2.0)
> thoughts?

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