Kenney Westerhof wrote:
On Thu, 25 May 2006, Dennis Lundberg wrote:
<snip>
I couldn't find a JIRA-project for either M2-sandbox or
M2-sandbox-plugins. Some of the plugins in the sandbox have their own
JIRA-project set up, but most of them haven't. Where should I should
attach my patches? Should I put them on MONE or MNG or ...
There's a component 'Sandbox' in the MNG project where you can attach your
patches for maven-maven1-plugin.
Thanks! The first patch is in MNG-2320.
I'm working on the second one now and have stumbled upon a small
problem. The plugin has been changed to use maven-model-converter
instead of the bundled class. The new converter is better that the
bundled one, in that it converts an M1 plugin entry into an M2
build/plugin entry.
The first time around the conversion works fine. On the second run the
conversion can fail. The project.xml file [1] that I am using for
testing uses the maven-cobertura-plugin. This is an M1 only plugin.
There is a M2 version, but that one is over at mojo and is called
cobertura-maven-plugin.
When the maven-maven1-plugin is run and there is a pom.xml in the same
folder it downloads the M1 pom for maven-cobertura-plugin and puts it in
my local M2 repo. This leads to a build error before maven-maven1-plugin
has even started working. See stack trace below.
Is there any way to make a mojo or plugin force Maven core to not do
anything with any existing pom.xml? The convert mojo in
maven-maven1-plugin has set
@goal convert
@requiresProject false
I also tried to add
@phase validate
to make it jump in as early as possible in the life cycle, but that
didn't work.
[1]http://svn.apache.org/viewvc/jakarta/commons/proper/collections/trunk/project.xml?content-type=text%2Fplain&view=co
+ Error stacktraces are turned on.
Maven version: 2.0.4
[DEBUG] Building Maven user-level plugin registry from: 'C:\Documents
and Settings\dlg01\.m2\plugin-registry.xml'
[DEBUG] Building Maven global-level plugin registry from:
'c:\program\maven-2.0.4\conf\plugin-registry.xml'
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'maven1'.
[DEBUG] maven-surefire-plugin: resolved to version 2.0 from repository
central
[DEBUG] Retrieving parent-POM:
org.apache.maven.plugins:maven-plugin-parent::2.0 for project:
null:maven-surefire-plugin:maven-plugin:2.0 from the repositor
y.
[DEBUG] Trying repository central
Downloading:
http://maven.sateh.com/repository/maven-plugins/maven-cobertura-plugin/1.1.1/maven-cobertura-plugin-1.1.1.pom
6K downloaded
[DEBUG] Artifact resolved
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Error building POM (may not be this project's POM).
Project ID: maven-plugins:maven-cobertura-plugin
POM Location: C:\Documents and
Settings\dlg01\.m2\repository\maven-plugins\maven-cobertura-plugin\1.1.1\maven-cobertura-plugin-1.1.1.pom
Reason: Not a v4.0.0 POM.
[INFO]
------------------------------------------------------------------------
[DEBUG] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Unable to build
project for plugin 'maven-plugins:maven-cobertura-plugin': Not a v4.0.0 POM.
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyPlugin(DefaultLifecycleExecutor.java:1269)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.getMojoDescriptor(DefaultLifecycleExecutor.java:1464)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.segmentTaskListByAggregationNeeds(DefaultLifecycleExecutor.java:381)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:135)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at
org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.InvalidPluginException: Unable to
build project for plugin 'maven-plugins:maven-cobertura-plugin': Not a
v4.0.0 POM.
at
org.apache.maven.plugin.DefaultPluginManager.checkRequiredMavenVersion(DefaultPluginManager.java:265)
at
org.apache.maven.plugin.DefaultPluginManager.verifyVersionedPlugin(DefaultPluginManager.java:183)
at
org.apache.maven.plugin.DefaultPluginManager.verifyPlugin(DefaultPluginManager.java:163)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyPlugin(DefaultLifecycleExecutor.java:1252)
... 14 more
Caused by: org.apache.maven.project.InvalidProjectModelException: Not a
v4.0.0 POM.
at
org.apache.maven.project.DefaultMavenProjectBuilder.readModel(DefaultMavenProjectBuilder.java:1299)
at
org.apache.maven.project.DefaultMavenProjectBuilder.readModel(DefaultMavenProjectBuilder.java:1270)
at
org.apache.maven.project.DefaultMavenProjectBuilder.findModelFromRepository(DefaultMavenProjectBuilder.java:471)
at
org.apache.maven.project.DefaultMavenProjectBuilder.buildFromRepository(DefaultMavenProjectBuilder.java:225)
at
org.apache.maven.plugin.DefaultPluginManager.checkRequiredMavenVersion(DefaultPluginManager.java:249)
... 17 more
<snip>
--
Dennis Lundberg
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]