jruby-maven-plugins
jruby-maven-plugins copied to clipboard
How can I pass -Xcext.enabled=true
I need to add this parameter in order to "support" native C extensions. I understand that JRuby doesn't really play well with C extensions, but there are hard dependencies there that I can not work around even if the project doesn't even use them.
<supportNative>true</supportNative> does nothing it seems.
<jrubySwitches>-Xcext.enabled=true</jrubySwitches> doesn't work either. It gives me the error: [INFO] jruby: invalid extended option cext.enabled=true
<jrubyJvmArgs>-Djruby.cext.enabled=true</jrubyJvmArgs> doesn't work either.
I could keep going but I'm sure we all get the idea ;) It doesn't seem possible with:
<groupId>de.saumya.mojo</groupId>
<artifactId>gem-maven-plugin</artifactId>
<version>1.0.0-beta</version>
To pass this parameter to jruby within maven.
Note that if I set JRUBY_OPTS='-Xcext.enabled=true' or if I create a file called .jrubyrc with cext.enabled=true inside, then this works as expected.
sorry for the late reply- kind of offline. what jruby version do you use ? the default from the jruby-maven-plugins ? jruby kind of dropped this extension support for jruby 1.7.x and for the plugin it needs to download the full jruby distribution since jruby-complete does not have any native support (which the plugin usually uses).
that the JRUBY_OPTS works surprises me - maybe there is a JRUBY_HOME set as well ? what is the exact content of .jrubyrc (just try to understand) ?
which gem is the "offending" one you need to install ? so I can make sure it works at least on my side.
Next line solved problem for me: export JRUBY_OPTS="-Xcext.enabled=true"