[ 
https://jira.codehaus.org/browse/MDEP-187?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=277905#comment-277905
 ] 

Walt commented on MDEP-187:
---------------------------

I'm hitting this problem from the command line.   

[code]
            <plugin>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <id>obtain instrumentation candidates</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>unpack</goal>
                        </goals>
                        <configuration>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>my-control-plugins</artifactId>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>my-control-plugins</artifactId>
                                    <classifier>sources</classifier>
                                    <includes>**/GeneratedPlugin.java</includes>
                                    
<outputDirectory>${project.build.sourceDirectory}</outputDirectory>
                                </artifactItem>
                            </artifactItems>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
[/code]


gives me

[code]

[ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-dependency-plugin:2.3:unpack (obtain 
instrumentation candidates) on project my-control-plugins-cobertura: Error 
unpacking file: 
/home/me/devel/my/execution/exec-plugins/my-control-plugins/target/classes to: 
/home/me/devel/execution/exec-plugins/my-control-plugins-cobertura/target/dependency
[ERROR] org.codehaus.plexus.archiver.ArchiverException: The source must not be 
a directory.
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal 
org.apache.maven.plugins:maven-dependency-plugin:2.3:unpack (obtain 
instrumentation candidates) on project oo-control-plugins-cobertura: Error 
unpacking file: 
/home/me/devel/execution/exec-plugins/my-control-plugins/target/classes to: 
/home/me/devel/execution/exec-plugins/my-control-plugins-cobertura/target/dependency
org.codehaus.plexus.archiver.ArchiverException: The source must not be a 
directory.
        at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
        at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
        at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
        at 
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
        at 
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
        at 
org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
        at 
org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at 
org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
        at 
org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
        at 
org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
        at 
org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.MojoExecutionException: Error unpacking 
file: /home/me/devel/execution/exec-plugins/my-control-plugins/target/classes 
to: 
/home/me/devel/execution/exec-plugins/my-control-plugins-cobertura/target/dependency
org.codehaus.plexus.archiver.ArchiverException: The source must not be a 
directory.
        at 
org.apache.maven.plugin.dependency.AbstractDependencyMojo.unpack(AbstractDependencyMojo.java:267)
        at 
org.apache.maven.plugin.dependency.fromConfiguration.UnpackMojo.unpackArtifact(UnpackMojo.java:116)
        at 
org.apache.maven.plugin.dependency.fromConfiguration.UnpackMojo.execute(UnpackMojo.java:94)
        at 
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
        at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
        ... 19 more
Caused by: org.codehaus.plexus.archiver.ArchiverException: The source must not 
be a directory.
        at 
org.codehaus.plexus.archiver.AbstractUnArchiver.validate(AbstractUnArchiver.java:185)
        at 
org.codehaus.plexus.archiver.AbstractUnArchiver.extract(AbstractUnArchiver.java:118)
        at 
org.apache.maven.plugin.dependency.AbstractDependencyMojo.unpack(AbstractDependencyMojo.java:258)
        ... 23 more
[/code]


>From the looks of it, this has been an issue now for 4 years and it's still 
>not fixed?????

> dependency:copy fails when invoked from m2e with workspace resolution enabled
> -----------------------------------------------------------------------------
>
>                 Key: MDEP-187
>                 URL: https://jira.codehaus.org/browse/MDEP-187
>             Project: Maven 2.x Dependency Plugin
>          Issue Type: Bug
>    Affects Versions: 2.1
>            Reporter: Igor Fedorenko
>            Assignee: Brian Fox
>         Attachments: MDEP-187b.diff, MDEP-187.diff
>
>
> m2e resolves workspace artifacts to their output folders but dependency:copy 
> expects all artifacts to be files. I will provide trivial patch shortly.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to