Search code examples
javamavennexustycho

Build and deploy only changed plug-ins with Tycho


I ran into the problem that Tycho could not deploy artifacts from my multi-module project to Nexus. The reason for this was that the version already existed in Nexus and I had to enable Allow Redeployed for the used repository to avoid the problem.

I wonder now if there is a possibility to build only those modules whose version is not yet present in the Nexus repository.

As I am new to the topic there might also be another approach, to avoid the above described problem, which I am not aware of. Like building the single modules when they were changed instead of building the multi-module project.

Suggested solutions

Using SNAPSHOT versions for every plug-in is unfortunately no solution as some plug-ins are not under active development. These plug-ins cause the problem as they get rebuilt and deployed each time when the multi-module is built.


Solution

  • If the project is in active development (and redeploying continuosly to nexus) you must use a SNAPSHOT version. Ex 0.0.1-SNAPSHOT

    Your SNAPSHOTs jars will deploy againts SNAPSHOT repository with redeploy enabled.