Reputation: 41
I'm in charge of the Maven/Tycho-based build of an Eclipse-based project. The project actually consists of two sub-projects Pa and Pb, each of which is built separately. Pa contains a number of features and plug-ins that are assembled into a p2 repository. Pb contains another bunch of features as well as a product, all depending on features from Pa.
The problem comes when I try to build the Pb product from features in Pb as well as features in Pa. My product file thus includes features like these:
<features>
<feature id="de.cau.cs.kieler.synccharts.feature" version="0.0.0"/>
<feature id="de.cau.cs.kieler.kaom.feature" version="0.0.0"/>
</features>
While the first feature comes from project Pb, the second one is from Pa and requires Maven/Tycho to download it from a p2 repository. The repository is made known to the build system through the following definition in my parent pom.xml:
<profiles>
<profile>
<id>juno42</id>
<properties>
<tycho-version>0.17.0</tycho-version>
<targetJdk>1.5</targetJdk>
</properties>
<repositories>
<repository>
<id>p2.pa</id>
<layout>p2</layout>
<url>repository_url_of_project_pa</url>
</repository>
</repositories>
</profile>
</profiles>
When I try to build Pb (after previously having built Pa and published the update site under the URL defined above), I get something like the following error message:
[ERROR] Software being installed: de.cau.cs.kieler.product 0.8.0.qualifier
[ERROR] Missing requirement: de.cau.cs.kieler.kaom.feature.feature.group 0.6.0.201304190326 requires 'de.cau.cs.kieler.core.model.gmf [0.2.2.201304190326]' but it could not be found
[ERROR] Cannot satisfy dependency: de.cau.cs.kieler.product 0.8.0.qualifier depends on: de.cau.cs.kieler.kaom.feature.feature.group 0.0.0
Maven/Tycho has obviously found the feature from Pa that is to be included in the final product, but failed to find the plug-ins the feature consists of. I double-checked that the plug-ins were in fact published in Pa's p2 repository and that the required versions matched.
Is there anything I'm failing to see? Shouldn't Tycho be able to find the plug-ins a feature consists of if it already found the feature? Any help in solving this problem is appreciated. :)
On a side note, in our project, Tycho calculates dependencies based on the MANIFEST.MF files of plug-ins, not based on dependencies defined in the pom.xml files. I checked that when I came across the problem that Tycho cannot mix the two in one reactor build.
Upvotes: 4
Views: 727
Reputation: 11723
You seem to have an error in your target platform configuration, e.g. by not activating the profile that contains the configuration.
You should start the build in debug mode (-X
) and check the target platform configuration that is printed out by Tycho.
Upvotes: 1
Reputation: 1853
One thing I noticed is that while you reference version 0.8.0.qualifier
in your product, the build complains about another version 0.6.0.qualifier
[ERROR] Missing requirement: de.cau.cs.kieler.kaom.feature.feature.group 0.6.0.201304190326 requires 'de.cau.cs.kieler.core.model.gmf [0.2.2.201304190326]' but it could not be found
Also, don't use ".qualifier" in version references unless they are built in the same reactor as .qualifier is replaced with current build timestamp. Try using "0.0.0" instead.
This looks like known tycho bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=373817
Upvotes: 0