akhikhl / wuff

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

new jvmArgs do not work correctly #29

Open tschulte opened 10 years ago

tschulte commented 10 years ago

Currently I am trying to get a JavaFX-based RCP application to run. See https://github.com/tschulte/contacts-griffon.

This project is a copy of the contacts demo of e(fx)clipse and I just added the gradle build file. As you can see, I needed to do a lot of stuff to at least get it running, though it still does not run completely.

To use osgi extensions, I had to add a vmarg

products {
    launchParameter '-vmargs'
    launchParameter '-Dosgi.framework.extensions=org.eclipse.fx.osgi'
}
run {
    args.addAll(products.launchParameters)
}

I tried using the new jvmArg method instead, but that did not work.

mcmil commented 10 years ago

I think its because you would have to provide the full jar name for this extension (with the version snapshot etc.). I use it like this: products.jvmArgs << "-Dosgi.framework.extensions=${configurations.osgiExtension.first().getName()}" check It out in your build (I've placed it into the afterEvaluate section). I use the jvmArgs for app configuration and -Xmx, -Xms settings - it works without problems:

        jvmArgs << '-Dapp.address=localhost:8080/app/'
        jvmArgs << '-Xmx2048m'
        jvmArgs << '-Xms1024m'