Greetings,
I’ve got to reorganize our RCP project into basically couple of different classes of product in preparation for an Open Source release.
The variants are basically: 1. Open Source version 2. Open Source + Commercial version 3. Open Source + Gov’t version 4. Open Source + Commercial + Gov’t version
Essentially what makes up each distribution are: 1. Some core set of plugins that are a mix of open source and binary release 2. Some additional plug-ins that make up Commercial variant 3. Some additional plug-ins that make up Gov’t variant 4. Some set of third-party plug-ins that are dependencies to the other plug-ins (i.e. de.ralfebert.rcputils ).
Some of the things I need to consider are that the main variants, Open Source, Commercial, Gov’t all will need to have their plug-ins in separate git repos just to: 1. Make maintaining the open source version easier (syncing new releases and merging contributed content). 2. Divide plug-ins based upon license type (EPL, GPL, Commercial, Gov’t, etc).
In the end it looks like I’m going to have about half a dozen different git repos to build a product.
My question is can anyone provide/advise with a strategy or point me to an example on dealing with this using tycho?
Normally I would think of each plug-in as it’s own artifact, but that doesn’t seem to work for me because of the dependency chain between plug-ins.
Currently as the product is all closed source, we have a single repo, and everything is just in separate folders, and a parent POM to build each distribution. I can easily have CI checkout everything, and then just build everything within the same session maven session - so resolving the dependencies just works. However now that I’m about to break everything up into multiple repositories, the tycho part seems a bit more complicated, especially when considering the Manifest vs POM first paradigm - i.e. I currently can’t just go to any plug-in’s pom.xml and build the plug-in or product, as most plug-ins, regardless of their dependencies, look like this:
<?xml version="1.0" encoding="UTF-8"?> <modelVersion>4.0.0</modelVersion> <parent> <groupId>com.sri.xxxx</groupId> <artifactId>com.sri.xxxx</artifactId> <version>1.0.0-SNAPSHOT</version> <relativePath>../</relativePath> </parent> <groupId>com.sri.xxxx</groupId> <artifactId>com.sri.xxxx.yyyy.zzz</artifactId> <version>1.0.0-SNAPSHOT</version> <packaging>eclipse-plugin</packaging> </project>
Where some of them will just build with the verify goal, and others that have package dependencies just fail. These are mostly the Commercial or Gov’t plug-ins which have dependencies on the Open Source version. What’s the right way make the these types of plug-ins build in an idempotent manner without having to tie them directly to a product that has access to all of them? Do I also need to specify the individual dependencies in the pom.xml even though they are specified in the plugin.xml and manifest.mf files? I think if I can overcome this seemingly basic problem, getting any combination of the build to work should be trivial.
Thanks in advance to any advice one can provide.
- JK
Jim Klo Senior Software Engineer Center for Software Engineering SRI International
|