Skip to main content



      Home
Home » Eclipse Projects » P2 » Bundling JRE in a feature
Bundling JRE in a feature [message #1720946] Fri, 22 January 2016 00:59 Go to next message
Eclipse UserFriend
I've followed the instructions https://codeiseasy.wordpress.com/2012/07/31/including-a-jre-in-a-tycho-build/
to bundle JRE in a feature (not as a root file).
All works except file permissions in JRE are not retained during build on Mac.
As a workaround advised here:
https://dev.eclipse.org/mhonarc/lists/tycho-user/msg04632.html
I'm trying to use chmod touchpoint action to add execute bit to binaries inside JRE.

The problem is that I have no clue how to pass the location of a file to the chmod action. I've tried both native and eclipse action, passed @artifact and ${artifact.location} but none seems to be working.

Does anybody have any advice how to handle that?

[Updated on: Fri, 22 January 2016 01:00] by Moderator

Re: Bundling JRE in a feature [message #1721287 is a reply to message #1720946] Tue, 26 January 2016 06:00 Go to previous messageGo to next message
Eclipse UserFriend
Since it looks like nobody can answer this I'm going to share my solution.
What is working in setJvm and chmod touchpoint actions is ${installFolder} variable substitution.
So the path should be: ${installFolder}/features/featureid_featureversion/....
Now the problem is that $version$ substitution is not working as advertised. What I had to do is to use maven-resources-plugin to process p2.inf file with the following content (shown for Mac OS X):
instructions.configure=org.eclipse.equinox.p2.touchpoint.eclipse.setJvm(jvm:${installFolder}/features/[plarform_specific_jre_feature_id]_${qualifiedVersion}/jre/lib/jli/libjli.dylib);
instructions.install=org.eclipse.equinox.p2.touchpoint.eclipse.chmod(targetDir:${installFolder}/features/[plarform_specific_jre_feature_id]_${qualifiedVersion}/jre/lib,targetFile:jspawnhelper,permissions:755);
instructions.unconfigure=org.eclipse.equinox.p2.touchpoint.eclipse.setJvm(jvm:null);

Note setting jspawnhelper as executable - without that ProcessBuilder throws exception when trying to execute external process from Java program.

Hope that helps someone.
Re: Bundling JRE in a feature [message #1721290 is a reply to message #1721287] Tue, 26 January 2016 06:10 Go to previous messageGo to next message
Eclipse UserFriend
Which - as I've just seen - does not work in case of Oomph install.
Since Oomph installs features in bundle pools the path "${installFolder}/features/...." does not exist of course.

Any ideas anyone?
Re: Bundling JRE in a feature [message #1721308 is a reply to message #1721290] Tue, 26 January 2016 08:02 Go to previous messageGo to next message
Eclipse UserFriend
Am 26.01.2016 um 12:10 schrieb Michal Kleczek:
> Which - as I've just seen - does not work in case of Oomph install.
> Since Oomph installs features in bundle pools the path "${installFolder}/features/...." does not exist of course.
I think it should generally be "${bundlePool}/features/...". In standard "stand-alone" installations the install folder
*is* the bundle pool, so it should work in both cases with shared and with unshared bundle pool.

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
Re: Bundling JRE in a feature [message #1791843 is a reply to message #1721308] Fri, 06 July 2018 03:39 Go to previous messageGo to next message
Eclipse UserFriend
I tried to use ${bundlePool} but it seems it is not resolved inside Eclipse Target definition and I get the error that chmod failed because the path could not be found. Is this an error of the target editor or do I got something wrong?
instructions.install=org.eclipse.equinox.p2.touchpoint.eclipse.chmod(targetDir:${bundlePool}/features/<my feature name>/jre/bin,targetFile:java,permissions:755);

[Updated on: Fri, 06 July 2018 03:40] by Moderator

Re: Bundling JRE in a feature [message #1791881 is a reply to message #1791843] Fri, 06 July 2018 09:06 Go to previous messageGo to next message
Eclipse UserFriend
The P2 director/tycho also seem to not understand ${bunldePool} is there anything that must be set for this to work?
Re: Bundling JRE in a feature [message #1802228 is a reply to message #1791881] Mon, 04 February 2019 12:58 Go to previous message
Eclipse UserFriend
Did you ever find a resolution to this?
Previous Topic:Neon Repository not accessible?
Next Topic:P2 bundle info gets mangled if RCP or Eclipse install directory is renamed or moved
Goto Forum:
  


Current Time: Thu Jun 19 22:58:46 EDT 2025

Powered by FUDForum. Page generated in 0.03504 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top