maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pailin Suttiwirairat (JIRA)" <j...@codehaus.org>
Subject [jira] Commented: (MDEP-194) ArchiverException when using maven dependency plugin in multi-module projects
Date Fri, 30 Jan 2009 06:49:20 GMT

    [ http://jira.codehaus.org/browse/MDEP-194?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=163226#action_163226
] 

Pailin Suttiwirairat commented on MDEP-194:
-------------------------------------------

This issue also occur in unpack goal when I try to import the projects to eclipse (The projects
has structure like above). But the exceptions are difference. 

An error message in maven console :
{quote}
Build errors for example-project; org.apache.maven.lifecycle.LifecycleExecutionException:
Internal error in the plugin manager executing goal 'org.apache.maven.plugins:maven-dependency-plugin:2.0-alpha-4:unpack':
Mojo execution failed.
{quote}

The exception :
{quote}
Error log:
!ENTRY org.maven.ide.eclipse 4 0 2009-01-26 17:49:41.784
!MESSAGE Build errors for example-project
!STACK 0
org.apache.maven.lifecycle.LifecycleExecutionException: Internal error in the plugin manager
executing goal 'org.apache.maven.plugins:maven-dependency-plugin:2.0-alpha-4:unpack': Mojo
execution failed.
		 at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:505)
		 at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmentForProject(DefaultLifecycleExecutor.java:265)
		 at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:191)
		 at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:149)
		 at org.apache.maven.DefaultMaven.execute_aroundBody0(DefaultMaven.java:223)
		 at org.apache.maven.DefaultMaven.execute_aroundBody1$advice(DefaultMaven.java:304)
		 at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:1)
		 at org.apache.maven.embedder.MavenEmbedder.execute_aroundBody2(MavenEmbedder.java:904)
		 at org.apache.maven.embedder.MavenEmbedder.execute_aroundBody3$advice(MavenEmbedder.java:304)
		 at org.apache.maven.embedder.MavenEmbedder.execute(MavenEmbedder.java:1)
		 at org.maven.ide.eclipse.internal.project.MavenProjectManagerImpl$MavenExecutor.execute(MavenProjectManagerImpl.java:1041)
		 at org.maven.ide.eclipse.internal.project.MavenProjectManagerImpl$1.execute(MavenProjectManagerImpl.java:1075)
		 at org.maven.ide.eclipse.internal.project.MavenProjectManagerImpl.execute(MavenProjectManagerImpl.java:997)
		 at org.maven.ide.eclipse.internal.project.MavenProjectManagerImpl.execute(MavenProjectManagerImpl.java:1072)
		 at org.maven.ide.eclipse.internal.project.MavenProjectFacade.execute(MavenProjectFacade.java:316)
		 at org.maven.ide.eclipse.internal.builder.MavenBuilder.executePostBuild(MavenBuilder.java:173)
		 at org.maven.ide.eclipse.internal.builder.MavenBuilder.build(MavenBuilder.java:87)
		 at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:633)
		 at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
		 at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:170)
		 at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:201)
		 at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:253)
		 at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
		 at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:256)
		 at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:309)
		 at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:341)
		 at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:140)
		 at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:238)
		 at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Caused by: org.apache.maven.plugin.PluginExecutionException: Mojo execution failed.
		 at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:601)
		 at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:498)
		 ... 28 more
Caused by: org.apache.maven.plugin.MojoExecutionException: Unknown archiver type
		 at org.apache.maven.plugin.dependency.AbstractDependencyMojo.unpack(AbstractDependencyMojo.java:236)
		 at org.apache.maven.plugin.dependency.fromConfiguration.UnpackMojo.unpackArtifact(UnpackMojo.java:103)
		 at org.apache.maven.plugin.dependency.fromConfiguration.UnpackMojo.execute(UnpackMojo.java:74)
		 at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:579)
		 ... 29 more
Caused by: org.codehaus.plexus.archiver.manager.NoSuchArchiverException: No such archiver:
''.
		 at org.codehaus.plexus.archiver.manager.DefaultArchiverManager.getUnArchiver(DefaultArchiverManager.java:80)
		 at org.codehaus.plexus.archiver.manager.DefaultArchiverManager.getUnArchiver(DefaultArchiverManager.java:114)
		 at org.apache.maven.plugin.dependency.AbstractDependencyMojo.unpack(AbstractDependencyMojo.java:221)
		 ... 32 more
{quote}

> ArchiverException when using maven dependency plugin in multi-module projects
> -----------------------------------------------------------------------------
>
>                 Key: MDEP-194
>                 URL: http://jira.codehaus.org/browse/MDEP-194
>             Project: Maven 2.x Dependency Plugin
>          Issue Type: Bug
>    Affects Versions: 2.0
>            Reporter: Sascha Hofer
>
> Having the following module hierarchy the _unpack-dependencies_ goal of the _maven-dependency-plugin_
produces an _ArchiverException_.
> * A
> ** B
> ** C (depends on B)
> I took a quick look into the code and found that when unpacking the dependencies of module
*C* the method _unpack(File, File, String, String)_ of class _org.apache.maven.plugin.dependency.AbstractDependencyMojo_
gets passed the *target/classes* directory of *B* as source file (instead of the created jar).
> part of the pom.xml which caused the error:
> {noformat}
> <profile>
>   <id>multi-module-coverage</id>
>   <build>
>     <plugins>
>       <plugin>
>         <groupId>org.apache.maven.plugins</groupId>
>         <artifactId>maven-dependency-plugin</artifactId>
>         <executions>
>           <execution>
>             <id>unpack-dependencies</id>
>             <phase>process-classes</phase>
>             <goals>
>               <goal>unpack-dependencies</goal>
>             </goals>
>             <configuration>
>               <outputDirectory>${project.build.directory}/classes</outputDirectory>
>               <excludeClassifiers>tests</excludeClassifiers>
>             </configuration>
>           </execution>
>         </executions>
>       </plugin>
>     </plugins>
>   </build>
> </profile>
> {noformat}
> exception:
> {noformat}
> org.codehaus.plexus.archiver.ArchiverException: The source must not be a directory.
>         at org.codehaus.plexus.archiver.AbstractUnArchiver.validate(AbstractUnArchiver.java:174)
>         at org.codehaus.plexus.archiver.AbstractUnArchiver.extract(AbstractUnArchiver.java:107)
>         at org.apache.maven.plugin.dependency.AbstractDependencyMojo.unpack(AbstractDependencyMojo.java:266)
>         at org.apache.maven.plugin.dependency.UnpackDependenciesMojo.execute(UnpackDependenciesMojo.java:90)
>         at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:447)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:480)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:459)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:333)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:126)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:282)
>         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)
> {noformat}

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

        

Mime
View raw message