Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] How to mvn deploy to repo plugins (site) in one build and consume in another?

On 04/28/2014 06:59 PM, Michael Vorburger wrote:
Based on earlier http://dev.eclipse.org/mhonarc/lists/tycho-user/msg03590.html thread, there currently appear to be two different ways to achieve above - which one do people mostly use now (1.5 years after that thread) / you recommend?
I'd recommend using the Nexus Unzip plugin which with some configuration allows to get a static URL where you always get the latest snapshot.
Then you can consume this URL as a p2 repo in your other build.
Is there any chance that Jenkins' "Build whenever a SNAPSHOT dependency is built" could work in such a configuration? Tobias you mentioned "support for SNAPSHOTS" on the thread above. (I think https://dev.eclipse.org/mhonarc/lists/tycho-user/msg04146.html was the same Q.)
I don't think it would work immediatly as this Jenkins plugin relies only on Maven concept of SNAPSHOTs.
However, you can maybe explicit the dependency in your pom.xml by adding a dependency to the GAV of the p2 site and tell Tycho to ignore this pom dependency. With that, the Jenkins plugin may work, whereas it wouldn't affect the Tycho build.
However, if both builds take place on the same Jenkins instance, it may be better to just use the build cascade plugin.

A completely different thought that occured to me was to have a go at this from another angle: If you used git submodules to checkout out different Tycho based projects and then built them together, you wouldn't have this problem.. I've heard / read about  git submodules but not yet tried used them - any opinions about this?
They're complex to use, so I would recommend avoiding them if possible and not making them a necessary concept for your build.
However, it can be helpful to use git submodules for some specific tasks, such as rebuilding everything in one shot.

The additional advantage to this would be that you could "feature branch" such different projects together - if I understand submodules correctly.
Git submodules needs to be modified (with a git commit/git push) whenever you want to consume another branch, so it's difficult to use them to automatically test feature branch.

--
Mickael Istria
Eclipse developer at JBoss, by Red Hat
My blog - My Tweets

Back to the top