Using snapshot dependencies in a eclipse plugin

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
Report Content as Inappropriate

Using snapshot dependencies in a eclipse plugin

This post has NOT been accepted by the mailing list yet.
This was originally posted on Stackoverflow (http://stackoverflow.com/questions/10487192/tycho-using-snapshot-dependencies-in-a-eclipse-plugin)

I've got an plugin which I'm building with Tycho 0.12.0. This plugin has a (snapshot) maven dependency such as foobar:0.1.1-SNAPSHOT. This dependency is regularly updated (each day). The physical file contains the date and time of the snapshot (foobar-0.1.0-20120507.135021-6.jar). I want to build with a snapshot because I want to test with the latest dev version.

So, when I build the project, the updated dependency gets copied into the lib/ directory as expected, and the compile and build goes fine.

However, the MANIFEST.MF Bundle-ClassPath doesn't get updated, so when the plugin is installed, it doesn't actually work, because the classpath is incorrect.

The solution that I'm currently using is to override the name of the file being written by the maven-dependency-plugin to be foobar-0.1.1-SNAPSHOT.jar, but I would prefer to keep the full version number of the snapshot so that I can refer to it. Is this possible? Is it possible to update the MANIFEST.MF with the fully qualified name of the SNAPSHOT dependency being used, or would I have to manually manipulate the MANIFEST.MF myself?

Please note that I'm not interested in a solution to generate the file manually, it has to be part of an automated build.