Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] Target Platform best practice for "parentless" modules

On 11/15/2013 08:32 AM, Andreas Schilling wrote:
We have an application with loads of bundles and features, pretty standard stuff. Setting up tycho for this was easy and quick and not much of problems here.
The point now is: we're developing a company-internal framework on top of Eclipse RCP which then is our base for pretty much all our applications. This framework is from an SCM point of view completely separate in its own repository.
We integrate it in our applications as a sub-repo which then becomes checked out and built as well when the application is built. This might be a bit odd from a artifact management point of view (one would probably expect to have final built arttifacts somewhere in a p2 repo or the like), but as most projects contribute to this base quite often and usually do so first in their own feature branches directly during application development (before it then becomes merged later on) this worked fine so far.
What you've identified here is indeed a good practice with Maven/Tycho: make things more modular and made clear your dependencies between your modules. It makes sense to have a "common" repo, have modules A, B and C (providing features A, B and C) depending on the common repo and providing each one a A, B or C p2 repo, and have your "product" repo building against the "common", A, B and C repo.
In general 1 SCM repo = 1 Maven build = 1 p2 repo.

That target platform is then (obviously) used for both the application bundles and the framework. And that's what we failed so far to reproduce again: because the POM of the application is not the parent of the POM for the framework, the build fails for the framework bundles as the target platform is not available to them.
So the pretty broad question would be what options there are to solve this in an elegant way.
In the Maven world, the elegant way to share some artifacts (target platform are artifacts) is to deploy them on a Maven repo. So you'll need to set up a company-wide Maven repo such as Nexus, where you can "mvn deploy" your target platform.
All projects (your application and your framework) can now reference this Maven repo and consume the target-platform artifact, as described in http://wiki.eclipse.org/Tycho/Target_Platform#Target_files


Although you're probably aware of most of it, you might find some tips about TP on this presentation: http://www.slideshare.net/mickaelistria/a-journey-with-target-platforms

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

Back to the top