Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[tycho-user] Problem including JREs via features

Hello,

I have an RCP app for which I'm using tycho to build that has been working great so far but now I've run into a problem.

I now want to include the JRE into the package being produced by the tycho-p2-director-plugin plugin.  My understanding is that one way to do this is via features.

I want to create distributions of my app for Win32 and OS X.  So, I created two new features: com.oracle.jre.win32.feature and com.oracle.jre.macosx.feature.  Each of these features have java's jre/ folder at the root and a p2.inf file describing where to find the JRE.  Each feature also has the "os" and "arch" properly set to match the JRE.

When I activate only a win32 environment via the target-platform-configuration plugin and only include the com.oracle.jre.win32.feature in my product everything works fine.  The maven build produces a zip that contains an app that fires up without issue.  However, when I then included com.oracle.jre.macosx.feature in my product and activate the macosx environment as well I get the following error during a build:


[INFO] --- tycho-p2-publisher-plugin:0.16.0:publish-products (default-publish-products) @ com.bodymedia.sensewear.product ---
[INFO] Cannot complete the request.  Generating details.
[INFO] Cannot complete the request.  Generating details.
[INFO] {osgi.ws=win32, osgi.os=win32, osgi.arch=x86, org.eclipse.update.install.features=true}
[ERROR] Cannot resolve project dependencies:
[ERROR]   Software being installed: com.my_product 1.0.0
[ERROR]   Missing requirement: com.my_product 1.0.0 requires 'com.oracle.jre.macosx.feature.feature.group [7.13.0,7.13.1)' but it could not be found


It appears that when the build is at the win32 packaging stage of the build it can't find the macosx feature that is specified in the product because that feature is being filtered out.  In other words, the product depends on both the win32 and the macosx features but based on the publish environment currently being processed only one feature is "active" so dependency resolution fails when trying to find the other.

Is there a way around this?  Using the assembly plugin seems a little messy and this solution appears to be close to working.  Any suggestions?

Thanks,

-Aaron

Back to the top