Maven 2.x Antrun Plugin

Antrun breaks when using xdoclet plugin

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Critical Critical
  • Resolution: Won't Fix
  • Affects Version/s: 1.1
  • Fix Version/s: 1.6
  • Component/s: None
  • Labels:
    None
  • Environment:
    Maven 2.0.1
  • Number of attachments :
    0

Description

I just updated to antrun v1.1 (which needs to be marked as released in jira BTW) and find that my multimodule build is now breaking. Running the build in the child module itself works fine but if I build the parent, it fails when it gets to the child with the antrun task. Here's part of the debug output. Note it says 1.1 in the dependency tree but 1.0 further down.

[DEBUG] org.apache.maven.plugins:maven-antrun-plugin:maven-plugin:1.1 (selected for runtime)
[DEBUG]   org.apache.maven:maven-project:jar:2.0.1 (selected for runtime)
[DEBUG]     org.apache.maven:maven-model:jar:2.0.1 (selected for runtime)
[DEBUG]       org.codehaus.plexus:plexus-utils:jar:1.0.5 (selected for runtime)
[DEBUG]         classworlds:classworlds:jar:1.1-alpha-2 (selected for runtime)
[DEBUG]     org.apache.maven:maven-profile:jar:2.0.1 (selected for runtime)
[DEBUG]       org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9 (selected for runtime)
[DEBUG]         org.codehaus.plexus:plexus-utils:jar:1.0.4 (removed - nearer found: 1.0.5)
[DEBUG]         junit:junit:jar:3.8.1 (selected for runtime)
[DEBUG]     org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9 (selected for runtime)
[DEBUG]       org.codehaus.plexus:plexus-utils:jar:1.0.4 (removed - nearer found: 1.0.5)
[DEBUG]       classworlds:classworlds:jar:1.1-alpha-2 (selected for runtime)
[DEBUG]       junit:junit:jar:3.8.1 (selected for runtime)
[DEBUG]     org.codehaus.plexus:plexus-utils:jar:1.0.5 (selected for runtime)
[DEBUG]     org.apache.maven:maven-artifact-manager:jar:2.0.1 (selected for runtime)
[DEBUG]       org.apache.maven:maven-repository-metadata:jar:2.0.1 (selected for runtime)
[DEBUG]       org.apache.maven.wagon:wagon-provider-api:jar:1.0-alpha-5 (selected for runtime)
[DEBUG]         org.codehaus.plexus:plexus-utils:jar:1.0.4 (removed - nearer found: 1.0.5)
[DEBUG]       org.apache.maven:maven-artifact:jar:2.0.1 (selected for runtime)
[DEBUG]     org.apache.maven:maven-artifact:jar:2.0.1 (selected for runtime)
[DEBUG]   org.apache.maven:maven-plugin-api:jar:2.0.1 (selected for runtime)
[DEBUG]   ant:ant:jar:1.6.5 (selected for runtime)
[DEBUG]   ant:ant-launcher:jar:1.6.5 (selected for runtime)
[INFO] ----------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ----------------------------------------------------------------------------
[INFO] Internal error in the plugin manager executing goal 'org.apache.maven.plugins:maven-antrun-plugin:1.0:run': Unable to find the mojo 'org.apache.maven.plugins:maven-antrun-plugin:1.0:run' in the plugin 'org.apache.maven.plugins:maven-antrun-plugin'
Component descriptor cannot be found in the component repository: org.apache.maven.plugin.Mojoorg.apache.maven.plugins:maven-antrun-plugin:1.0:run.
[INFO] ----------------------------------------------------------------------------
[DEBUG] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Internal error in the plugin manager executing goal 'org.apache.maven.plugins:maven-antrun-plugin:1.0:run': Unable to find the mojo 'org.apache.maven.plugins:maven-antrun-plugin:1.0:run' in the plugin 'org.apache.maven.plugins:maven-antrun-plugin'
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:472)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:451)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:303)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:270)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:139)
	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:249)
	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.PluginManagerException: Unable to find the mojo 'org.apache.maven.plugins:maven-antrun-plugin:1.0:run' in the plugin 'org.apache.maven.plugins:maven-antrun-plugin'
	at org.apache.maven.plugin.DefaultPluginManager.getConfiguredMojo(DefaultPluginManager.java:553)
	at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:410)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:530)
	... 16 more
Caused by: org.codehaus.plexus.component.repository.exception.ComponentLookupException: Component descriptor cannot be found in the component repository: org.apache.maven.plugin.Mojoorg.apache.maven.plugins:maven-antrun-plugin:1.0:run.
	at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:323)
	at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:312)
	at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:440)
	at org.apache.maven.plugin.DefaultPluginManager.getConfiguredMojo(DefaultPluginManager.java:544)
	... 18 more

My POM has this in the build plugins:

        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-antrun-plugin</artifactId>
	<version>1.1</version>

Issue Links

Activity

Hide
Mike Perham added a comment -

Formatting

Show
Mike Perham added a comment - Formatting
Hide
Mike Perham added a comment -

If I explicitly ask for version 1.0 instead of 1.1, everything works as normal. Weird.

Show
Mike Perham added a comment - If I explicitly ask for version 1.0 instead of 1.1, everything works as normal. Weird.
Hide
Carlos Sanchez added a comment -

I see in your logs maven-antrun-plugin:1.0 ???

I need more info to reproduce it

The it tests use multimodule and they work

Show
Carlos Sanchez added a comment - I see in your logs maven-antrun-plugin:1.0 ??? I need more info to reproduce it The it tests use multimodule and they work
Hide
Paul Zeeman added a comment -

I too have encountered this issue following a move to Maven 2.0.2 (to pick up another fix).

While I have a multi-module project, running a specific module's pom standalone still shows the problem.

Changing the version of the antrun plugin to 1.0 still shows the problem.

I have a number of lines reporting through plexus before the error occurs:

Please contact me if you would like more information.

[INFO] Building jar: t:\optnet_ne_web_interface\firefly\craft\base\target\base-1
.0-SNAPSHOT.jar
-----------------------------------------------------
this realm = app0.child-container[org.apache.maven.plugins:maven-antrun-plugin]
urls[0] = file:/D:/Profiles/pzeeman/.m2/repository/org/apache/maven/plugins/mave
n-antrun-plugin/1.1/maven-antrun-plugin-1.1.jar
urls[1] = file:/D:/Profiles/pzeeman/.m2/repository/ant/ant/1.6.5/ant-1.6.5.jar
urls[2] = file:/D:/Profiles/pzeeman/.m2/repository/ant/ant-launcher/1.6.5/ant-la
uncher-1.6.5.jar
Number of imports: 0

this realm = plexus.core.maven
urls[0] = file:/t:/optnet_ne_web_interface/tools/maven-2.0.2/lib/maven-artifact-
2.0.2.jar
urls[1] = file:/t:/optnet_ne_web_interface/tools/maven-2.0.2/lib/maven-error-dia
gnostics-2.0.2.jar
urls[2] = file:/t:/optnet_ne_web_interface/tools/maven-2.0.2/lib/maven-model-2.0
.2.jar
urls[3] = file:/t:/optnet_ne_web_interface/tools/maven-2.0.2/lib/jsch-0.1.24.jar

urls[4] = file:/t:/optnet_ne_web_interface/tools/maven-2.0.2/lib/maven-reporting
-api-2.0.2.jar
urls[5] = file:/t:/optnet_ne_web_interface/tools/maven-2.0.2/lib/plexus-interact
ivity-api-1.0-alpha-4.jar
urls[6] = file:/t:/optnet_ne_web_interface/tools/maven-2.0.2/lib/maven-repositor
y-metadata-2.0.2.jar
urls[7] = file:/t:/optnet_ne_web_interface/tools/maven-2.0.2/lib/commons-cli-1.0
.jar
urls[8] = file:/t:/optnet_ne_web_interface/tools/maven-2.0.2/lib/maven-profile-2
.0.2.jar
urls[9] = file:/t:/optnet_ne_web_interface/tools/maven-2.0.2/lib/wagon-file-1.0-
alpha-6.jar
urls[10] = file:/t:/optnet_ne_web_interface/tools/maven-2.0.2/lib/maven-plugin-p
arameter-documenter-2.0.2.jar
urls[11] = file:/t:/optnet_ne_web_interface/tools/maven-2.0.2/lib/wagon-provider
-api-1.0-alpha-6.jar
urls[12] = file:/t:/optnet_ne_web_interface/tools/maven-2.0.2/lib/maven-plugin-r
egistry-2.0.2.jar
urls[13] = file:/t:/optnet_ne_web_interface/tools/maven-2.0.2/lib/wagon-ssh-1.0-
alpha-6.jar
urls[14] = file:/t:/optnet_ne_web_interface/tools/maven-2.0.2/lib/maven-artifact
-manager-2.0.2.jar
urls[15] = file:/t:/optnet_ne_web_interface/tools/maven-2.0.2/lib/maven-project-
2.0.2.jar
urls[16] = file:/t:/optnet_ne_web_interface/tools/maven-2.0.2/lib/wagon-ssh-exte
rnal-1.0-alpha-6.jar
urls[17] = file:/t:/optnet_ne_web_interface/tools/maven-2.0.2/lib/maven-settings
-2.0.2.jar
urls[18] = file:/t:/optnet_ne_web_interface/tools/maven-2.0.2/lib/maven-plugin-a
pi-2.0.2.jar
urls[19] = file:/t:/optnet_ne_web_interface/tools/maven-2.0.2/lib/doxia-sink-api
-1.0-alpha-7.jar
urls[20] = file:/t:/optnet_ne_web_interface/tools/maven-2.0.2/lib/maven-monitor-
2.0.2.jar
urls[21] = file:/t:/optnet_ne_web_interface/tools/maven-2.0.2/lib/maven-plugin-d
escriptor-2.0.2.jar
urls[22] = file:/t:/optnet_ne_web_interface/tools/maven-2.0.2/lib/wagon-http-lig
htweight-1.0-alpha-6.jar
urls[23] = file:/t:/optnet_ne_web_interface/tools/maven-2.0.2/lib/maven-core-2.0
.2.jar
urls[24] = file:/t:/optnet_ne_web_interface/tools/maven-2.0.2/lib/maven-core-2.0
.2-javadoc.jar
urls[25] = file:/t:/optnet_ne_web_interface/tools/maven-2.0.2/lib/maven-site-plu
gin-2.0-alpha-2.jar
Number of imports: 0

this realm = plexus.core
urls[0] = file:/t:/optnet_ne_web_interface/tools/maven-2.0.2/core/plexus-contain
er-default-1.0-alpha-9.jar
urls[1] = file:/t:/optnet_ne_web_interface/tools/maven-2.0.2/core/plexus-utils-1
.1.jar
Number of imports: 0
-----------------------------------------------------
[INFO] -------------------------------------------------------------------------

[ERROR] BUILD ERROR
[INFO] -------------------------------------------------------------------------

[INFO] Internal error in the plugin manager executing goal 'org.apache.maven.plu
gins:maven-antrun-plugin:1.1:run': Unable to find the mojo 'org.apache.maven.plu
gins:maven-antrun-plugin:1.1:run' in the plugin 'org.apache.maven.plugins:maven-
antrun-plugin'
org/apache/tools/ant/PropertyHelper
[INFO] -------------------------------------------------------------------------

[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Internal error in the pl
ugin manager executing goal 'org.apache.maven.plugins:maven-antrun-plugin:1.1:ru
n': Unable to find the mojo 'org.apache.maven.plugins:maven-antrun-plugin:1.1:ru
n' in the plugin 'org.apache.maven.plugins:maven-antrun-plugin'
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:535)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLi
fecycle(DefaultLifecycleExecutor.java:472)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
ltLifecycleExecutor.java:451)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
dleFailures(DefaultLifecycleExecutor.java:303)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
ts(DefaultLifecycleExecutor.java:270)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
fecycleExecutor.java:139)
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:249)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
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.PluginManagerException: Unable to find the mo
jo 'org.apache.maven.plugins:maven-antrun-plugin:1.1:run' in the plugin 'org.apa
che.maven.plugins:maven-antrun-plugin'
at org.apache.maven.plugin.DefaultPluginManager.getConfiguredMojo(Defaul
tPluginManager.java:536)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
nManager.java:393)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:531)
... 16 more
Caused by: org.codehaus.plexus.component.repository.exception.ComponentLookupExc
eption: Unable to lookup component 'org.apache.maven.plugin.Mojoorg.apache.maven
.plugins:maven-antrun-plugin:1.1:run', it could not be created
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContai
ner.java:335)
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContai
ner.java:440)
at org.apache.maven.plugin.DefaultPluginManager.getConfiguredMojo(Defaul
tPluginManager.java:527)
... 18 more
Caused by: org.codehaus.plexus.component.factory.ComponentInstantiationException
: Could not instanciate component: role: 'null', implementation: 'org.apache.mav
en.plugin.antrun.AntRunMojo'
at org.codehaus.plexus.component.factory.java.JavaComponentFactory.makeE
xception(JavaComponentFactory.java:77)
at org.codehaus.plexus.component.factory.java.JavaComponentFactory.newIn
stance(JavaComponentFactory.java:62)
at org.codehaus.plexus.DefaultPlexusContainer.createComponentInstance(De
faultPlexusContainer.java:1464)
at org.codehaus.plexus.component.manager.AbstractComponentManager.create
ComponentInstance(AbstractComponentManager.java:93)
at org.codehaus.plexus.component.manager.PerLookupComponentManager.getCo
mponent(PerLookupComponentManager.java:48)
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContai
ner.java:331)
... 20 more
Caused by: java.lang.NoClassDefFoundError: org/apache/tools/ant/PropertyHelper
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2328)
at java.lang.Class.getConstructor0(Class.java:2640)
at java.lang.Class.newInstance0(Class.java:321)
at java.lang.Class.newInstance(Class.java:303)
at org.codehaus.plexus.component.factory.java.JavaComponentFactory.newIn
stance(JavaComponentFactory.java:44)
... 24 more

Show
Paul Zeeman added a comment - I too have encountered this issue following a move to Maven 2.0.2 (to pick up another fix). While I have a multi-module project, running a specific module's pom standalone still shows the problem. Changing the version of the antrun plugin to 1.0 still shows the problem. I have a number of lines reporting through plexus before the error occurs: Please contact me if you would like more information. [INFO] Building jar: t:\optnet_ne_web_interface\firefly\craft\base\target\base-1 .0-SNAPSHOT.jar ----------------------------------------------------- this realm = app0.child-container[org.apache.maven.plugins:maven-antrun-plugin] urls[0] = file:/D:/Profiles/pzeeman/.m2/repository/org/apache/maven/plugins/mave n-antrun-plugin/1.1/maven-antrun-plugin-1.1.jar urls[1] = file:/D:/Profiles/pzeeman/.m2/repository/ant/ant/1.6.5/ant-1.6.5.jar urls[2] = file:/D:/Profiles/pzeeman/.m2/repository/ant/ant-launcher/1.6.5/ant-la uncher-1.6.5.jar Number of imports: 0 this realm = plexus.core.maven urls[0] = file:/t:/optnet_ne_web_interface/tools/maven-2.0.2/lib/maven-artifact- 2.0.2.jar urls[1] = file:/t:/optnet_ne_web_interface/tools/maven-2.0.2/lib/maven-error-dia gnostics-2.0.2.jar urls[2] = file:/t:/optnet_ne_web_interface/tools/maven-2.0.2/lib/maven-model-2.0 .2.jar urls[3] = file:/t:/optnet_ne_web_interface/tools/maven-2.0.2/lib/jsch-0.1.24.jar urls[4] = file:/t:/optnet_ne_web_interface/tools/maven-2.0.2/lib/maven-reporting -api-2.0.2.jar urls[5] = file:/t:/optnet_ne_web_interface/tools/maven-2.0.2/lib/plexus-interact ivity-api-1.0-alpha-4.jar urls[6] = file:/t:/optnet_ne_web_interface/tools/maven-2.0.2/lib/maven-repositor y-metadata-2.0.2.jar urls[7] = file:/t:/optnet_ne_web_interface/tools/maven-2.0.2/lib/commons-cli-1.0 .jar urls[8] = file:/t:/optnet_ne_web_interface/tools/maven-2.0.2/lib/maven-profile-2 .0.2.jar urls[9] = file:/t:/optnet_ne_web_interface/tools/maven-2.0.2/lib/wagon-file-1.0- alpha-6.jar urls[10] = file:/t:/optnet_ne_web_interface/tools/maven-2.0.2/lib/maven-plugin-p arameter-documenter-2.0.2.jar urls[11] = file:/t:/optnet_ne_web_interface/tools/maven-2.0.2/lib/wagon-provider -api-1.0-alpha-6.jar urls[12] = file:/t:/optnet_ne_web_interface/tools/maven-2.0.2/lib/maven-plugin-r egistry-2.0.2.jar urls[13] = file:/t:/optnet_ne_web_interface/tools/maven-2.0.2/lib/wagon-ssh-1.0- alpha-6.jar urls[14] = file:/t:/optnet_ne_web_interface/tools/maven-2.0.2/lib/maven-artifact -manager-2.0.2.jar urls[15] = file:/t:/optnet_ne_web_interface/tools/maven-2.0.2/lib/maven-project- 2.0.2.jar urls[16] = file:/t:/optnet_ne_web_interface/tools/maven-2.0.2/lib/wagon-ssh-exte rnal-1.0-alpha-6.jar urls[17] = file:/t:/optnet_ne_web_interface/tools/maven-2.0.2/lib/maven-settings -2.0.2.jar urls[18] = file:/t:/optnet_ne_web_interface/tools/maven-2.0.2/lib/maven-plugin-a pi-2.0.2.jar urls[19] = file:/t:/optnet_ne_web_interface/tools/maven-2.0.2/lib/doxia-sink-api -1.0-alpha-7.jar urls[20] = file:/t:/optnet_ne_web_interface/tools/maven-2.0.2/lib/maven-monitor- 2.0.2.jar urls[21] = file:/t:/optnet_ne_web_interface/tools/maven-2.0.2/lib/maven-plugin-d escriptor-2.0.2.jar urls[22] = file:/t:/optnet_ne_web_interface/tools/maven-2.0.2/lib/wagon-http-lig htweight-1.0-alpha-6.jar urls[23] = file:/t:/optnet_ne_web_interface/tools/maven-2.0.2/lib/maven-core-2.0 .2.jar urls[24] = file:/t:/optnet_ne_web_interface/tools/maven-2.0.2/lib/maven-core-2.0 .2-javadoc.jar urls[25] = file:/t:/optnet_ne_web_interface/tools/maven-2.0.2/lib/maven-site-plu gin-2.0-alpha-2.jar Number of imports: 0 this realm = plexus.core urls[0] = file:/t:/optnet_ne_web_interface/tools/maven-2.0.2/core/plexus-contain er-default-1.0-alpha-9.jar urls[1] = file:/t:/optnet_ne_web_interface/tools/maven-2.0.2/core/plexus-utils-1 .1.jar Number of imports: 0 ----------------------------------------------------- [INFO] ------------------------------------------------------------------------- — [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------- — [INFO] Internal error in the plugin manager executing goal 'org.apache.maven.plu gins:maven-antrun-plugin:1.1:run': Unable to find the mojo 'org.apache.maven.plu gins:maven-antrun-plugin:1.1:run' in the plugin 'org.apache.maven.plugins:maven- antrun-plugin' org/apache/tools/ant/PropertyHelper [INFO] ------------------------------------------------------------------------- — [INFO] Trace org.apache.maven.lifecycle.LifecycleExecutionException: Internal error in the pl ugin manager executing goal 'org.apache.maven.plugins:maven-antrun-plugin:1.1:ru n': Unable to find the mojo 'org.apache.maven.plugins:maven-antrun-plugin:1.1:ru n' in the plugin 'org.apache.maven.plugins:maven-antrun-plugin' at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa ultLifecycleExecutor.java:535) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLi fecycle(DefaultLifecycleExecutor.java:472) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau ltLifecycleExecutor.java:451) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan dleFailures(DefaultLifecycleExecutor.java:303) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen ts(DefaultLifecycleExecutor.java:270) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi fecycleExecutor.java:139) 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:249) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) 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.PluginManagerException: Unable to find the mo jo 'org.apache.maven.plugins:maven-antrun-plugin:1.1:run' in the plugin 'org.apa che.maven.plugins:maven-antrun-plugin' at org.apache.maven.plugin.DefaultPluginManager.getConfiguredMojo(Defaul tPluginManager.java:536) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi nManager.java:393) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa ultLifecycleExecutor.java:531) ... 16 more Caused by: org.codehaus.plexus.component.repository.exception.ComponentLookupExc eption: Unable to lookup component 'org.apache.maven.plugin.Mojoorg.apache.maven .plugins:maven-antrun-plugin:1.1:run', it could not be created at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContai ner.java:335) at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContai ner.java:440) at org.apache.maven.plugin.DefaultPluginManager.getConfiguredMojo(Defaul tPluginManager.java:527) ... 18 more Caused by: org.codehaus.plexus.component.factory.ComponentInstantiationException : Could not instanciate component: role: 'null', implementation: 'org.apache.mav en.plugin.antrun.AntRunMojo' at org.codehaus.plexus.component.factory.java.JavaComponentFactory.makeE xception(JavaComponentFactory.java:77) at org.codehaus.plexus.component.factory.java.JavaComponentFactory.newIn stance(JavaComponentFactory.java:62) at org.codehaus.plexus.DefaultPlexusContainer.createComponentInstance(De faultPlexusContainer.java:1464) at org.codehaus.plexus.component.manager.AbstractComponentManager.create ComponentInstance(AbstractComponentManager.java:93) at org.codehaus.plexus.component.manager.PerLookupComponentManager.getCo mponent(PerLookupComponentManager.java:48) at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContai ner.java:331) ... 20 more Caused by: java.lang.NoClassDefFoundError: org/apache/tools/ant/PropertyHelper at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2328) at java.lang.Class.getConstructor0(Class.java:2640) at java.lang.Class.newInstance0(Class.java:321) at java.lang.Class.newInstance(Class.java:303) at org.codehaus.plexus.component.factory.java.JavaComponentFactory.newIn stance(JavaComponentFactory.java:44) ... 24 more
Hide
Kenney Westerhof added a comment -

I see two different problems here. Mike; if you purge ~/.m2/repository/org/apache/maven/plugins/ do you still have
problems? It seems like a core bug, not an antrun bug. Is the issue fixed in 2.0.2?

Paul Zeeman: I can't reproduce this. It almost looks as if your ant-1.6.5.jar is incomplete/corrupt.
Any chance you can make a mini-project that reproduces the problem?

Show
Kenney Westerhof added a comment - I see two different problems here. Mike; if you purge ~/.m2/repository/org/apache/maven/plugins/ do you still have problems? It seems like a core bug, not an antrun bug. Is the issue fixed in 2.0.2? Paul Zeeman: I can't reproduce this. It almost looks as if your ant-1.6.5.jar is incomplete/corrupt. Any chance you can make a mini-project that reproduces the problem?
Hide
Carlos Sanchez added a comment -

See Kenney's comments. Please open a new issue if this is still a problem with a sample project

Show
Carlos Sanchez added a comment - See Kenney's comments. Please open a new issue if this is still a problem with a sample project
Hide
Maciej Szefler added a comment -

I have the same problem with 2.0.1 and 2.0.2. If no version is specified for the plugin the problem occurs, if version 1.1 is specified, the problem occurs. If version 1.0 is specified the problem does not occur.

Show
Maciej Szefler added a comment - I have the same problem with 2.0.1 and 2.0.2. If no version is specified for the plugin the problem occurs, if version 1.1 is specified, the problem occurs. If version 1.0 is specified the problem does not occur.
Hide
Maciej Szefler added a comment -

Also, blowing away the plugins directory does not solve the problem.

Show
Maciej Szefler added a comment - Also, blowing away the plugins directory does not solve the problem.
Hide
Carlos Sanchez added a comment -

Maciej, the issue was closed as not reproducible. If you have a sample please post it.

Show
Carlos Sanchez added a comment - Maciej, the issue was closed as not reproducible. If you have a sample please post it.
Hide
John Worrell added a comment -

I'm also getting this same problem using Maven 2.04 and antrun 1.1.

The problem seems to be quite subtle and to depend quite subtly on the project structure - I had no problem with one project but when I made relatively innocuous looking changes I got the problem.

I'll look into sending up the POMs

Show
John Worrell added a comment - I'm also getting this same problem using Maven 2.04 and antrun 1.1. The problem seems to be quite subtle and to depend quite subtly on the project structure - I had no problem with one project but when I made relatively innocuous looking changes I got the problem. I'll look into sending up the POMs
Hide
Fredrik Vraalsen added a comment -

I'm also seeing this problem with maven 2.0.4 and antrun 1.1 in a multiproject build. Environment is JDK 1.5.0_06, Windows XP.
The submodule build crashes with the same type of error message as in the original bug description. The build works however if I explicitly specify version 1.0 of the antrun in the plugin in the pom, as Mike Pernham pointed out in one of his comments.

I've tried disabling various subprojects and plugins, and I've finally hit a case where I can trigger the error by enabling a single plugin: The culprit seems to be the xdoclet plugin from mojo.codehaus.org. When this is enabled in one of the other subprojects, the antrun 1.1 plugin fails, otherwise it runs fine.

I've created a testcase which can be checked out using

svn co https://svn.sourceforge.net/svnroot/coras/coras/branches/maven2-antrun-testcase/src

The module with the antrun problem is in modules/coras-help. The module using xdoclet is in modules/asset-repository-ejb. Sorry I haven't had a chance to create an even smaller testcase, but I figured it would be worth getting this out there. Don't know if the problem is with the antrun or the xdoclet plugin though.

Show
Fredrik Vraalsen added a comment - I'm also seeing this problem with maven 2.0.4 and antrun 1.1 in a multiproject build. Environment is JDK 1.5.0_06, Windows XP. The submodule build crashes with the same type of error message as in the original bug description. The build works however if I explicitly specify version 1.0 of the antrun in the plugin in the pom, as Mike Pernham pointed out in one of his comments. I've tried disabling various subprojects and plugins, and I've finally hit a case where I can trigger the error by enabling a single plugin: The culprit seems to be the xdoclet plugin from mojo.codehaus.org. When this is enabled in one of the other subprojects, the antrun 1.1 plugin fails, otherwise it runs fine. I've created a testcase which can be checked out using svn co https://svn.sourceforge.net/svnroot/coras/coras/branches/maven2-antrun-testcase/src The module with the antrun problem is in modules/coras-help. The module using xdoclet is in modules/asset-repository-ejb. Sorry I haven't had a chance to create an even smaller testcase, but I figured it would be worth getting this out there. Don't know if the problem is with the antrun or the xdoclet plugin though.
Hide
David Smiley added a comment -

I am also seeing this very same problem. Specifying v1.0 does remove the bug. I also am using xdoclet, as Frederik is too. Please reopen this bug.

Show
David Smiley added a comment - I am also seeing this very same problem. Specifying v1.0 does remove the bug. I also am using xdoclet, as Frederik is too. Please reopen this bug.
Hide
Carlos Sanchez added a comment -

Reopen per user comment

Show
Carlos Sanchez added a comment - Reopen per user comment
Hide
Martin Heitz added a comment -

Having the same problem.
Seems to be related to the use of xdoclet, which is loading antrun 1.0...

Extract from pom:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.1</version>
<executions>
...

Stack trace (which shows, that 1.0 is used, although 1.1 is configured) follows:
INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Internal error in the plugin manager executing goal 'org.apache.maven.plugins:maven-antrun-plugin:1.0:run': Unable to find the mojo 'org.apache.maven.plugins:maven-antrun-plugin:1.0:run' in the plugin 'org.apache.maven.plugins:maven-antrun-plugin'
Component descriptor cannot be found in the component repository: org.apache.maven.plugin.Mojoorg.apache.maven.plugins:maven-antrun-plugin:1.0:run.
[INFO] ------------------------------------------------------------------------
[DEBUG] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Internal error in the plugin manager executing goal 'org.apache.maven.plugins:maven-antrun-plugin:1.0:run': Unable to find the mojo 'org.apache.maven.plugins:maven-antrun-plugin:1.0:run' in the plugin 'org.apache.maven.plugins:maven-antrun-plugin'
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:538)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:475)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:454)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140)
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.PluginManagerException: Unable to find the mojo 'org.apache.maven.plugins:maven-antrun-plugin:1.0:run' in the plugin 'org.apache.maven.plugins:maven-antrun-plugin'
at org.apache.maven.plugin.DefaultPluginManager.getConfiguredMojo(DefaultPluginManager.java:533)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:390)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
... 16 more
Caused by: org.codehaus.plexus.component.repository.exception.ComponentLookupException: Component descriptor cannot be found in the component repository: org.apache.maven.plugin.Mojoorg.apache.maven.plugins:maven-antrun-plugin:1.0:run.
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:323)
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:312)
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:440)
at org.apache.maven.plugin.DefaultPluginManager.getConfiguredMojo(DefaultPluginManager.java:524)
... 18 more

Show
Martin Heitz added a comment - Having the same problem. Seems to be related to the use of xdoclet, which is loading antrun 1.0... Extract from pom: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-antrun-plugin</artifactId> <version>1.1</version> <executions> ... Stack trace (which shows, that 1.0 is used, although 1.1 is configured) follows: INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Internal error in the plugin manager executing goal 'org.apache.maven.plugins:maven-antrun-plugin:1.0:run': Unable to find the mojo 'org.apache.maven.plugins:maven-antrun-plugin:1.0:run' in the plugin 'org.apache.maven.plugins:maven-antrun-plugin' Component descriptor cannot be found in the component repository: org.apache.maven.plugin.Mojoorg.apache.maven.plugins:maven-antrun-plugin:1.0:run. [INFO] ------------------------------------------------------------------------ [DEBUG] Trace org.apache.maven.lifecycle.LifecycleExecutionException: Internal error in the plugin manager executing goal 'org.apache.maven.plugins:maven-antrun-plugin:1.0:run': Unable to find the mojo 'org.apache.maven.plugins:maven-antrun-plugin:1.0:run' in the plugin 'org.apache.maven.plugins:maven-antrun-plugin' at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:538) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:475) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:454) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140) 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.PluginManagerException: Unable to find the mojo 'org.apache.maven.plugins:maven-antrun-plugin:1.0:run' in the plugin 'org.apache.maven.plugins:maven-antrun-plugin' at org.apache.maven.plugin.DefaultPluginManager.getConfiguredMojo(DefaultPluginManager.java:533) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:390) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534) ... 16 more Caused by: org.codehaus.plexus.component.repository.exception.ComponentLookupException: Component descriptor cannot be found in the component repository: org.apache.maven.plugin.Mojoorg.apache.maven.plugins:maven-antrun-plugin:1.0:run. at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:323) at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:312) at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:440) at org.apache.maven.plugin.DefaultPluginManager.getConfiguredMojo(DefaultPluginManager.java:524) ... 18 more
Hide
Mike Perham added a comment -

This definitely has to do with the xdoclet plugin using antrun 1.0 directly and then the build later trying to use antrun 1.1. I'd suggest releasing a new version of xdoclet plugin which uses antrun 1.1. Hopefully sync'ing the two versions will prevent this problem.

Show
Mike Perham added a comment - This definitely has to do with the xdoclet plugin using antrun 1.0 directly and then the build later trying to use antrun 1.1. I'd suggest releasing a new version of xdoclet plugin which uses antrun 1.1. Hopefully sync'ing the two versions will prevent this problem.
Hide
Mike Perham added a comment -

I can't upgrade xdoclet to use antrun 1.1 because AbstractAntMojo in 1.1 has the following injected field:

/**
     * The plugin dependencies.
     *
     * @parameter expression="${plugin.artifacts}"
     * @required
     * @readonly
     */
    private List artifacts;

When you subclass this class (as the xdoclet plugin does), it appears that Maven is NOT injecting this field and so artifacts is null at runtime. If we can fix this, we could essentially get rid of the xdoclet plugin and just use antrun directly.

Show
Mike Perham added a comment - I can't upgrade xdoclet to use antrun 1.1 because AbstractAntMojo in 1.1 has the following injected field:
/**
     * The plugin dependencies.
     *
     * @parameter expression="${plugin.artifacts}"
     * @required
     * @readonly
     */
    private List artifacts;
When you subclass this class (as the xdoclet plugin does), it appears that Maven is NOT injecting this field and so artifacts is null at runtime. If we can fix this, we could essentially get rid of the xdoclet plugin and just use antrun directly.
Hide
Lee Webb added a comment -

Any movement on this?

Being unable to use ver 1.1 is preventing me from testing whether MANTRUN-28 resolves maven.test.classpath issues that I am experiencing within my build.

Show
Lee Webb added a comment - Any movement on this? Being unable to use ver 1.1 is preventing me from testing whether MANTRUN-28 resolves maven.test.classpath issues that I am experiencing within my build.
Hide
Eirik Bjornset added a comment -

I just encountered the same issue and found that I could get around it by entering a dummy ant-run-plugin <plugin> element with version 1.1 in the master pom .e.g
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.1</version>
</plugin>
<!-- more plugin elements -->
</plugins>
</build>

Show
Eirik Bjornset added a comment - I just encountered the same issue and found that I could get around it by entering a dummy ant-run-plugin <plugin> element with version 1.1 in the master pom .e.g <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-antrun-plugin</artifactId> <version>1.1</version> </plugin> <!-- more plugin elements --> </plugins> </build>
Hide
Deepak Gupta added a comment -

I'm having the same issue as Lee Webb.

I can use version 1.0 of the plugin, to get rid of the exception "Internal error in the plugin manager executing goal 'org.apache.maven.plugins:maven-antrun-plugin:1.1:run ...'", however when I try to use "<path refid="maven.test.classpath" />" the classpath does not include required classes.

Any idea when a fix will be available ?

thanks,

Show
Deepak Gupta added a comment - I'm having the same issue as Lee Webb. I can use version 1.0 of the plugin, to get rid of the exception "Internal error in the plugin manager executing goal 'org.apache.maven.plugins:maven-antrun-plugin:1.1:run ...'", however when I try to use "<path refid="maven.test.classpath" />" the classpath does not include required classes. Any idea when a fix will be available ? thanks,
Hide
Subhash Chandran added a comment -

I also faced this issue. I had upgraded Maven from 2.0.4 to 2.0.9, and this issue cropped up. I did a cleanup of the repository:

$ cd ~/.m2/repository/
$ rm -rf ant/ org/apache/maven/plugins/

After doing this, all the dependencies were automatically updated and the problem was solved!

Show
Subhash Chandran added a comment - I also faced this issue. I had upgraded Maven from 2.0.4 to 2.0.9, and this issue cropped up. I did a cleanup of the repository: $ cd ~/.m2/repository/ $ rm -rf ant/ org/apache/maven/plugins/ After doing this, all the dependencies were automatically updated and the problem was solved!
Hide
Benson Margulies added a comment -

Looking at the trail here, it seems very unlikely that this is/was an antrun problem rather than a maven issue, or even a repository with its nose out of joint.

Show
Benson Margulies added a comment - Looking at the trail here, it seems very unlikely that this is/was an antrun problem rather than a maven issue, or even a repository with its nose out of joint.

People

Vote (16)
Watch (19)

Dates

  • Created:
    Updated:
    Resolved: