[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [m2e-users] maven-dependency-plugin (goals
|
I am having the a similar problem.
I added the lifecycle mapping in my pom to force m2e to
execute the maven-dependency-plugin,
as I need to get my plugin to work properly.
<dependency>
<groupId>com.hp.oo.studio</groupId>
<artifactId>com.hp.oo.studio.debug.engine</artifactId>
<version>k2-SNAPSHOT</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<!-- Use this plugin to copy all of the debug engine dependencies -->
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>copy jars</id>
<phase>test</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/classes/lib</outputDirectory>
<overWriteIfNewer>true</overWriteIfNewer>
<overWriteSnapshots>true</overWriteSnapshots>
/configuration>
</execution>
</executions>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<versionRange>[2.0,)</versionRange>
<goals>
<goal>copy-dependencies</goal>
</goals>
</pluginExecutionFilter>
<action>
<execute />
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
This fixes the standard "maven-dependency-plugin (goals "copy-dependencies",
"unpack") is not
supported by m2e" error, but introduces another error.
I am now getting an error on the <execution> tag
"Error copying artifact from
/home/waboring/devel/oo/infrastructure/k2_git/studio/studio-debug-engine/ta
rget/classes to
/home/waboring/devel/oo/infrastructure/k2_git/studio/studio-debug-engine-pl
ugin/target/classes/lib/com.hp.oo.studio.debug.engine-k2-SNAPSHOT.jar
(org.apache.maven.plugins:maven-dependency-plugin:2.3:copy-dependencies:copy
jars:test)"
What is going on here? This project depends on studio-debug-engine, which
builds just fine.
Then, m2 runs build on this project, which depends on studio-debug-engine
project that
produces a jar and gets stuffed into the local ~/.m2/repository area.
Why is m2e trying to copy the jar from it's target/classes directory?
The jar will never be in target/classes.
the jar gets placed in <project>/target, not <project>/target/classes, or
the local m2 cache.
Any help would be appreciated.
Walt