Issue Details (XML | Word | Printable)

Key: MDEP-187
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Brian Fox
Reporter: Igor Fedorenko
Votes: 22
Watchers: 15
Operations

If you were logged in you would be able to see more operations.
Maven 2.x Dependency Plugin

dependency:copy fails when invoked from m2e with workspace resolution enabled

Created: 12/Nov/08 04:26 PM   Updated: 16/Nov/09 10:20 AM
Return to search
Component/s: None
Affects Version/s: 2.1
Fix Version/s: None

Time Tracking:
Not Specified

File Attachments: 1. File MDEP-187.diff (0.9 kB)
2. File MDEP-187b.diff (6 kB)

Issue Links:
Related
 
dependent
 


 Description  « Hide

m2e resolves workspace artifacts to their output folders but dependency:copy expects all artifacts to be files. I will provide trivial patch shortly.



Igor Fedorenko made changes - 12/Nov/08 04:27 PM
Field Original Value New Value
Attachment MDEP-187.diff [ 38056 ]
Igor Fedorenko added a comment - 13/Nov/08 12:15 PM

updated path that fixes same exception in unpack mojo and also includes two unit tests.


Igor Fedorenko made changes - 13/Nov/08 12:15 PM
Attachment MDEP-187b.diff [ 38079 ]
Igor Fedorenko made changes - 18/Nov/08 09:14 AM
Link This issue is depended upon by MNGECLIPSE-1027 [ MNGECLIPSE-1027 ]
Marcelo Alcantara added a comment - 08/Apr/09 01:53 PM

I was having the same problem as mentioned on the MNGECLIPSE-1027 and saw the recomendation to update the maven-dependency-plugin to version 2.1.

I updated the plugin but still have the same problem.

Any ideas?


Felipe desiderati added a comment - 30/Apr/09 10:59 AM

I have the same problem too, and the only solution I´ve found was to simply disable workspace resolution. I know that is terrible and with this approach I have to install locally all the time the other dependent projects
Meanwhile, waiting for the fix.


Felipe desiderati made changes - 19/May/09 06:55 PM
Link This issue relates to MASSEMBLY-411 [ MASSEMBLY-411 ]
Julien Wajsberg added a comment - 05/Jun/09 08:18 AM

Is it possible to have this patch applied if it works ?

Thanks.


derek added a comment - 11/Aug/09 03:31 AM

Is there any other workarounds for this one?
Thanks,
Derek


Clint Shank added a comment - 16/Nov/09 10:20 AM

My current workaround for this issue is to use the antrun plug-in. For example,

<plugin>
    <artifactId>maven-antrun-plugin</artifactId>
    <executions>
      <execution>
        <!-- copy just built artifact to some lib dir -->
        <id>copy-to-lib</id>
        <goals>
          <goal>run</goal>
        </goals>
        <phase>package</phase>
        <configuration>
          <tasks>
            <copy
                file="${project.build.directory}/${project.build.finalName}.${project.packaging}"
                tofile="${some.lib.dir}/${project.artifactId}.${project.packaging}" />
          </tasks>
        </configuration>
      </execution>
    </executions>
  </plugin>

This allows "Resolve dependencies from Workspace projects" to work.