[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[tycho-user] Using a maven artifact dependency in a plugin?
|
I use tycho 0.13. I have a plugin project where I would like to use a
maven dependency from nexus (the dependency does not have any osgi
headers). Here is what I have tried:
1)
Add the dependency in the pom file and during build copy it to the
root of the plugin using the maven-dependency-plugin:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>download.maven.dependencies</id>
<phase>generate-sources</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>com.thoughtworks.xstream</groupId>
<artifactId>xstream</artifactId>
<version>1.4</version>
<overWrite>true</overWrite>
<outputDirectory>${basedir}</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
This will not work since the target is resolved before the artifact is copied.
2)
Download the artifact and use eclipse to convert it into a plugin and
reupload it to nexus. Use a separate project based on the
tycho-extras-plugin where I add the osgified artifact as a dependency
and build a p2 site containing the artifact/bundle. Next I can use
this p2 site when I build my main project. This works but requires
some manual steps+the tycho-extras-plugin hack.
3)
Any suggestions?