You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Sascha Hofer (JIRA)" <ji...@codehaus.org> on 2008/10/16 11:09:19 UTC

[jira] Created: (MNG-3792) ArchiverException when using maven dependency plugin in multi-module projects

ArchiverException when using maven dependency plugin in multi-module projects
-----------------------------------------------------------------------------

                 Key: MNG-3792
                 URL: http://jira.codehaus.org/browse/MNG-3792
             Project: Maven 2
          Issue Type: Bug
    Affects Versions: 2.0.8
            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

        

[jira] Issue Comment Edited: (MDEP-194) ArchiverException when using maven dependency plugin in multi-module projects

Posted by "Pailin Suttiwirairat (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MDEP-194?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=163226#action_163226 ] 

Pailin Suttiwirairat edited comment on MDEP-194 at 1/30/09 1:29 AM:
--------------------------------------------------------------------

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 :
{noformat} 
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.
{noformat} 

The exception :
{noformat} 
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
{noformat} 

      was (Author: pailin):
    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 :
{noformat} 
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.
{noformat} 

The exception :
{noformat} 
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
{noformat} 
  
> 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

        

[jira] Commented: (MDEP-194) ArchiverException when using maven dependency plugin in multi-module projects

Posted by "Art O Cathain (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MDEP-194?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=284606#comment-284606 ] 

Art O Cathain commented on MDEP-194:
------------------------------------

Yeah, it's happening to me. I could try and make you a sample project? In your version, your <includes> doesn't have any subdirectories directly defined in it, so I'd expect it to work.

Maybe as a workaround I could try the ** notation.


> ArchiverException when using maven dependency plugin in multi-module projects
> -----------------------------------------------------------------------------
>
>                 Key: MDEP-194
>                 URL: https://jira.codehaus.org/browse/MDEP-194
>             Project: Maven 2.x Dependency Plugin
>          Issue Type: Bug
>    Affects Versions: 2.0
>            Reporter: Sascha Hofer
>         Attachments: maven-dependency-plugin-2.5-SNAPSHOT-copy-artifact.patch, plexus-archiver-1.0-alpha-9-DirectoryUnArchiver.diff
>
>
> 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.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Moved: (MDEP-194) ArchiverException when using maven dependency plugin in multi-module projects

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MDEP-194?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brett Porter moved MNG-3792 to MDEP-194:
----------------------------------------

    Affects Version/s:     (was: 2.0.8)
                       2.0
                  Key: MDEP-194  (was: MNG-3792)
              Project: Maven 2.x Dependency Plugin  (was: Maven 2)

> 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

        

[jira] Commented: (MDEP-194) ArchiverException when using maven dependency plugin in multi-module projects

Posted by "Art O Cathain (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MDEP-194?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=284609#comment-284609 ] 

Art O Cathain commented on MDEP-194:
------------------------------------

It's happening to me with both war and jar types of project (in both cases the dependency is on a jar project)

> ArchiverException when using maven dependency plugin in multi-module projects
> -----------------------------------------------------------------------------
>
>                 Key: MDEP-194
>                 URL: https://jira.codehaus.org/browse/MDEP-194
>             Project: Maven 2.x Dependency Plugin
>          Issue Type: Bug
>    Affects Versions: 2.0
>            Reporter: Sascha Hofer
>         Attachments: maven-dependency-plugin-2.5-SNAPSHOT-copy-artifact.patch, plexus-archiver-1.0-alpha-9-DirectoryUnArchiver.diff
>
>
> 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.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MDEP-194) ArchiverException when using maven dependency plugin in multi-module projects

Posted by "Gabe Beged-Dov (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MDEP-194?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=184011#action_184011 ] 

Gabe Beged-Dov commented on MDEP-194:
-------------------------------------

I am encountering the same issue when executing unpack-dependencies in a reactor context. It doesn't occur in the direct execution context since it operates against the artifact in the local repository. Is there any workaround that would allow unpacking of dependencies in the reactor context using the release version of the archiver? Any thought on when an update of the archiver might be available?

Thanks,

Gabe

> 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
>         Attachments: plexus-archiver-1.0-alpha-9-DirectoryUnArchiver.diff
>
>
> 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

        

[jira] Issue Comment Edited: (MDEP-194) ArchiverException when using maven dependency plugin in multi-module projects

Posted by "Gabe Beged-Dov (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MDEP-194?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=184011#action_184011 ] 

Gabe Beged-Dov edited comment on MDEP-194 at 7/18/09 12:37 PM:
---------------------------------------------------------------

I am encountering the same issue when executing unpack-dependencies in a reactor context using the test goal. I unpack dependencies in process-test-resources in order to have them available for unit-test. If I run the reactor against the package goal then the dependency projects will be packaged and unpack-dependencies will use them rather than trying to use "target/classes" and things then seem to work.

BTW, this issue seems like a duplicate http://jira.codehaus.org/browse/MDEP-98. In that issue, Brian Fox has a comment that its not clear what should be unpacked in the case that there is no packaged artifact. 

IWhat is a scenario where you can't use package rather than test as the goal for the reactor?


Thanks,

Gabe

      was (Author: gabe97330):
    I am encountering the same issue when executing unpack-dependencies in a reactor context. It doesn't occur in the direct execution context since it operates against the artifact in the local repository. Is there any workaround that would allow unpacking of dependencies in the reactor context using the release version of the archiver? Any thought on when an update of the archiver might be available?

Thanks,

Gabe
  
> 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
>         Attachments: plexus-archiver-1.0-alpha-9-DirectoryUnArchiver.diff
>
>
> 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

        

[jira] Issue Comment Edited: (MDEP-194) ArchiverException when using maven dependency plugin in multi-module projects

Posted by "Pailin Suttiwirairat (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MDEP-194?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=163226#action_163226 ] 

Pailin Suttiwirairat edited comment on MDEP-194 at 1/30/09 12:53 AM:
---------------------------------------------------------------------

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 :
{noformat} 
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.
{noformat} 

The exception :
{noformat} 
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
{noformat} 

      was (Author: pailin):
    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 :
{noformat} 
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.
{noformat} 

The exception :
{noformat} 
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
{noformat} 
  
> 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

        

[jira] Commented: (MDEP-194) ArchiverException when using maven dependency plugin in multi-module projects

Posted by "Reimer Prochnow (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MDEP-194?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=183178#action_183178 ] 

Reimer Prochnow commented on MDEP-194:
--------------------------------------

I have the same problem: "No such archiver '.' ". The Project builds but not inside eclipse (m2eclipse plugin). The Dependency Plugin is set up to unpack an artefact which is in fact a directory. I patched the plexus-archiver to be capable of "extracting" directories by simply copiying the files inside. Ugly but working for me.
Patch is agingst plexus-archiver-1.0-alpha-9.

> 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
>         Attachments: plexus-archiver-1.0-alpha-9-DirectoryUnArchiver.diff
>
>
> 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

        

[jira] Commented: (MDEP-194) ArchiverException when using maven dependency plugin in multi-module projects

Posted by "Art O Cathain (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MDEP-194?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=284607#comment-284607 ] 

Art O Cathain commented on MDEP-194:
------------------------------------

Using ** makes no difference. I'm using type jar, you're using type war - could that be it?

> ArchiverException when using maven dependency plugin in multi-module projects
> -----------------------------------------------------------------------------
>
>                 Key: MDEP-194
>                 URL: https://jira.codehaus.org/browse/MDEP-194
>             Project: Maven 2.x Dependency Plugin
>          Issue Type: Bug
>    Affects Versions: 2.0
>            Reporter: Sascha Hofer
>         Attachments: maven-dependency-plugin-2.5-SNAPSHOT-copy-artifact.patch, plexus-archiver-1.0-alpha-9-DirectoryUnArchiver.diff
>
>
> 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.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MDEP-194) ArchiverException when using maven dependency plugin in multi-module projects

Posted by "derek (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MDEP-194?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=186327#action_186327 ] 

derek commented on MDEP-194:
----------------------------

As a work around here is what we did.
In the project you want to unpack, add the maven assembly plugin to package a zip file of everything you need.

Then in the projects that needs this resource just specify zip as the archive instead of jar. (like below)
                            <plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-dependency-plugin</artifactId>
				<configuration>
					<artifactItems>
						<artifactItem>
							<groupId>com.derek.mega.application</groupId>
							<artifactId>common-resources</artifactId>
							<type>zip</type>
							<overWrite>true</overWrite>
							<outputDirectory>target/common-resources</outputDirectory>
							<includes>**/*.properties,**/*.xml,**/*.sql,**/*.bat,**/*.sh</includes>
						</artifactItem>
					</artifactItems>
				</configuration>
				<executions>
					<execution>
						<id>unpack-common-resources</id>
						<goals>
							<goal>unpack</goal>
						</goals>
						<phase>generate-resources</phase>
					</execution>
				</executions>
			</plugin>

> 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
>         Attachments: plexus-archiver-1.0-alpha-9-DirectoryUnArchiver.diff
>
>
> 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

        

[jira] (MDEP-194) ArchiverException when using maven dependency plugin in multi-module projects

Posted by "Michael Berg (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MDEP-194?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=287334#comment-287334 ] 

Michael Berg commented on MDEP-194:
-----------------------------------

Isn't it supposed to work that way? From a shell analogy, consider this:

$ cp /some/dir/* localdir/

I would not expect /some/dir to be created under localdir/ in this case. 

Have you tried entering /solr/**/*

                
> ArchiverException when using maven dependency plugin in multi-module projects
> -----------------------------------------------------------------------------
>
>                 Key: MDEP-194
>                 URL: https://jira.codehaus.org/browse/MDEP-194
>             Project: Maven 2.x Dependency Plugin
>          Issue Type: Bug
>    Affects Versions: 2.0
>            Reporter: Sascha Hofer
>         Attachments: maven-dependency-plugin-2.5-SNAPSHOT-copy-artifact2.patch, maven-dependency-plugin-2.5-SNAPSHOT-copy-artifact.patch, plexus-archiver-1.0-alpha-9-DirectoryUnArchiver.diff
>
>
> 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, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MDEP-194) ArchiverException when using maven dependency plugin in multi-module projects

Posted by "Art O Cathain (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/MDEP-194?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Art O Cathain updated MDEP-194:
-------------------------------

    Attachment: mdep-194-its-aoc.diff

I have also created some integration tests
                
> ArchiverException when using maven dependency plugin in multi-module projects
> -----------------------------------------------------------------------------
>
>                 Key: MDEP-194
>                 URL: https://jira.codehaus.org/browse/MDEP-194
>             Project: Maven 2.x Dependency Plugin
>          Issue Type: Bug
>    Affects Versions: 2.0
>            Reporter: Sascha Hofer
>         Attachments: maven-dependency-plugin-2.5-SNAPSHOT-copy-artifact2.patch, maven-dependency-plugin-2.5-SNAPSHOT-copy-artifact.patch, mdep-194-its-aoc.diff, mdp-194-src-main-aoc.diff, plexus-archiver-1.0-alpha-9-DirectoryUnArchiver.diff
>
>
> 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, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MDEP-194) ArchiverException when using maven dependency plugin in multi-module projects

Posted by "Herve Boutemy (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/MDEP-194?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Herve Boutemy closed MDEP-194.
------------------------------

    Resolution: Duplicate

duplicate of MDEP-98: closing this duplicate will help focus everybody's energy
                
> ArchiverException when using maven dependency plugin in multi-module projects
> -----------------------------------------------------------------------------
>
>                 Key: MDEP-194
>                 URL: https://jira.codehaus.org/browse/MDEP-194
>             Project: Maven 2.x Dependency Plugin
>          Issue Type: Bug
>          Components: unpack, unpack-dependencies
>    Affects Versions: 2.0
>            Reporter: Sascha Hofer
>         Attachments: maven-dependency-plugin-2.5-SNAPSHOT-copy-artifact2.patch, maven-dependency-plugin-2.5-SNAPSHOT-copy-artifact.patch, mdep-194-its-aoc.diff, mdp-194-src-main-aoc.diff, plexus-archiver-1.0-alpha-9-DirectoryUnArchiver.diff
>
>
> 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:
> {code:xml}
> <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>
> {code}
> 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, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MDEP-194) ArchiverException when using maven dependency plugin in multi-module projects

Posted by "Michael Berg (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MDEP-194?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=284604#comment-284604 ] 

Michael Berg commented on MDEP-194:
-----------------------------------

Art, have you actually witnessed this? I have the following in my pom:

<goals>
	<goal>unpack</goal>
</goals>
<configuration>
	<artifactItems>
		<artifactItem>
			<groupId>com.interform400.xml</groupId>
			<artifactId>plugin-web-base</artifactId>
			<version>${project.version}</version>
			<type>war</type>
		</artifactItem>
	</artifactItems>
	<includes>**/web.xml</includes>
	<outputDirectory>${project.build.directory}/plugin-web-base-unpack</outputDirectory>
</configuration>

When the build finishes, then inside the plugin-web-base-unpack folder I am seeing this:

plugin-web-base-unpack/
   /WEB-INF/
   /WEB-INF/web.xml

The WEB-INF folder was created automatically.




> ArchiverException when using maven dependency plugin in multi-module projects
> -----------------------------------------------------------------------------
>
>                 Key: MDEP-194
>                 URL: https://jira.codehaus.org/browse/MDEP-194
>             Project: Maven 2.x Dependency Plugin
>          Issue Type: Bug
>    Affects Versions: 2.0
>            Reporter: Sascha Hofer
>         Attachments: maven-dependency-plugin-2.5-SNAPSHOT-copy-artifact.patch, plexus-archiver-1.0-alpha-9-DirectoryUnArchiver.diff
>
>
> 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.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Issue Comment Edited: (MDEP-194) ArchiverException when using maven dependency plugin in multi-module projects

Posted by "Michael Berg (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MDEP-194?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=284239#comment-284239 ] 

Michael Berg edited comment on MDEP-194 at 11/25/11 4:59 AM:
-------------------------------------------------------------

I have experienced the same issue, but I would like to offer an alternative patch. I do not feel that the proper place to fix this problem is in the plexus unarchiver simply because that is where the exception manifests itself. The underlying issue is that the unpacker is being told to unpack a directory, which really does not make sense. Also, making such a change in the archiver could lead to regression issues elsewhere.

My patch is directed at the UnpackMojo itself, adding a check to see if the archive is really an archive or a directory, and in case of the latter, use the relevant plexus FileUtils method to copy the files over, rather than the archiver. It seems like a more logical choice to me.

This patch more or less implements the suggestion made by Archimedes Trajano above.

      was (Author: mberg2007):
    I have experienced the same issue, but I would like to offer an alternative patch. I do not feel that the proper place to fix this problem is in the plexus unarchiver simply because that is where the exception manifests itself. The underlying issue is that the unpacker is being told to unpack a directory, which really does not make sense. Also, making such a change in the archiver could lead to regression issues elsewhere.

My patch is directed at the UnpackMojo itself, adding a check to see if the archive is really an archive or a directory, and in case of the latter, use the relevant plexus FileUtils method to copy the files over, rather than the archiver. It seems like a more logical choice to me.

This patch more or less implements thet suggestion made by Archimedes Trajano above.
  
> ArchiverException when using maven dependency plugin in multi-module projects
> -----------------------------------------------------------------------------
>
>                 Key: MDEP-194
>                 URL: https://jira.codehaus.org/browse/MDEP-194
>             Project: Maven 2.x Dependency Plugin
>          Issue Type: Bug
>    Affects Versions: 2.0
>            Reporter: Sascha Hofer
>         Attachments: maven-dependency-plugin-2.5-SNAPSHOT-copy-artifact.patch, plexus-archiver-1.0-alpha-9-DirectoryUnArchiver.diff
>
>
> 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.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (MDEP-194) ArchiverException when using maven dependency plugin in multi-module projects

Posted by "Michael Berg (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/MDEP-194?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Berg updated MDEP-194:
------------------------------

    Attachment: maven-dependency-plugin-2.5-SNAPSHOT-copy-artifact.patch

Patches the mojo to handle unpacked archives

> ArchiverException when using maven dependency plugin in multi-module projects
> -----------------------------------------------------------------------------
>
>                 Key: MDEP-194
>                 URL: https://jira.codehaus.org/browse/MDEP-194
>             Project: Maven 2.x Dependency Plugin
>          Issue Type: Bug
>    Affects Versions: 2.0
>            Reporter: Sascha Hofer
>         Attachments: maven-dependency-plugin-2.5-SNAPSHOT-copy-artifact.patch, plexus-archiver-1.0-alpha-9-DirectoryUnArchiver.diff
>
>
> 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.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Issue Comment Edited: (MDEP-194) ArchiverException when using maven dependency plugin in multi-module projects

Posted by "Gabe Beged-Dov (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MDEP-194?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=184011#action_184011 ] 

Gabe Beged-Dov edited comment on MDEP-194 at 7/18/09 12:38 PM:
---------------------------------------------------------------

I am encountering the same issue when executing unpack-dependencies in a reactor context using the test goal. I unpack dependencies in process-test-resources in order to have them available for unit-test. If I run the reactor against the package goal then the dependency projects will be packaged and unpack-dependencies will use them rather than trying to use "target/classes" and things then seem to work.

BTW, this issue seems like a duplicate http://jira.codehaus.org/browse/MDEP-98. In that issue, Brian Fox has a comment that its not clear what should be unpacked in the case that there is no packaged artifact. 

What is a scenario where you can't use package rather than test as the goal for the reactor?


Thanks,

Gabe

      was (Author: gabe97330):
    I am encountering the same issue when executing unpack-dependencies in a reactor context using the test goal. I unpack dependencies in process-test-resources in order to have them available for unit-test. If I run the reactor against the package goal then the dependency projects will be packaged and unpack-dependencies will use them rather than trying to use "target/classes" and things then seem to work.

BTW, this issue seems like a duplicate http://jira.codehaus.org/browse/MDEP-98. In that issue, Brian Fox has a comment that its not clear what should be unpacked in the case that there is no packaged artifact. 

IWhat is a scenario where you can't use package rather than test as the goal for the reactor?


Thanks,

Gabe
  
> 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
>         Attachments: plexus-archiver-1.0-alpha-9-DirectoryUnArchiver.diff
>
>
> 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

        

[jira] Commented: (MDEP-194) ArchiverException when using maven dependency plugin in multi-module projects

Posted by "Michael Berg (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MDEP-194?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=284240#comment-284240 ] 

Michael Berg commented on MDEP-194:
-----------------------------------

I have experienced the same issue, but I would like to offer an alternative patch. I do not feel that the proper place to fix this problem is in the plexus unarchiver simply because that is where the exception manifests itself. The underlying issue is that the unpacker is being told to unpack a directory, which really does not make sense. Also, making such a change in the archiver could lead to regression issues elsewhere.

My patch is directed at the UnpackMojo itself, adding a check to see if the archive is really an archive or a directory, and in case of the latter, use the relevant plexus FileUtils method to copy the files over, rather than the archiver. It seems like a more logical choice to me.


> ArchiverException when using maven dependency plugin in multi-module projects
> -----------------------------------------------------------------------------
>
>                 Key: MDEP-194
>                 URL: https://jira.codehaus.org/browse/MDEP-194
>             Project: Maven 2.x Dependency Plugin
>          Issue Type: Bug
>    Affects Versions: 2.0
>            Reporter: Sascha Hofer
>         Attachments: maven-dependency-plugin-2.5-SNAPSHOT-copy-artifact.patch, plexus-archiver-1.0-alpha-9-DirectoryUnArchiver.diff
>
>
> 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.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MDEP-194) ArchiverException when using maven dependency plugin in multi-module projects

Posted by "Art O Cathain (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MDEP-194?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=284600#comment-284600 ] 

Art O Cathain commented on MDEP-194:
------------------------------------

I like your patch Michael, but I think it doesn't work if your artifactItem's <includes> have a subdirectory e.g. 
<includes>xsd/*.xsd</includes> 

In this case the unpacker puts the xsd files in [outputdirectory]/xsd/, but the fileutils copy method (from your patch) puts them directly in [outputdirectory].



> ArchiverException when using maven dependency plugin in multi-module projects
> -----------------------------------------------------------------------------
>
>                 Key: MDEP-194
>                 URL: https://jira.codehaus.org/browse/MDEP-194
>             Project: Maven 2.x Dependency Plugin
>          Issue Type: Bug
>    Affects Versions: 2.0
>            Reporter: Sascha Hofer
>         Attachments: maven-dependency-plugin-2.5-SNAPSHOT-copy-artifact.patch, plexus-archiver-1.0-alpha-9-DirectoryUnArchiver.diff
>
>
> 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.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MDEP-194) ArchiverException when using maven dependency plugin in multi-module projects

Posted by "Thiago Leão Moreira (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MDEP-194?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=253800#action_253800 ] 

Thiago Leão Moreira commented on MDEP-194:
------------------------------------------

This is the exactly problem that I have. Any intention to fix it? I'm using the version 2.1

> 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
>         Attachments: plexus-archiver-1.0-alpha-9-DirectoryUnArchiver.diff
>
>
> 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

       

[jira] Commented: (MDEP-194) ArchiverException when using maven dependency plugin in multi-module projects

Posted by "Michael Berg (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MDEP-194?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=284608#comment-284608 ] 

Michael Berg commented on MDEP-194:
-----------------------------------

I would not think the dependency type mattered. The source directory should contain the already unpacked archive regardless of its type.

However, in my case I am building a war file rather than a jar file, perhaps that matters?

> ArchiverException when using maven dependency plugin in multi-module projects
> -----------------------------------------------------------------------------
>
>                 Key: MDEP-194
>                 URL: https://jira.codehaus.org/browse/MDEP-194
>             Project: Maven 2.x Dependency Plugin
>          Issue Type: Bug
>    Affects Versions: 2.0
>            Reporter: Sascha Hofer
>         Attachments: maven-dependency-plugin-2.5-SNAPSHOT-copy-artifact.patch, plexus-archiver-1.0-alpha-9-DirectoryUnArchiver.diff
>
>
> 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.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (MDEP-194) ArchiverException when using maven dependency plugin in multi-module projects

Posted by "Reimer Prochnow (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MDEP-194?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Reimer Prochnow updated MDEP-194:
---------------------------------

    Attachment: plexus-archiver-1.0-alpha-9-DirectoryUnArchiver.diff

> 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
>         Attachments: plexus-archiver-1.0-alpha-9-DirectoryUnArchiver.diff
>
>
> 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

        

[jira] (MDEP-194) ArchiverException when using maven dependency plugin in multi-module projects

Posted by "Torsten Krah (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MDEP-194?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=287299#comment-287299 ] 

Torsten Krah commented on MDEP-194:
-----------------------------------

Addition:

The problem with prefix annotation is still there, using something like "solr/**" does result in those directories not being created.

                
> ArchiverException when using maven dependency plugin in multi-module projects
> -----------------------------------------------------------------------------
>
>                 Key: MDEP-194
>                 URL: https://jira.codehaus.org/browse/MDEP-194
>             Project: Maven 2.x Dependency Plugin
>          Issue Type: Bug
>    Affects Versions: 2.0
>            Reporter: Sascha Hofer
>         Attachments: maven-dependency-plugin-2.5-SNAPSHOT-copy-artifact2.patch, maven-dependency-plugin-2.5-SNAPSHOT-copy-artifact.patch, plexus-archiver-1.0-alpha-9-DirectoryUnArchiver.diff
>
>
> 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, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Issue Comment Edited: (MDEP-194) ArchiverException when using maven dependency plugin in multi-module projects

Posted by "Pailin Suttiwirairat (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MDEP-194?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=163226#action_163226 ] 

Pailin Suttiwirairat edited comment on MDEP-194 at 1/30/09 12:50 AM:
---------------------------------------------------------------------

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 :
{noformat} 
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.
{noformat} 

The exception :
{noformat} 
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
{noformat} 

      was (Author: pailin):
    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

        

[jira] Issue Comment Edited: (MDEP-194) ArchiverException when using maven dependency plugin in multi-module projects

Posted by "Michael Berg (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MDEP-194?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=284239#comment-284239 ] 

Michael Berg edited comment on MDEP-194 at 11/25/11 4:59 AM:
-------------------------------------------------------------

I have experienced the same issue, but I would like to offer an alternative patch. I do not feel that the proper place to fix this problem is in the plexus unarchiver simply because that is where the exception manifests itself. The underlying issue is that the unpacker is being told to unpack a directory, which really does not make sense. Also, making such a change in the archiver could lead to regression issues elsewhere.

My patch is directed at the UnpackMojo itself, adding a check to see if the archive is really an archive or a directory, and in case of the latter, use the relevant plexus FileUtils method to copy the files over, rather than the archiver. It seems like a more logical choice to me.

This patch more or less implements thet suggestion made by Archimedes Trajano above.

      was (Author: mberg2007):
    I have experienced the same issue, but I would like to offer an alternative patch. I do not feel that the proper place to fix this problem is in the plexus unarchiver simply because that is where the exception manifests itself. The underlying issue is that the unpacker is being told to unpack a directory, which really does not make sense. Also, making such a change in the archiver could lead to regression issues elsewhere.

My patch is directed at the UnpackMojo itself, adding a check to see if the archive is really an archive or a directory, and in case of the latter, use the relevant plexus FileUtils method to copy the files over, rather than the archiver. It seems like a more logical choice to me.
  
> ArchiverException when using maven dependency plugin in multi-module projects
> -----------------------------------------------------------------------------
>
>                 Key: MDEP-194
>                 URL: https://jira.codehaus.org/browse/MDEP-194
>             Project: Maven 2.x Dependency Plugin
>          Issue Type: Bug
>    Affects Versions: 2.0
>            Reporter: Sascha Hofer
>         Attachments: maven-dependency-plugin-2.5-SNAPSHOT-copy-artifact.patch, plexus-archiver-1.0-alpha-9-DirectoryUnArchiver.diff
>
>
> 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.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MDEP-194) ArchiverException when using maven dependency plugin in multi-module projects

Posted by "Torsten Krah (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/MDEP-194?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Torsten Krah updated MDEP-194:
------------------------------

    Attachment: maven-dependency-plugin-2.5-SNAPSHOT-copy-artifact2.patch

CopyMojo does need the same patch like UnpackMojo.
                
> ArchiverException when using maven dependency plugin in multi-module projects
> -----------------------------------------------------------------------------
>
>                 Key: MDEP-194
>                 URL: https://jira.codehaus.org/browse/MDEP-194
>             Project: Maven 2.x Dependency Plugin
>          Issue Type: Bug
>    Affects Versions: 2.0
>            Reporter: Sascha Hofer
>         Attachments: maven-dependency-plugin-2.5-SNAPSHOT-copy-artifact2.patch, maven-dependency-plugin-2.5-SNAPSHOT-copy-artifact.patch, plexus-archiver-1.0-alpha-9-DirectoryUnArchiver.diff
>
>
> 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, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MDEP-194) ArchiverException when using maven dependency plugin in multi-module projects

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MDEP-194?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=158414#action_158414 ] 

Brett Porter commented on MDEP-194:
-----------------------------------

recent discussion has indicated that Maven may have to retain the passing in of directories even if the JAR has been built. THe dependency plugin will need to handle these more gracefully.

> 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

        

[jira] (MDEP-194) ArchiverException when using maven dependency plugin in multi-module projects

Posted by "Herve Boutemy (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/MDEP-194?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Herve Boutemy updated MDEP-194:
-------------------------------

    Component/s: unpack
    Description: 
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:
{code:xml}
<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>
{code}

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}

  was:
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}

    
> ArchiverException when using maven dependency plugin in multi-module projects
> -----------------------------------------------------------------------------
>
>                 Key: MDEP-194
>                 URL: https://jira.codehaus.org/browse/MDEP-194
>             Project: Maven 2.x Dependency Plugin
>          Issue Type: Bug
>          Components: unpack, unpack-dependencies
>    Affects Versions: 2.0
>            Reporter: Sascha Hofer
>         Attachments: maven-dependency-plugin-2.5-SNAPSHOT-copy-artifact2.patch, maven-dependency-plugin-2.5-SNAPSHOT-copy-artifact.patch, mdep-194-its-aoc.diff, mdp-194-src-main-aoc.diff, plexus-archiver-1.0-alpha-9-DirectoryUnArchiver.diff
>
>
> 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:
> {code:xml}
> <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>
> {code}
> 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, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MDEP-194) ArchiverException when using maven dependency plugin in multi-module projects

Posted by "Michael Berg (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MDEP-194?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=287365#comment-287365 ] 

Michael Berg commented on MDEP-194:
-----------------------------------

@Art Actually "mvn install" did not work either for me, before the patch. That's how I noticed the problem in the first place, our CI server began to fail for no apparent reason during an "mvn install" build.

I think "how it works" is the same regardless of which maven phase the unpack goal is bound to. It should be able to unpack files regardless.

                
> ArchiverException when using maven dependency plugin in multi-module projects
> -----------------------------------------------------------------------------
>
>                 Key: MDEP-194
>                 URL: https://jira.codehaus.org/browse/MDEP-194
>             Project: Maven 2.x Dependency Plugin
>          Issue Type: Bug
>    Affects Versions: 2.0
>            Reporter: Sascha Hofer
>         Attachments: maven-dependency-plugin-2.5-SNAPSHOT-copy-artifact2.patch, maven-dependency-plugin-2.5-SNAPSHOT-copy-artifact.patch, plexus-archiver-1.0-alpha-9-DirectoryUnArchiver.diff
>
>
> 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, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Issue Comment Edited: (MDEP-194) ArchiverException when using maven dependency plugin in multi-module projects

Posted by "Michael Berg (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MDEP-194?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=284239#comment-284239 ] 

Michael Berg edited comment on MDEP-194 at 11/25/11 4:58 AM:
-------------------------------------------------------------

I have experienced the same issue, but I would like to offer an alternative patch. I do not feel that the proper place to fix this problem is in the plexus unarchiver simply because that is where the exception manifests itself. The underlying issue is that the unpacker is being told to unpack a directory, which really does not make sense. Also, making such a change in the archiver could lead to regression issues elsewhere.

My patch is directed at the UnpackMojo itself, adding a check to see if the archive is really an archive or a directory, and in case of the latter, use the relevant plexus FileUtils method to copy the files over, rather than the archiver. It seems like a more logical choice to me.

      was (Author: mberg2007):
    Patches the mojo to handle unpacked archives
  
> ArchiverException when using maven dependency plugin in multi-module projects
> -----------------------------------------------------------------------------
>
>                 Key: MDEP-194
>                 URL: https://jira.codehaus.org/browse/MDEP-194
>             Project: Maven 2.x Dependency Plugin
>          Issue Type: Bug
>    Affects Versions: 2.0
>            Reporter: Sascha Hofer
>         Attachments: maven-dependency-plugin-2.5-SNAPSHOT-copy-artifact.patch, plexus-archiver-1.0-alpha-9-DirectoryUnArchiver.diff
>
>
> 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.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MDEP-194) ArchiverException when using maven dependency plugin in multi-module projects

Posted by "Michael Berg (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MDEP-194?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=287334#comment-287334 ] 

Michael Berg edited comment on MDEP-194 at 1/3/12 3:25 PM:
-----------------------------------------------------------

Isn't it supposed to work that way? From a shell analogy, consider this:

$ cp /some/dir/* localdir/

I would not expect /some/dir to be created under localdir/ in this case. 

Have you tried entering /solr/** / *

(remove the spaces, I have to enter them or the comment system thinks I'm trying to enter something in bold)

                
      was (Author: mberg2007):
    Isn't it supposed to work that way? From a shell analogy, consider this:

$ cp /some/dir/* localdir/

I would not expect /some/dir to be created under localdir/ in this case. 

Have you tried entering /solr/**/*

                  
> ArchiverException when using maven dependency plugin in multi-module projects
> -----------------------------------------------------------------------------
>
>                 Key: MDEP-194
>                 URL: https://jira.codehaus.org/browse/MDEP-194
>             Project: Maven 2.x Dependency Plugin
>          Issue Type: Bug
>    Affects Versions: 2.0
>            Reporter: Sascha Hofer
>         Attachments: maven-dependency-plugin-2.5-SNAPSHOT-copy-artifact2.patch, maven-dependency-plugin-2.5-SNAPSHOT-copy-artifact.patch, plexus-archiver-1.0-alpha-9-DirectoryUnArchiver.diff
>
>
> 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, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MDEP-194) ArchiverException when using maven dependency plugin in multi-module projects

Posted by "Pailin Suttiwirairat (JIRA)" <ji...@codehaus.org>.
    [ 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

        

[jira] (MDEP-194) ArchiverException when using maven dependency plugin in multi-module projects

Posted by "Art O Cathain (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MDEP-194?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=287366#comment-287366 ] 

Art O Cathain commented on MDEP-194:
------------------------------------

Thanks for your work on this Michael. Would it help if I created a small self-contained project that demonstrates the experience I've been having?
                
> ArchiverException when using maven dependency plugin in multi-module projects
> -----------------------------------------------------------------------------
>
>                 Key: MDEP-194
>                 URL: https://jira.codehaus.org/browse/MDEP-194
>             Project: Maven 2.x Dependency Plugin
>          Issue Type: Bug
>    Affects Versions: 2.0
>            Reporter: Sascha Hofer
>         Attachments: maven-dependency-plugin-2.5-SNAPSHOT-copy-artifact2.patch, maven-dependency-plugin-2.5-SNAPSHOT-copy-artifact.patch, plexus-archiver-1.0-alpha-9-DirectoryUnArchiver.diff
>
>
> 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, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MDEP-194) ArchiverException when using maven dependency plugin in multi-module projects

Posted by "Torsten Krah (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MDEP-194?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=287359#comment-287359 ] 

Torsten Krah commented on MDEP-194:
-----------------------------------

Thats correct, but i would want - i dont know how to do it yet - this one:

cp -R solr/ localdir/

I'll try the alternative.



                
> ArchiverException when using maven dependency plugin in multi-module projects
> -----------------------------------------------------------------------------
>
>                 Key: MDEP-194
>                 URL: https://jira.codehaus.org/browse/MDEP-194
>             Project: Maven 2.x Dependency Plugin
>          Issue Type: Bug
>    Affects Versions: 2.0
>            Reporter: Sascha Hofer
>         Attachments: maven-dependency-plugin-2.5-SNAPSHOT-copy-artifact2.patch, maven-dependency-plugin-2.5-SNAPSHOT-copy-artifact.patch, plexus-archiver-1.0-alpha-9-DirectoryUnArchiver.diff
>
>
> 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, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Issue Comment Edited: (MDEP-194) ArchiverException when using maven dependency plugin in multi-module projects

Posted by "Michael Berg (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MDEP-194?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=284604#comment-284604 ] 

Michael Berg edited comment on MDEP-194 at 11/30/11 8:42 AM:
-------------------------------------------------------------

Art, have you actually witnessed this? I have the following in my pom:

<goals>
    <goal>unpack</goal>
</goals>
<configuration>
	<artifactItems>
		<artifactItem>
			<groupId>com.interform400.xml</groupId>
			<artifactId>plugin-web-base</artifactId>
			<version>${project.version}</version>
			<type>war</type>
		</artifactItem>
	</artifactItems>
	<includes>**/web.xml</includes>
	<outputDirectory>${project.build.directory}/plugin-web-base-unpack</outputDirectory>
</configuration>

When the build finishes, then inside the plugin-web-base-unpack folder I am seeing this:

plugin-web-base-unpack/
   /WEB-INF/
   /WEB-INF/web.xml

The WEB-INF folder was created automatically.




      was (Author: mberg2007):
    Art, have you actually witnessed this? I have the following in my pom:

<goals>
	<goal>unpack</goal>
</goals>
<configuration>
	<artifactItems>
		<artifactItem>
			<groupId>com.interform400.xml</groupId>
			<artifactId>plugin-web-base</artifactId>
			<version>${project.version}</version>
			<type>war</type>
		</artifactItem>
	</artifactItems>
	<includes>**/web.xml</includes>
	<outputDirectory>${project.build.directory}/plugin-web-base-unpack</outputDirectory>
</configuration>

When the build finishes, then inside the plugin-web-base-unpack folder I am seeing this:

plugin-web-base-unpack/
   /WEB-INF/
   /WEB-INF/web.xml

The WEB-INF folder was created automatically.



  
> ArchiverException when using maven dependency plugin in multi-module projects
> -----------------------------------------------------------------------------
>
>                 Key: MDEP-194
>                 URL: https://jira.codehaus.org/browse/MDEP-194
>             Project: Maven 2.x Dependency Plugin
>          Issue Type: Bug
>    Affects Versions: 2.0
>            Reporter: Sascha Hofer
>         Attachments: maven-dependency-plugin-2.5-SNAPSHOT-copy-artifact.patch, plexus-archiver-1.0-alpha-9-DirectoryUnArchiver.diff
>
>
> 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.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MDEP-194) ArchiverException when using maven dependency plugin in multi-module projects

Posted by "Herve Boutemy (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/MDEP-194?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Herve Boutemy updated MDEP-194:
-------------------------------

    Component/s: unpack-dependencies
    
> ArchiverException when using maven dependency plugin in multi-module projects
> -----------------------------------------------------------------------------
>
>                 Key: MDEP-194
>                 URL: https://jira.codehaus.org/browse/MDEP-194
>             Project: Maven 2.x Dependency Plugin
>          Issue Type: Bug
>          Components: unpack-dependencies
>    Affects Versions: 2.0
>            Reporter: Sascha Hofer
>         Attachments: maven-dependency-plugin-2.5-SNAPSHOT-copy-artifact2.patch, maven-dependency-plugin-2.5-SNAPSHOT-copy-artifact.patch, mdep-194-its-aoc.diff, mdp-194-src-main-aoc.diff, plexus-archiver-1.0-alpha-9-DirectoryUnArchiver.diff
>
>
> 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, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MDEP-194) ArchiverException when using maven dependency plugin in multi-module projects

Posted by "Art O Cathain (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MDEP-194?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=298746#comment-298746 ] 

Art O Cathain edited comment on MDEP-194 at 5/15/12 5:11 AM:
-------------------------------------------------------------

I have a new patch, based on Nicolas Cornaglia's patch C attached to MDEP-187.
                
      was (Author: artbristol):
    I have a new patch, based on Nicolás Cornaglia's patch C attached to MDEP-187.
                  
> ArchiverException when using maven dependency plugin in multi-module projects
> -----------------------------------------------------------------------------
>
>                 Key: MDEP-194
>                 URL: https://jira.codehaus.org/browse/MDEP-194
>             Project: Maven 2.x Dependency Plugin
>          Issue Type: Bug
>    Affects Versions: 2.0
>            Reporter: Sascha Hofer
>         Attachments: maven-dependency-plugin-2.5-SNAPSHOT-copy-artifact2.patch, maven-dependency-plugin-2.5-SNAPSHOT-copy-artifact.patch, mdep-194-its-aoc.diff, mdp-194-src-main-aoc.diff, plexus-archiver-1.0-alpha-9-DirectoryUnArchiver.diff
>
>
> 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, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] (MDEP-194) ArchiverException when using maven dependency plugin in multi-module projects

Posted by "Gili (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MDEP-194?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=297639#comment-297639 ] 

Gili commented on MDEP-194:
---------------------------

Four years and counting. If you're not going to fix it anytime soon, please provide a workaround! What are we supposed to do?
                
> ArchiverException when using maven dependency plugin in multi-module projects
> -----------------------------------------------------------------------------
>
>                 Key: MDEP-194
>                 URL: https://jira.codehaus.org/browse/MDEP-194
>             Project: Maven 2.x Dependency Plugin
>          Issue Type: Bug
>    Affects Versions: 2.0
>            Reporter: Sascha Hofer
>         Attachments: maven-dependency-plugin-2.5-SNAPSHOT-copy-artifact2.patch, maven-dependency-plugin-2.5-SNAPSHOT-copy-artifact.patch, plexus-archiver-1.0-alpha-9-DirectoryUnArchiver.diff
>
>
> 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, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MDEP-194) ArchiverException when using maven dependency plugin in multi-module projects

Posted by "Art O Cathain (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/MDEP-194?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Art O Cathain updated MDEP-194:
-------------------------------

    Attachment: mdp-194-src-main-aoc.diff

I have a new patch, based on Nicolás Cornaglia's patch C attached to MDEP-187.
                
> ArchiverException when using maven dependency plugin in multi-module projects
> -----------------------------------------------------------------------------
>
>                 Key: MDEP-194
>                 URL: https://jira.codehaus.org/browse/MDEP-194
>             Project: Maven 2.x Dependency Plugin
>          Issue Type: Bug
>    Affects Versions: 2.0
>            Reporter: Sascha Hofer
>         Attachments: maven-dependency-plugin-2.5-SNAPSHOT-copy-artifact2.patch, maven-dependency-plugin-2.5-SNAPSHOT-copy-artifact.patch, mdep-194-its-aoc.diff, mdp-194-src-main-aoc.diff, plexus-archiver-1.0-alpha-9-DirectoryUnArchiver.diff
>
>
> 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, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] Issue Comment Edited: (MDEP-194) ArchiverException when using maven dependency plugin in multi-module projects

Posted by "Michael Berg (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MDEP-194?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=284240#comment-284240 ] 

Michael Berg edited comment on MDEP-194 at 11/25/11 4:58 AM:
-------------------------------------------------------------

See maven-dependency-plugin-2.5-SNAPSHOT-copy-artifact.patch

      was (Author: mberg2007):
    I have experienced the same issue, but I would like to offer an alternative patch. I do not feel that the proper place to fix this problem is in the plexus unarchiver simply because that is where the exception manifests itself. The underlying issue is that the unpacker is being told to unpack a directory, which really does not make sense. Also, making such a change in the archiver could lead to regression issues elsewhere.

My patch is directed at the UnpackMojo itself, adding a check to see if the archive is really an archive or a directory, and in case of the latter, use the relevant plexus FileUtils method to copy the files over, rather than the archiver. It seems like a more logical choice to me.

  
> ArchiverException when using maven dependency plugin in multi-module projects
> -----------------------------------------------------------------------------
>
>                 Key: MDEP-194
>                 URL: https://jira.codehaus.org/browse/MDEP-194
>             Project: Maven 2.x Dependency Plugin
>          Issue Type: Bug
>    Affects Versions: 2.0
>            Reporter: Sascha Hofer
>         Attachments: maven-dependency-plugin-2.5-SNAPSHOT-copy-artifact.patch, plexus-archiver-1.0-alpha-9-DirectoryUnArchiver.diff
>
>
> 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.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Issue Comment Edited: (MDEP-194) ArchiverException when using maven dependency plugin in multi-module projects

Posted by "Reimer Prochnow (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MDEP-194?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=183178#action_183178 ] 

Reimer Prochnow edited comment on MDEP-194 at 7/10/09 3:58 AM:
---------------------------------------------------------------

I have the same problem: "No such archiver '.' ". The Project builds but not inside eclipse (m2eclipse plugin). The Dependency Plugin is set up to unpack an artefact which is in fact a directory. I patched the plexus-archiver to be capable of "extracting" directories by simply copying the files inside. Ugly but working for me.
Patch is againgst plexus-archiver-1.0-alpha-9.

      was (Author: reimer):
    I have the same problem: "No such archiver '.' ". The Project builds but not inside eclipse (m2eclipse plugin). The Dependency Plugin is set up to unpack an artefact which is in fact a directory. I patched the plexus-archiver to be capable of "extracting" directories by simply copiying the files inside. Ugly but working for me.
Patch is agingst plexus-archiver-1.0-alpha-9.
  
> 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
>         Attachments: plexus-archiver-1.0-alpha-9-DirectoryUnArchiver.diff
>
>
> 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

        

[jira] (MDEP-194) ArchiverException when using maven dependency plugin in multi-module projects

Posted by "Art O Cathain (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MDEP-194?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=287360#comment-287360 ] 

Art O Cathain commented on MDEP-194:
------------------------------------

@Michael Either way seems reasonable to me, but the problem is that the files end up in a different directory depending on whether you do "mvn compile" (which didn't work at all before your patch) or "mvn install" (which did work). For compatibility I think it has to work the way it currently does in "mvn install".
                
> ArchiverException when using maven dependency plugin in multi-module projects
> -----------------------------------------------------------------------------
>
>                 Key: MDEP-194
>                 URL: https://jira.codehaus.org/browse/MDEP-194
>             Project: Maven 2.x Dependency Plugin
>          Issue Type: Bug
>    Affects Versions: 2.0
>            Reporter: Sascha Hofer
>         Attachments: maven-dependency-plugin-2.5-SNAPSHOT-copy-artifact2.patch, maven-dependency-plugin-2.5-SNAPSHOT-copy-artifact.patch, plexus-archiver-1.0-alpha-9-DirectoryUnArchiver.diff
>
>
> 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, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MDEP-194) ArchiverException when using maven dependency plugin in multi-module projects

Posted by "Archimedes Trajano (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MDEP-194?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=282580#comment-282580 ] 

Archimedes Trajano commented on MDEP-194:
-----------------------------------------

This is specifically for UNPACK goal

I think what could be done is to change the check so that if it detects that the source is a directory rather than an archive that it will just copy from the directory instead of trying to extract.

> ArchiverException when using maven dependency plugin in multi-module projects
> -----------------------------------------------------------------------------
>
>                 Key: MDEP-194
>                 URL: https://jira.codehaus.org/browse/MDEP-194
>             Project: Maven 2.x Dependency Plugin
>          Issue Type: Bug
>    Affects Versions: 2.0
>            Reporter: Sascha Hofer
>         Attachments: plexus-archiver-1.0-alpha-9-DirectoryUnArchiver.diff
>
>
> 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.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MDEP-194) ArchiverException when using maven dependency plugin in multi-module projects

Posted by "Gili (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MDEP-194?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=297640#comment-297640 ] 

Gili commented on MDEP-194:
---------------------------

Grr. Note to self, this error also occurs if you attempt to unpack a dependency that requires a classifier but you omit it. Meaning, if you have:

* A
** B (classifier = foo)
** C (attempts to unpack B but without a classifier)

then C will throw an exception. If you add the classifier, however, it works.
                
> ArchiverException when using maven dependency plugin in multi-module projects
> -----------------------------------------------------------------------------
>
>                 Key: MDEP-194
>                 URL: https://jira.codehaus.org/browse/MDEP-194
>             Project: Maven 2.x Dependency Plugin
>          Issue Type: Bug
>    Affects Versions: 2.0
>            Reporter: Sascha Hofer
>         Attachments: maven-dependency-plugin-2.5-SNAPSHOT-copy-artifact2.patch, maven-dependency-plugin-2.5-SNAPSHOT-copy-artifact.patch, plexus-archiver-1.0-alpha-9-DirectoryUnArchiver.diff
>
>
> 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, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira