Skip to content
This repository has been archived by the owner on Jan 21, 2019. It is now read-only.

How to include a bundled JVM? #29

Open
winder opened this issue Sep 10, 2017 · 3 comments
Open

How to include a bundled JVM? #29

winder opened this issue Sep 10, 2017 · 3 comments

Comments

@winder
Copy link

winder commented Sep 10, 2017

There are a number of examples for bundling a JVM:
http://wiki.netbeans.org/NBIBundledJVM
https://dzone.com/articles/including-jre-in-nbi
https://blogs.oracle.com/geertjan/installing-the-jre-via-an-applications-installer-via-windows
https://platform.netbeans.org/tutorials/nbm-nbi.html#bundling-jre

But most assume the ANT build scripts are being used. Are there any examples of bundling a JVM with a mavenized project? The first link suggests that it is a matter of setting the nbi.bundled.jvm.file=<path-to-jvm.exe> property, but that doesn't seem to be exposed with nbm-maven-plugin.

I've been trying to piece things together for a while now, the example at http://www.mojohaus.org/nbm-maven-plugin/buildinstexample.html seems to allow most of the configuration required, but I don't see how I can set the nbi.bundled.jvm.file property in /harness/nbi/stub/build.xml with this method. Is that something that a custom template.xml file could accomplish?

Once I manage to get this working I'll likely create a blog post, or contribute to the nbm-maven-plugin documentation with a recipe for others to use.

@jvtrudel
Copy link

Have you found a solution to this problem?

@winder
Copy link
Author

winder commented May 16, 2018

@jvtrudel yes, it is extremely involved but you can get it working.

I documented some of my experiences:
overview of the process
this github issue during implementation
blog post describing the OSX build

Besides that I can highly recommend checking out Gephi and Ovation which are open source NetBeans Platform projects with some advanced maven builds. I spent a lot of time studying these projcets. You may also want to study my project. I've tried to take the best ideas from all the scattered information and improve them.

The biggest pieces to consider are:

  1. In maven custom template.xml is supported, in that template you can configure installer.build.dir in order to inject the necessary build harness modifications (ConfigurationLogic.java and build.xml, modified as described in the ANT tutorials).
  2. OSX is not supported by the built-in bundles, so that is a separate process (maybe not true for 9.0).
  3. Even with ANT the process of creating self-extracting runtimes for all platforms is a chore.

@jvtrudel
Copy link

ok. Thanks a lot!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants