akhikhl / wuff

Gradle plugin for automating assembly of OSGi/Eclipse bundles and applications
MIT License
152 stars 51 forks source link

Support for passing JVM args to runtime configuration #26

Closed mcmil closed 10 years ago

mcmil commented 10 years ago

JVM args can now be passed from the product configuration. This change is needed in order to easily support e(fx)clipse start as an equinox application. The use case would be something like this:

products {
        jvmParameters << '-Dapp.address=localhost:8080/'
        jvmParameters << '-Xmx2048m'
        jvmParameters << '-Xms1024m'
        launchParameters << '-clearPersistedState'
        launchParameters << '-application'
        launchParameters << 'org.eclipse.fx.ui.workbench.fx.application'
   }

We cannot pass the jvm params using the -vmargs launch parameter, because it is ignored by the osgi runtime when we try to bootstrap it with e(fx)clipse dependencies.

akhikhl commented 10 years ago

That's a nice feature! To discuss before merge: maybe, it would be better to rename jvmParameter(s) to jvmArg(s), so that we stay "compatible" with other gradle plugins? I would consider even renaming launchParameters to launchArgs.

mcmil commented 10 years ago

Thanks for the fast feedback. I've changed jvmParameters to jvmArgs as you've suggested. I'm not sure about changing launchParameters because it would probably break existing builds. I've also added the feature to the shell build (not only for windows).

akhikhl commented 10 years ago

Wonderful, thank you so much :)