Skip to main content



      Home
Home » Eclipse Projects » P2 » How to get correct version jre number generated in eclipse.ini
How to get correct version jre number generated in eclipse.ini [message #1805302] Thu, 11 April 2019 07:59 Go to next message
Eclipse UserFriend
Hi,

I'm trying to build an eclipse product using mvn. I followed the instructions mentioned here to get the jvm included as a feature inside the product.

https://codeiseasy.wordpress.com/2012/07/31/including-a-jre-in-a-tycho-build/

Unfortunately, the resulting product contains qualifiers in the version number of enclused features. I don't know how to instruct p2 to use that version number when setting the jvm option in the eclipse.ini.

I'm trying a p2.inf like:

instructions.configure=\
org.eclipse.equinox.p2.touchpoint.eclipse.setJvm(jvm:features/walb.hello.jre/features/walb.hello.jre_${version}/jre/bin);
instructions.unconfigure=\
org.eclipse.equinox.p2.touchpoint.eclipse.setJvm(jvm:null);


Using 'mvn clean package' results in building a product in an eclipse.ini (found in .\jrebug.git\products\walb.hello.product\target\products\walb\win32\win32\x86_64\eclipse.ini) that looks like:
-startup
plugins/org.eclipse.equinox.launcher_1.5.300.v20190213-1655.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.1000.v20190125-2016
-vm
features/walb.hello.jre/features/walb.hello.jre_/jre/bin


You see, it misses the version number; something like: walb.hello.jre_1.0.0.201904111153

How can I make sure that it refers to the generated version number?

Greetings,
Wilbert.
Re: How to get correct version jre number generated in eclipse.ini [message #1811186 is a reply to message #1805302] Wed, 28 August 2019 06:23 Go to previous message
Eclipse UserFriend
I stumbled upon the same problem 9 years later:) The only solution I figured out so far is modifying the p2.inf file itself by means of a Maven plugin:

	<plugin>
		<groupId>com.google.code.maven-replacer-plugin</groupId>
		<artifactId>replacer</artifactId>
		<version>1.5.3</version>
		<executions>
			<execution>
				<phase>generate-sources</phase>
				<goals>
					<goal>replace</goal>
				</goals>
			</execution>
		</executions>
		<configuration>
			<file>${basedir}/p2.inf</file>
			<replacements>						
				<replacement>							
					<token>^.*$</token>
					<value>instructions.configure=org.eclipse.equinox.p2.touchpoint.eclipse.setJvm(jvm:features/net.adoptopenjdk.jre.feature_${qualifiedVersion}/jre/bin);</value>
				</replacement>
			</replacements>
		</configuration>
	</plugin>
Previous Topic:Problems with P2 garbage collector
Next Topic:Eclipse can't load all bundles after upgraded to eclipse 4.10
Goto Forum:
  


Current Time: Sat Jun 21 06:42:07 EDT 2025

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

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

Back to the top