You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by anoweb <an...@gmail.com> on 2008/08/08 15:29:18 UTC
unpack-dependencies problem
I have a Java project that requires two other projects (one just a zip, the
other a swf file). Very similar setup as this article
(http://www.adobe.com/devnet/flex/articles/fullstack_pt1.html,
fullstack_pt2.html, fullstack_pt3.html).
org.apache.maven.plugins
maven-dependency-plugin
unpack-config
unpack-dependencies
generate-resources
${project.build.directory}/${project.build.finalName}/WEB-INF/flex
config
${project.groupId}
resources
true
jar
copy-swf
process-classes
copy-dependencies
${project.build.directory}/${project.build.finalName}
swf
...
...
${project.groupId}
ria
1.0
swf
${project.groupId}
config
1.0
resources
zip
provided
So when I run: mvn clean test I am getting this error:
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Internal error in the plugin manager executing goal
'org.apache.maven.plugins:maven-dependency-plugin:2
.0:unpack-dependencies': Unable to find the mojo
'org.apache.maven.plugins:maven-dependency-plugin:2.0:unpack-
dependencies' in the plugin
'org.apache.maven.plugins:maven-dependency-plugin'
org.codehaus.plexus.archiver.ArchiverException
[INFO]
------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Internal error in
the plugin manager executing goal 'o
rg.apache.maven.plugins:maven-dependency-plugin:2.0:unpack-dependencies':
Unable to find the mojo 'org.apache.
maven.plugins:maven-dependency-plugin:2.0:unpack-dependencies' in the plugin
'org.apache.maven.plugins:maven-d
ependency-plugin'
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:562)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecut
or.java:499)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:478)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleEx
ecutor.java:330)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.ja
va:291)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
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:597)
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:m
aven-dependency-plugin:2.0:unpack-dependencies' in the plugin
'org.apache.maven.plugins:maven-dependency-plugi
n'
at
org.apache.maven.plugin.DefaultPluginManager.getConfiguredMojo(DefaultPluginManager.java:618)
at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:429)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558)
... 16 more
Caused by:
org.codehaus.plexus.component.repository.exception.ComponentLookupException:
Unable to lookup compo
nent
'org.apache.maven.plugin.Mojoorg.apache.maven.plugins:maven-dependency-plugin:2.0:unpack-dependencies',
i
t could not be created
at
org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:335)
at
org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:440)
at
org.apache.maven.plugin.DefaultPluginManager.getConfiguredMojo(DefaultPluginManager.java:609)
... 18 more
Caused by:
org.codehaus.plexus.component.factory.ComponentInstantiationException: Could
not instanciate compon
ent: role: 'null', implementation:
'org.apache.maven.plugin.dependency.UnpackDependenciesMojo'
at
org.codehaus.plexus.component.factory.java.JavaComponentFactory.makeException(JavaComponentFactory.
java:77)
at
org.codehaus.plexus.component.factory.java.JavaComponentFactory.newInstance(JavaComponentFactory.ja
va:62)
at
org.codehaus.plexus.DefaultPlexusContainer.createComponentInstance(DefaultPlexusContainer.java:1464
)
at
org.codehaus.plexus.component.manager.AbstractComponentManager.createComponentInstance(AbstractComp
onentManager.java:93)
at
org.codehaus.plexus.component.manager.PerLookupComponentManager.getComponent(PerLookupComponentMana
ger.java:48)
at
org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:331)
... 20 more
Caused by: java.lang.NoClassDefFoundError:
org/codehaus/plexus/archiver/ArchiverException
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
at java.lang.Class.getConstructor0(Class.java:2699)
at java.lang.Class.newInstance0(Class.java:326)
at java.lang.Class.newInstance(Class.java:308)
at
org.codehaus.plexus.component.factory.java.JavaComponentFactory.newInstance(JavaComponentFactory.ja
va:44)
... 24 more
Caused by: java.lang.ClassNotFoundException:
org.codehaus.plexus.archiver.ArchiverException
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at
org.codehaus.classworlds.RealmClassLoader.loadClassDirect(RealmClassLoader.java:195)
at
org.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultClassRealm.java:255)
at
org.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultClassRealm.java:274)
at
org.codehaus.classworlds.RealmClassLoader.loadClass(RealmClassLoader.java:214)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
... 30 more
I do have
C:\...\.m2\repository\org\apache\maven\plugins\maven-dependency-plugin\2.0.
This is using maven 2.0.9 (if that matters).
--
View this message in context: http://www.nabble.com/unpack-dependencies-problem-tp18891876p18891876.html
Sent from the Maven - Users mailing list archive at Nabble.com.
Re: unpack-dependencies problem
Posted by anoweb <an...@gmail.com>.
Actually the problem seemed to be related to my repository. Not sure what
was messed up, but I started fresh and I didn't specify a
maven-dependency-plugin version (i.e. 2.0). Instead it got 2.0-alpha-4.
All works better now, not sure what the changes are though.
--
View this message in context: http://www.nabble.com/unpack-dependencies-problem-tp18891876p18894401.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: unpack-dependencies problem
Posted by Eugene Kuleshov <eu...@md.pp.ru>.
If you are using m2eclipse, you may want to try to install Maven 2.0.9 and
set Maven runtime in Eclipse to use external Maven pointing to 2.0.9
installation.
regards,
Eugene
anoweb wrote:
>
> If I run this from eclipse (i.e. Run As -> Maven test) I get the following
> output:
>
> Maven encountered an error while looking up the following Mojo:
> Group-Id: org.apache.maven.plugins
> Artifact-Id: maven-dependency-plugin
> Version: 2.0
> Mojo: unpack-dependencies
> brought in via: POM
>
> Referenced from project:
> Group-Id: com.acme
> Artifact-Id: web
> Version: 1.0
> From file: C:\dev\web\pom.xml
> Reason: Unable to lookup component 'org.apache.maven.plugin.Mojo', it
> could not be created.
> role: org.apache.maven.plugin.Mojo
> roleHint:
> org.apache.maven.plugins:maven-dependency-plugin:2.0:unpack-dependencies
> classRealm:
> /plugins/org.apache.maven.plugins:maven-dependency-plugin:2.0@48/thread:main
>
> Root cause: org.codehaus.plexus.archiver.ArchiverException
>
--
View this message in context: http://www.nabble.com/unpack-dependencies-problem-tp18891876p18894332.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: unpack-dependencies problem
Posted by anoweb <an...@gmail.com>.
If I run this from eclipse (i.e. Run As -> Maven test) I get the following
output:
Maven encountered an error while looking up the following Mojo:
Group-Id: org.apache.maven.plugins
Artifact-Id: maven-dependency-plugin
Version: 2.0
Mojo: unpack-dependencies
brought in via: POM
Referenced from project:
Group-Id: com.acme
Artifact-Id: web
Version: 1.0
>From file: C:\dev\web\pom.xml
Reason: Unable to lookup component 'org.apache.maven.plugin.Mojo', it could
not be created.
role: org.apache.maven.plugin.Mojo
roleHint:
org.apache.maven.plugins:maven-dependency-plugin:2.0:unpack-dependencies
classRealm:
/plugins/org.apache.maven.plugins:maven-dependency-plugin:2.0@48/thread:main
Root cause: org.codehaus.plexus.archiver.ArchiverException
--
View this message in context: http://www.nabble.com/unpack-dependencies-problem-tp18891876p18892175.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: unpack-dependencies problem
Posted by anoweb <an...@gmail.com>.
sorry the XML got messaged up during posting, here it is again (the snippet
from my pom.xml):
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<!-- unpacks the configuration resources -->
<execution>
<id>unpack-config</id>
<goals>
<goal>unpack-dependencies</goal>
</goals>
<phase>generate-resources</phase>
<configuration>
<outputDirectory>${project.build.directory}/${project.build.finalName}/WEB-INF/flex</outputDirectory>
<includeArtifacIds>config</includeArtifacIds>
<includeGroupIds>${project.groupId}</includeGroupIds>
<includeClassifiers>resources</includeClassifiers>
<excludeTransitive>true</excludeTransitive>
<excludeTypes>jar</excludeTypes>
</configuration>
</execution>
<!-- copies the flex client over -->
<execution>
<id>copy-swf</id>
<phase>process-classes</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/${project.build.finalName}</outputDirectory>
<includeTypes>swf</includeTypes>
</configuration>
</execution>
</executions>
</plugin>
...
...
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>ria</artifactId>
<version>1.0</version>
<type>swf</type>
</dependency>
<!-- Required to include the configuration files -->
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>config</artifactId>
<version>1.0</version>
<classifier>resources</classifier>
<type>zip</type>
<scope>provided</scope>
</dependency>
</dependencies>
--
View this message in context: http://www.nabble.com/unpack-dependencies-problem-tp18891876p18891898.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org