Hi, On 11/7/05, Brett Porter (JIRA) <[EMAIL PROTECTED]> wrote: > we won't be allowing maven-model-2.0-all into the plugin, its v4 classes will > conflict with the root classloader. > What is needed is a way to get maven-model-3.0.1 into the plugin, really. > That may be best done by changing the artifact ID of that release.
should I manually create a bundle with a different artifactId and post it as a maven upload request in order to fix this or there is a better way? I would like to name the artifact "maven-model-v3-2.0" adding only the classes in the org.apache.maven.model.v3_0_0 package (I think it's better to mantain the same version used in the corresponding maven-model, in order to track where it came from). Is that ok? After doing this there is the plugin stuff: as I said in the jira item I created a simply plugin which read a v3 pom and write a v4 one, basically taking the PomV3ToV4Converter from repository tools and updating it to the actual pom v4 version (the existing one is pretty old and many things have changed). The plugin actually simply converts the pom, but I would like to add parsing of project.properties in order to add to the model basic plugin configurations (compiler, surefire...). I found this pretty useful while converting a bunch of maven 1 projects, and I think this could help many maven1 users willing to migrate to mvn. The question is: should this plugin to be added to the maven subversion and if so, how should it be named (I named it maven-maven1-plugin, so that the convert goal is called maven1:convert)? Or better add the new mojo to an existing plugin (I couldn't find a fitting one) or release it as a third party plugin (on mojo, mave.plugins.sf.net, ...)? thoughts? fabrizio On 11/7/05, Brett Porter (JIRA) <[EMAIL PROTECTED]> wrote: > [ http://jira.codehaus.org/browse/MNG-1436?page=comments#action_50148 ] > > Brett Porter commented on MNG-1436: > ----------------------------------- > > we won't be allowing maven-model-2.0-all into the plugin, its v4 classes will > conflict with the root classloader. > > What is needed is a way to get maven-model-3.0.1 into the plugin, really. > That may be best done by changing the artifact ID of that release. > > > 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 > > Type: Bug > > Components: maven-core > > Versions: 2.0 > > Reporter: fabrizio giustina > > Priority: Critical > > Fix For: 2.0.1 > > > > > > > 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? --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
