Open deivid-rodriguez opened 4 years ago
have you tried running rake jar
(should run the same mvn build but using embedded maven) ?
I could not reproduce, but the debug output does show three things:
/tmp/jruby-ant-launcher-2933954772202697501.log
[DEBUG] Executing '/usr/lib/jvm/java-11-openjdk-amd64/bin/java' with arguments:
'-XX:+IgnoreUnrecognizedVMOptions'
'--add-opens=java.base/java.security.cert=ALL-UNNAMED'
'--add-opens=java.base/java.security=ALL-UNNAMED'
'--add-opens=java.base/java.util.zip=ALL-UNNAMED'
'--add-opens=java.base/java.lang.reflect=ALL-UNNAMED'
'--add-opens=java.base/javax.crypto=ALL-UNNAMED'
'--illegal-access=warn'
'-cp'
'/home/deivid/Code/jruby-openssl/pkg/test-classes:/home/deivid/Code/jruby-openssl/pkg/classes:/home/deivid/.m2/repository/org/bouncycastle/bcprov-jdk15on/1.62/bcprov-jdk15on-1.62.jar:/home/deivid/.m2/repository/org/bouncycastle/bcpkix-jdk15on/1.62/bcpkix-jdk15on-1.62.jar:/home/deivid/.m2/repository/org/bouncycastle/bctls-jdk15on/1.62/bctls-jdk15on-1.62.jar:/home/deivid/.m2/repository/org/jruby/jruby-core/1.7.20/jruby-core-1.7.20.jar:/home/deivid/.m2/repository/org/ow2/asm/asm/5.0.3/asm-5.0.3.jar:/home/deivid/.m2/repository/org/ow2/asm/asm-commons/5.0.3/asm-commons-5.0.3.jar:/home/deivid/.m2/repository/org/ow2/asm/asm-tree/5.0.3/asm-tree-5.0.3.jar:/home/deivid/.m2/repository/org/ow2/asm/asm-analysis/5.0.3/asm-analysis-5.0.3.jar:/home/deivid/.m2/repository/org/ow2/asm/asm-util/5.0.3/asm-util-5.0.3.jar:/home/deivid/.m2/repository/org/jruby/joni/joni/2.1.3/joni-2.1.3.jar:/home/deivid/.m2/repository/com/github/jnr/jnr-netdb/1.1.2/jnr-netdb-1.1.2.jar:/home/deivid/.m2/repository/com/github/jnr/jnr-enxio/0.9/jnr-enxio-0.9.jar:/home/deivid/.m2/repository/com/github/jnr/jnr-x86asm/1.0.2/jnr-x86asm-1.0.2.jar:/home/deivid/.m2/repository/com/github/jnr/jnr-unixsocket/0.8/jnr-unixsocket-0.8.jar:/home/deivid/.m2/repository/com/github/jnr/jnr-posix/3.0.12/jnr-posix-3.0.12.jar:/home/deivid/.m2/repository/org/jruby/extras/bytelist/1.0.11/bytelist-1.0.11.jar:/home/deivid/.m2/repository/com/github/jnr/jnr-constants/0.8.7/jnr-constants-0.8.7.jar:/home/deivid/.m2/repository/org/jruby/jcodings/jcodings/1.0.13/jcodings-1.0.13.jar:/home/deivid/.m2/repository/com/github/jnr/jnr-ffi/2.0.3/jnr-ffi-2.0.3.jar:/home/deivid/.m2/repository/com/github/jnr/jffi/1.2.9/jffi-1.2.9.jar:/home/deivid/.m2/repository/com/github/jnr/jffi/1.2.9/jffi-1.2.9-native.jar:/home/deivid/.m2/repository/org/yaml/snakeyaml/1.13/snakeyaml-1.13.jar:/home/deivid/.m2/repository/com/jcraft/jzlib/1.1.3/jzlib-1.1.3.jar:/home/deivid/.m2/repository/com/headius/invokebinder/1.2/invokebinder-1.2.jar:/home/deivid/.m2/repository/com/martiansoftware/nailgun-server/0.9.1/nailgun-server-0.9.1.jar:/home/deivid/.m2/repository/org/jruby/yecht/1.0/yecht-1.0.jar:/home/deivid/.m2/repository/joda-time/joda-time/2.5/joda-time-2.5.jar:/home/deivid/.m2/repository/com/headius/options/1.2/options-1.2.jar:/home/deivid/.m2/repository/junit/junit/4.11/junit-4.11.jar:/home/deivid/.m2/repository/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar:/home/deivid/.m2/repository/org/jruby/jruby-complete/9.1.17.0/jruby-complete-9.1.17.0.jar'
'-Xbootclasspath/a:/home/deivid/.m2/repository/org/jruby/jruby-complete/9.1.17.0/jruby-complete-9.1.17.0.jar'
'org.jruby.Main'
'-I'
'/home/deivid/Code/jruby-openssl/lib'
'-W0'
'-e'
'load('jar:file:/home/deivid/.m2/repository/org/jruby/jruby-complete/9.1.17.0/jruby-complete-9.1.17.0.jar!/META-INF/jruby.home/bin/gem')'
'--'
'build'
'/home/deivid/Code/jruby-openssl/jruby-openssl.gemspec'
Perhaps you can check the log and see if it provides more information? Alternatively, you could reassemble this command line and see what happens on your system.
have you tried running
rake jar
(should run the same mvn build but using embedded maven) ?
Oh, I should've mentioned this for the complete story. I did try rake jar
and that succeeded. Then I run gem build
and gem install
and those succeeded too. But then at runtime I get the same error I'm getting with mvn
, namely,
NameError: cannot load Java class org.jruby.ext.openssl.OpenSSL
It seems a problem with the built jar
file. With mvn
it fails earlier because the gem build
command @headius mentioned uses -I</path/to/jruby-openssl/clone>/lib
, and since gem build
currently does require "openssl"
at some point, tries to use the built jar and fails.
If I do rake jar
and then manually gem build
, then rubygems
uses the system version of openssl
(0.10.4), so it succeeds.
Perhaps you can check the log and see if it provides more information? Alternatively, you could reassemble this command line and see what happens on your system.
The log no longer exists after mvn
is done, and the command run directly fails in the same way, due to the reason I explained in the previous comment. If I manually remove the -I
flag, then the command succeeds, but it still fails when actually trying to use the built jar.
I tried to open the built jar and it's indeed empty. There's no compiled stuff in there.
Ok, I figured it out! :tada: :tada:
After noticing that the jar file was empty, I thought the problem would be around compilation because by the log it seemed that nothing was getting compiled ([INFO] Nothing to compile - all classes are up to date
).
So I reviewed the compiler's plugin configuration and noticed that the sources location seemed wrong, so I changed it like this:
diff --git a/pom.xml b/pom.xml
index 552790c..5b8e57c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -271,7 +271,7 @@ DO NOT MODIFIY - GENERATED CODE
</goals>
<configuration>
<includes>
- <include>org/jruby/gen/**/*.java</include>
+ <include>org/jruby/**/*.java</include>
</includes>
<optimize>true</optimize>
<compilerArgs>
And now, the sources are correctly picked up and compiled (even if with a bunch of warnings)!
$ JAVA_OPTS=--illegal-access mvn package -Dmaven.test.skip=true
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1 (file:/usr/share/maven/lib/guice.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for rubygems:jruby-openssl:gem:0.10.5.dev-SNAPSHOT
[WARNING] 'build.plugins.plugin.(groupId:artifactId)' must be unique but found duplicate declaration of plugin org.apache.maven.plugins:maven-clean-plugin @ line 300, column 15
[WARNING] 'build.plugins.plugin.(groupId:artifactId)' must be unique but found duplicate declaration of plugin org.apache.maven.plugins:maven-dependency-plugin @ line 346, column 15
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] -----------------------< rubygems:jruby-openssl >-----------------------
[INFO] Building JRuby OpenSSL 0.10.5.dev-SNAPSHOT
[INFO] --------------------------------[ gem ]---------------------------------
[INFO]
[INFO] --- gem-maven-plugin:1.1.8:initialize (default-initialize) @ jruby-openssl ---
[INFO]
[INFO] --- maven-resources-plugin:3.1.0:resources (default-resources) @ jruby-openssl ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /home/deivid/Code/jruby-openssl/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ jruby-openssl ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ jruby-openssl ---
[INFO] Building jar: /home/deivid/Code/jruby-openssl/lib/jopenssl.jar
[INFO]
[INFO] --- exec-maven-plugin:1.3.2:exec (invoker-generator) @ jruby-openssl ---
[INFO]
[INFO] --- build-helper-maven-plugin:1.9:add-source (default) @ jruby-openssl ---
[INFO] Source directory: /home/deivid/Code/jruby-openssl/target/generated-sources added.
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:compile (compile-populators) @ jruby-openssl ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 119 source files to /home/deivid/Code/jruby-openssl/pkg/classes
[WARNING] /home/deivid/Code/jruby-openssl/src/main/java/org/jruby/ext/openssl/x509store/X509AuxCertificate.java:[306,36] org.bouncycastle.jce.provider.X509CertificateObject in org.bouncycastle.jce.provider has been deprecated
[WARNING] /home/deivid/Code/jruby-openssl/src/main/java/org/jruby/ext/openssl/x509store/X509AuxCertificate.java:[306,83] org.bouncycastle.jce.provider.X509CertificateObject in org.bouncycastle.jce.provider has been deprecated
[WARNING] /home/deivid/Code/jruby-openssl/src/main/java/org/jruby/ext/openssl/x509store/Store.java:[306,28] CRL() in org.jruby.ext.openssl.x509store.CRL has been deprecated
[WARNING] /home/deivid/Code/jruby-openssl/src/main/java/org/jruby/ext/openssl/x509store/Name.java:[134,30] org.bouncycastle.jce.provider.X509CertificateObject in org.bouncycastle.jce.provider has been deprecated
[WARNING] /home/deivid/Code/jruby-openssl/src/main/java/org/jruby/ext/openssl/x509store/PEMInputOutput.java:[198,26] deprecated item is not annotated with @Deprecated
[WARNING] /home/deivid/Code/jruby-openssl/src/main/java/org/jruby/ext/openssl/x509store/PEMInputOutput.java:[671,38] deprecated item is not annotated with @Deprecated
[WARNING] /home/deivid/Code/jruby-openssl/src/main/java/org/jruby/ext/openssl/x509store/PEMInputOutput.java:[711,38] deprecated item is not annotated with @Deprecated
[WARNING] /home/deivid/Code/jruby-openssl/src/main/java/org/jruby/ext/openssl/x509store/PEMInputOutput.java:[751,27] deprecated item is not annotated with @Deprecated
[WARNING] /home/deivid/Code/jruby-openssl/src/main/java/org/jruby/ext/openssl/x509store/PEMInputOutput.java:[1286,34] osslKeyIvLength(java.lang.String) in org.jruby.ext.openssl.Cipher.Algorithm has been deprecated
[WARNING] /home/deivid/Code/jruby-openssl/src/main/java/org/jruby/ext/openssl/impl/PKey.java:[289,13] org.bouncycastle.asn1.sec.ECPrivateKeyStructure in org.bouncycastle.asn1.sec has been deprecated
[WARNING] /home/deivid/Code/jruby-openssl/src/main/java/org/jruby/ext/openssl/impl/PKey.java:[289,46] org.bouncycastle.asn1.sec.ECPrivateKeyStructure in org.bouncycastle.asn1.sec has been deprecated
[WARNING] /home/deivid/Code/jruby-openssl/src/main/java/org/jruby/ext/openssl/PKeyRSA.java:[549,19] getBigInteger(org.jruby.runtime.builtin.IRubyObject) in org.jruby.ext.openssl.BN has been deprecated
[WARNING] /home/deivid/Code/jruby-openssl/src/main/java/org/jruby/ext/openssl/PKeyRSA.java:[559,19] getBigInteger(org.jruby.runtime.builtin.IRubyObject) in org.jruby.ext.openssl.BN has been deprecated
[WARNING] /home/deivid/Code/jruby-openssl/src/main/java/org/jruby/ext/openssl/PKeyRSA.java:[569,19] getBigInteger(org.jruby.runtime.builtin.IRubyObject) in org.jruby.ext.openssl.BN has been deprecated
[WARNING] /home/deivid/Code/jruby-openssl/src/main/java/org/jruby/ext/openssl/PKeyRSA.java:[709,24] getBigInteger(org.jruby.runtime.builtin.IRubyObject) in org.jruby.ext.openssl.BN has been deprecated
[WARNING] /home/deivid/Code/jruby-openssl/src/main/java/org/jruby/ext/openssl/PKeyRSA.java:[742,24] getBigInteger(org.jruby.runtime.builtin.IRubyObject) in org.jruby.ext.openssl.BN has been deprecated
[WARNING] /home/deivid/Code/jruby-openssl/src/main/java/org/jruby/ext/openssl/PKeyDSA.java:[536,34] getBigInteger(org.jruby.runtime.builtin.IRubyObject) in org.jruby.ext.openssl.BN has been deprecated
[WARNING] /home/deivid/Code/jruby-openssl/src/main/java/org/jruby/ext/openssl/Random.java:[171,36] isAccessible() in java.lang.reflect.AccessibleObject has been deprecated
[WARNING] /home/deivid/Code/jruby-openssl/src/main/java/org/jruby/ext/openssl/X509Cert.java:[160,35] javax.security.cert.CertificateEncodingException in javax.security.cert has been deprecated
[WARNING] /home/deivid/Code/jruby-openssl/src/main/java/org/jruby/ext/openssl/X509Cert.java:[160,35] javax.security.cert.CertificateEncodingException in javax.security.cert has been deprecated
[WARNING] /home/deivid/Code/jruby-openssl/src/main/java/org/jruby/ext/openssl/X509Cert.java:[160,35] javax.security.cert.CertificateEncodingException in javax.security.cert has been deprecated
[WARNING] /home/deivid/Code/jruby-openssl/src/main/java/org/jruby/ext/openssl/X509Cert.java:[159,69] javax.security.cert.Certificate in javax.security.cert has been deprecated
[WARNING] /home/deivid/Code/jruby-openssl/src/main/java/org/jruby/ext/openssl/X509Cert.java:[159,69] javax.security.cert.Certificate in javax.security.cert has been deprecated
[WARNING] /home/deivid/Code/jruby-openssl/src/main/java/org/jruby/ext/openssl/X509Cert.java:[159,69] javax.security.cert.Certificate in javax.security.cert has been deprecated
[WARNING] /home/deivid/Code/jruby-openssl/src/main/java/org/jruby/ext/openssl/X509Cert.java:[165,35] javax.security.cert.CertificateEncodingException in javax.security.cert has been deprecated
[WARNING] /home/deivid/Code/jruby-openssl/src/main/java/org/jruby/ext/openssl/X509Cert.java:[165,35] javax.security.cert.CertificateEncodingException in javax.security.cert has been deprecated
[WARNING] /home/deivid/Code/jruby-openssl/src/main/java/org/jruby/ext/openssl/X509Cert.java:[165,35] javax.security.cert.CertificateEncodingException in javax.security.cert has been deprecated
[WARNING] /home/deivid/Code/jruby-openssl/src/main/java/org/jruby/ext/openssl/X509Cert.java:[164,68] javax.security.cert.Certificate in javax.security.cert has been deprecated
[WARNING] /home/deivid/Code/jruby-openssl/src/main/java/org/jruby/ext/openssl/X509Cert.java:[164,68] javax.security.cert.Certificate in javax.security.cert has been deprecated
[WARNING] /home/deivid/Code/jruby-openssl/src/main/java/org/jruby/ext/openssl/X509Cert.java:[164,68] javax.security.cert.Certificate in javax.security.cert has been deprecated
[WARNING] /home/deivid/Code/jruby-openssl/src/main/java/org/jruby/ext/openssl/X509Cert.java:[594,30] org.bouncycastle.x509.X509V3CertificateGenerator in org.bouncycastle.x509 has been deprecated
[WARNING] /home/deivid/Code/jruby-openssl/src/main/java/org/jruby/ext/openssl/X509Cert.java:[628,34] org.bouncycastle.x509.X509V3CertificateGenerator in org.bouncycastle.x509 has been deprecated
[WARNING] /home/deivid/Code/jruby-openssl/src/main/java/org/jruby/ext/openssl/X509Cert.java:[628,34] org.bouncycastle.x509.X509V3CertificateGenerator in org.bouncycastle.x509 has been deprecated
[WARNING] /home/deivid/Code/jruby-openssl/src/main/java/org/jruby/ext/openssl/X509Cert.java:[628,34] org.bouncycastle.x509.X509V3CertificateGenerator in org.bouncycastle.x509 has been deprecated
[WARNING] /home/deivid/Code/jruby-openssl/src/main/java/org/jruby/ext/openssl/X509Cert.java:[629,30] org.bouncycastle.x509.X509V3CertificateGenerator in org.bouncycastle.x509 has been deprecated
[WARNING] /home/deivid/Code/jruby-openssl/src/main/java/org/jruby/ext/openssl/X509Cert.java:[630,38] org.bouncycastle.x509.X509V3CertificateGenerator in org.bouncycastle.x509 has been deprecated
[WARNING] /home/deivid/Code/jruby-openssl/src/main/java/org/jruby/ext/openssl/X509Cert.java:[636,76] getRealName() in org.jruby.ext.openssl.X509Name has been deprecated
[WARNING] /home/deivid/Code/jruby-openssl/src/main/java/org/jruby/ext/openssl/X509Cert.java:[637,73] getRealName() in org.jruby.ext.openssl.X509Name has been deprecated
[WARNING] /home/deivid/Code/jruby-openssl/src/main/java/org/jruby/ext/openssl/SSLSocket.java:[1065,32] javax.security.cert.Certificate in javax.security.cert has been deprecated
[WARNING] /home/deivid/Code/jruby-openssl/src/main/java/org/jruby/ext/openssl/SSLSocket.java:[1065,74] getPeerCertificateChain() in javax.net.ssl.SSLSession has been deprecated
[WARNING] /home/deivid/Code/jruby-openssl/src/main/java/org/jruby/ext/openssl/SSLSocket.java:[1072,35] javax.security.cert.CertificateEncodingException in javax.security.cert has been deprecated
[WARNING] /home/deivid/Code/jruby-openssl/src/main/java/org/jruby/ext/openssl/OSSLLibrary.java:[12,8] deprecated item is not annotated with @Deprecated
[WARNING] /home/deivid/Code/jruby-openssl/src/main/java/org/jruby/ext/openssl/SecurityHelper.java:[215,51] newInstance() in java.lang.Class has been deprecated
[WARNING] /home/deivid/Code/jruby-openssl/src/main/java/org/jruby/ext/openssl/SecurityHelper.java:[700,29] org.bouncycastle.jce.provider.X509CRLObject in org.bouncycastle.jce.provider has been deprecated
[WARNING] /home/deivid/Code/jruby-openssl/src/main/java/org/jruby/ext/openssl/SecurityHelper.java:[756,34] org.bouncycastle.jce.provider.X509CRLObject in org.bouncycastle.jce.provider has been deprecated
[WARNING] /home/deivid/Code/jruby-openssl/src/main/java/org/jruby/ext/openssl/SecurityHelper.java:[796,36] newInstance() in java.lang.Class has been deprecated
[WARNING] /home/deivid/Code/jruby-openssl/src/main/java/org/jruby/ext/openssl/SecurityHelper.java:[810,35] newInstance() in java.lang.Class has been deprecated
[WARNING] /home/deivid/Code/jruby-openssl/src/main/java/org/jruby/ext/openssl/impl/NetscapeCertRequest.java:[126,17] SubjectPublicKeyInfo(org.bouncycastle.asn1.ASN1Sequence) in org.bouncycastle.asn1.x509.SubjectPublicKeyInfo has been deprecated
[WARNING] /home/deivid/Code/jruby-openssl/src/main/java/org/jruby/ext/openssl/OpenSSLReal.java:[39,8] deprecated item is not annotated with @Deprecated
[WARNING] /home/deivid/Code/jruby-openssl/src/main/java/org/jruby/ext/openssl/PEMUtils.java:[171,15] org.bouncycastle.openssl.PEMWriter in org.bouncycastle.openssl has been deprecated
[WARNING] /home/deivid/Code/jruby-openssl/src/main/java/org/jruby/ext/openssl/PEMUtils.java:[171,41] org.bouncycastle.openssl.PEMWriter in org.bouncycastle.openssl has been deprecated
[INFO] /home/deivid/Code/jruby-openssl/src/main/java/org/jruby/ext/openssl/Utils.java: Some input files use unchecked or unsafe operations.
[INFO] /home/deivid/Code/jruby-openssl/src/main/java/org/jruby/ext/openssl/Utils.java: Recompile with -Xlint:unchecked for details.
[INFO]
[INFO] --- maven-dependency-plugin:2.8:copy-dependencies (default) @ jruby-openssl ---
[INFO] bctls-jdk15on-1.62.jar already exists in destination.
[INFO] bcpkix-jdk15on-1.62.jar already exists in destination.
[INFO] bcprov-jdk15on-1.62.jar already exists in destination.
[INFO]
[INFO] --- maven-resources-plugin:3.1.0:testResources (default-testResources) @ jruby-openssl ---
[INFO] Not copying test resources
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) @ jruby-openssl ---
[INFO] Not compiling test sources
[INFO]
[INFO] --- maven-surefire-plugin:3.0.0-M4:test (default-test) @ jruby-openssl ---
[INFO] Tests are skipped.
[INFO]
[INFO] --- runit-maven-plugin:1.1.8:test (default) @ jruby-openssl ---
[INFO] Skipping RUnit tests
[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default) @ jruby-openssl ---
[INFO] Building jar: /home/deivid/Code/jruby-openssl/lib/jopenssl.jar
[INFO]
[INFO] --- gem-maven-plugin:1.1.8:package (default-package) @ jruby-openssl ---
[INFO] include dependencies? true
[INFO] use repository layout? true
[INFO] -- include -- org.bouncycastle:bcprov-jdk15on:jar:1.62:compile
[INFO] -- include -- org.bouncycastle:bcpkix-jdk15on:jar:1.62:compile
[INFO] -- include -- org.bouncycastle:bctls-jdk15on:jar:1.62:compile
[INFO] Successfully built RubyGem
[INFO] Name: jruby-openssl
[INFO] Version: 0.10.5.dev
[INFO] File: jruby-openssl-0.10.5.dev-java.gem
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 23.646 s
[INFO] Finished at: 2020-03-26T12:27:46+01:00
[INFO] ------------------------------------------------------------------------
I was able to build, install, and use the generated gem, and confirm that the warnings meant to be fixed by #194 are indeed fixed for me :tada:.
Now, my question is. The pom.xml
is not supposed to be edited directly (there's a big warning sign about that on top of it). I assume it's generated from the Mavenfile
, so I changed it there too:
diff --git a/Mavenfile b/Mavenfile
index 591ea52..3b6a169 100644
--- a/Mavenfile
+++ b/Mavenfile
@@ -64,7 +64,7 @@ plugin( :compiler, '3.1',
execute_goal :compile,
:id => 'compile-populators', :phase => 'process-classes',
- :includes => [ 'org/jruby/gen/**/*.java' ],
+ :includes => [ 'org/jruby/**/*.java' ],
:optimize => true,
:compilerArgs => [ '', '-XDignore.symbol.file=true' ]
end
How do I regenerate pom.xml
from Mavenfile
?
there's a two phases of javac compilation as populators are generated during the first phase. this change should not be necessary, the problem might be that you're not using polyglot ...
setup is similar to JRuby's https://github.com/jruby/jruby/blob/master/.mvn/extensions.xml than the (readonly) pom.xml is always in sync - generated from the Mavenfile
I am going to push a .mvn/extensions.xml
and let's see if you're okay building than using mvn
Nice, thanks, teaching maven
to speak ruby
through that extension manifest sounds like the way to go :)
I had just managed to automate regeneration of the pom.xml
with something like ruby -rruby-maven -e "RubyMaven.exec('validate')"
, which does generate a few changes on it, although they don't seem important:
diff --git a/pom.xml b/pom.xml
index 552790c..ca375c1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -60,18 +60,18 @@ DO NOT MODIFIY - GENERATED CODE
</snapshotRepository>
</distributionManagement>
<properties>
+ <runit.dir>src/test/ruby/**/test_*.rb</runit.dir>
+ <polyglot.dump.readonly>true</polyglot.dump.readonly>
<bc.versions>1.62</bc.versions>
- <invoker.skip>${maven.test.skip}</invoker.skip>
<invoker.test>${bc.versions}</invoker.test>
- <jruby.plugins.version>1.1.8</jruby.plugins.version>
- <jruby.switches>-W0</jruby.switches>
- <jruby.version>9.1.17.0</jruby.version>
- <jruby.versions>9.1.17.0</jruby.versions>
<mavengem-wagon.version>1.0.3</mavengem-wagon.version>
- <mavengem.wagon.version>1.0.3</mavengem.wagon.version>
<polyglot.dump.pom>pom.xml</polyglot.dump.pom>
- <polyglot.dump.readonly>true</polyglot.dump.readonly>
- <runit.dir>src/test/ruby/**/test_*.rb</runit.dir>
+ <mavengem.wagon.version>1.0.3</mavengem.wagon.version>
+ <jruby.version>9.2.9.0</jruby.version>
+ <jruby.plugins.version>1.1.8</jruby.plugins.version>
+ <invoker.skip>${maven.test.skip}</invoker.skip>
+ <jruby.switches>-W0</jruby.switches>
+ <jruby.versions>9.2.9.0</jruby.versions>
</properties>
<dependencies>
<dependency>
@@ -433,8 +433,8 @@ DO NOT MODIFIY - GENERATED CODE
</plugins>
</build>
<properties>
- <bc.versions>1.56,1.57,1.58,1.59,1.60,1.61,1.62,1.63,1.64</bc.versions>
<jruby.modes>1.9,2.0</jruby.modes>
+ <bc.versions>1.56,1.57,1.58,1.59,1.60,1.61,1.62,1.63,1.64</bc.versions>
<jruby.versions>1.7.20</jruby.versions>
</properties>
</profile>
@@ -471,8 +471,8 @@ DO NOT MODIFIY - GENERATED CODE
</plugins>
</build>
<properties>
- <bc.versions>1.56,1.57,1.58,1.59,1.60,1.61,1.62,1.63,1.64</bc.versions>
<jruby.modes>1.9,2.0</jruby.modes>
+ <bc.versions>1.56,1.57,1.58,1.59,1.60,1.61,1.62,1.63,1.64</bc.versions>
<jruby.versions>1.7.22</jruby.versions>
</properties>
</profile>
@@ -509,8 +509,8 @@ DO NOT MODIFIY - GENERATED CODE
</plugins>
</build>
<properties>
- <bc.versions>1.56,1.57,1.58,1.59,1.60,1.61,1.62,1.63,1.64</bc.versions>
<jruby.modes>1.9,2.0</jruby.modes>
+ <bc.versions>1.56,1.57,1.58,1.59,1.60,1.61,1.62,1.63,1.64</bc.versions>
<jruby.versions>1.7.23</jruby.versions>
</properties>
</profile>
@@ -547,8 +547,8 @@ DO NOT MODIFIY - GENERATED CODE
</plugins>
</build>
<properties>
- <bc.versions>1.56,1.57,1.58,1.59,1.60,1.61,1.62,1.63,1.64</bc.versions>
<jruby.modes>1.9,2.0</jruby.modes>
+ <bc.versions>1.56,1.57,1.58,1.59,1.60,1.61,1.62,1.63,1.64</bc.versions>
<jruby.versions>1.7.24</jruby.versions>
</properties>
</profile>
@@ -585,8 +585,8 @@ DO NOT MODIFIY - GENERATED CODE
</plugins>
</build>
<properties>
- <bc.versions>1.56,1.57,1.58,1.59,1.60,1.61,1.62,1.63,1.64</bc.versions>
<jruby.modes>1.9,2.0</jruby.modes>
+ <bc.versions>1.56,1.57,1.58,1.59,1.60,1.61,1.62,1.63,1.64</bc.versions>
<jruby.versions>1.7.25</jruby.versions>
</properties>
</profile>
@@ -623,8 +623,8 @@ DO NOT MODIFIY - GENERATED CODE
</plugins>
</build>
<properties>
- <bc.versions>1.56,1.57,1.58,1.59,1.60,1.61,1.62,1.63,1.64</bc.versions>
<jruby.modes>1.9,2.0</jruby.modes>
+ <bc.versions>1.56,1.57,1.58,1.59,1.60,1.61,1.62,1.63,1.64</bc.versions>
<jruby.versions>1.7.26</jruby.versions>
</properties>
</profile>
@@ -661,8 +661,8 @@ DO NOT MODIFIY - GENERATED CODE
</plugins>
</build>
<properties>
- <bc.versions>1.56,1.57,1.58,1.59,1.60,1.61,1.62,1.63,1.64</bc.versions>
<jruby.modes>1.9,2.0</jruby.modes>
+ <bc.versions>1.56,1.57,1.58,1.59,1.60,1.61,1.62,1.63,1.64</bc.versions>
<jruby.versions>1.7.27</jruby.versions>
</properties>
</profile>
@@ -700,8 +700,8 @@ DO NOT MODIFIY - GENERATED CODE
</build>
<properties>
<bc.versions>1.56,1.57,1.58,1.59,1.60,1.61,1.62,1.63,1.64</bc.versions>
- <jruby.version>9.0.1.0</jruby.version>
<jruby.versions>9.0.1.0</jruby.versions>
+ <jruby.version>9.0.1.0</jruby.version>
</properties>
</profile>
<profile>
@@ -738,8 +738,8 @@ DO NOT MODIFIY - GENERATED CODE
</build>
<properties>
<bc.versions>1.56,1.57,1.58,1.59,1.60,1.61,1.62,1.63,1.64</bc.versions>
- <jruby.version>9.0.5.0</jruby.version>
<jruby.versions>9.0.5.0</jruby.versions>
+ <jruby.version>9.0.5.0</jruby.version>
</properties>
</profile>
<profile>
@@ -776,8 +776,8 @@ DO NOT MODIFIY - GENERATED CODE
</build>
<properties>
<bc.versions>1.56,1.57,1.58,1.59,1.60,1.61,1.62,1.63,1.64</bc.versions>
- <jruby.version>9.1.2.0</jruby.version>
<jruby.versions>9.1.2.0</jruby.versions>
+ <jruby.version>9.1.2.0</jruby.version>
</properties>
</profile>
<profile>
@@ -814,8 +814,8 @@ DO NOT MODIFIY - GENERATED CODE
</build>
<properties>
<bc.versions>1.56,1.57,1.58,1.59,1.60,1.61,1.62,1.63,1.64</bc.versions>
- <jruby.version>9.1.8.0</jruby.version>
<jruby.versions>9.1.8.0</jruby.versions>
+ <jruby.version>9.1.8.0</jruby.version>
</properties>
</profile>
<profile>
@@ -852,8 +852,8 @@ DO NOT MODIFIY - GENERATED CODE
</build>
<properties>
<bc.versions>1.56,1.57,1.58,1.59,1.60,1.61,1.62,1.63,1.64</bc.versions>
- <jruby.version>9.1.12.0</jruby.version>
<jruby.versions>9.1.12.0</jruby.versions>
+ <jruby.version>9.1.12.0</jruby.version>
</properties>
</profile>
<profile>
@@ -890,8 +890,8 @@ DO NOT MODIFIY - GENERATED CODE
</build>
<properties>
<bc.versions>1.56,1.57,1.58,1.59,1.60,1.61,1.62,1.63,1.64</bc.versions>
- <jruby.version>9.1.16.0</jruby.version>
<jruby.versions>9.1.16.0</jruby.versions>
+ <jruby.version>9.1.16.0</jruby.version>
</properties>
</profile>
<profile>
@@ -928,8 +928,8 @@ DO NOT MODIFIY - GENERATED CODE
</build>
<properties>
<bc.versions>1.56,1.57,1.58,1.59,1.60,1.61,1.62,1.63,1.64</bc.versions>
- <jruby.version>9.1.17.0</jruby.version>
<jruby.versions>9.1.17.0</jruby.versions>
+ <jruby.version>9.1.17.0</jruby.version>
</properties>
</profile>
<profile>
@@ -966,8 +966,8 @@ DO NOT MODIFIY - GENERATED CODE
</build>
<properties>
<bc.versions>1.56,1.57,1.58,1.59,1.60,1.61,1.62,1.63,1.64</bc.versions>
- <jruby.version>9.2.0.0</jruby.version>
<jruby.versions>9.2.0.0</jruby.versions>
+ <jruby.version>9.2.0.0</jruby.version>
</properties>
</profile>
<profile>
@@ -1004,8 +1004,8 @@ DO NOT MODIFIY - GENERATED CODE
</build>
<properties>
<bc.versions>1.56,1.57,1.58,1.59,1.60,1.61,1.62,1.63,1.64</bc.versions>
- <jruby.version>9.2.5.0</jruby.version>
<jruby.versions>9.2.5.0</jruby.versions>
+ <jruby.version>9.2.5.0</jruby.version>
</properties>
</profile>
<profile>
@@ -1042,8 +1042,8 @@ DO NOT MODIFIY - GENERATED CODE
</build>
<properties>
<bc.versions>1.56,1.57,1.58,1.59,1.60,1.61,1.62,1.63,1.64</bc.versions>
- <jruby.version>9.2.6.0</jruby.version>
<jruby.versions>9.2.6.0</jruby.versions>
+ <jruby.version>9.2.6.0</jruby.version>
</properties>
</profile>
<profile>
@@ -1080,8 +1080,8 @@ DO NOT MODIFIY - GENERATED CODE
</build>
<properties>
<bc.versions>1.56,1.57,1.58,1.59,1.60,1.61,1.62,1.63,1.64</bc.versions>
- <jruby.version>9.2.7.0</jruby.version>
<jruby.versions>9.2.7.0</jruby.versions>
+ <jruby.version>9.2.7.0</jruby.version>
</properties>
</profile>
<profile>
@@ -1118,8 +1118,8 @@ DO NOT MODIFIY - GENERATED CODE
</build>
<properties>
<bc.versions>1.56,1.57,1.58,1.59,1.60,1.61,1.62,1.63,1.64</bc.versions>
- <jruby.version>9.2.8.0</jruby.version>
<jruby.versions>9.2.8.0</jruby.versions>
+ <jruby.version>9.2.8.0</jruby.version>
</properties>
</profile>
<profile>
@@ -1156,8 +1156,8 @@ DO NOT MODIFIY - GENERATED CODE
</build>
<properties>
<bc.versions>1.56,1.57,1.58,1.59,1.60,1.61,1.62,1.63,1.64</bc.versions>
- <jruby.version>9.2.9.0</jruby.version>
<jruby.versions>9.2.9.0</jruby.versions>
+ <jruby.version>9.2.9.0</jruby.version>
</properties>
</profile>
<profile>
Anyways, I'll wait for you to push this manifest, since definitely sounds like the way to go :)
Thanks for helping out.
So, some logs seem slightly different, but the error seems like the same thing:
The Mavenfile
seems to be correctly picked up now though because:
I get source control changes in the pom.xml
file after running the command:
diff --git a/pom.xml b/pom.xml
index 552790c..95e6a13 100644
--- a/pom.xml
+++ b/pom.xml
@@ -65,8 +65,8 @@ DO NOT MODIFIY - GENERATED CODE
<invoker.test>${bc.versions}</invoker.test>
<jruby.plugins.version>1.1.8</jruby.plugins.version>
<jruby.switches>-W0</jruby.switches>
- <jruby.version>9.1.17.0</jruby.version>
- <jruby.versions>9.1.17.0</jruby.versions>
+ <jruby.version>9.2.9.0</jruby.version>
+ <jruby.versions>9.2.9.0</jruby.versions>
<mavengem-wagon.version>1.0.3</mavengem-wagon.version>
<mavengem.wagon.version>1.0.3</mavengem.wagon.version>
<polyglot.dump.pom>pom.xml</polyglot.dump.pom>
If I edit the Mavenfile
with my "fix" of not looking on the non-existent org/jruby/gen/
directory, things get fixed, and the edit gets transmitted to the pom.xml
file.
Also, note that running the command that TravisCI is running under java 11 fails exactly in the same way on my machine. The fact that the TravisCI job is green seems like process status misreport, but the command is failing.
Able to reproduce on Java 11. The problem is we're really hitting the edges of what the polyglot ruby plugins + maven handle.
Tried looking into updating the build but I am not really up for getting myself into a rewrite (not even sure what would be best, just messing with plain pom.xml or moving to build.gradle).
This seems like yet another compatibility issue, the maven compiler plugin should be fine to work with Java 11 ... not sure why it ends up not picking up the files and producing an empty .jar.
Have been using Java 8 to build the project pretty much exclusively, recall doing experiments with generating a package-info.class
(for Java 9/10) - its been a while and I am not sure if this is a new issue since or have been present for a long.
oh right, I see - thought the compiler plugin was upgraded but wasn't due issues with the 2 phases. current compiler plugin (3.1) is not Java 11 compatible and we'll need to try upgrading the plugin.
Thanks for your research! :)
@kares Do you know where are ruby-maven
sources hosted? I found https://github.com/mkristian/ruby-maven, which says the new repo is https://github.com/takari/ruby-maven, but that one doesn't exist.
The fix for TravisCI not reporting the right status seems simple enough to fix, but I can't find where to contribute it!
Still wondering about this, since I had never seen such a situation.
Hey David, sorry your guess is as good as mine, was part of polyglot at some point. Would ask @mkristian if he could point us where the ruby-maven sources might have ended up.
Thanks, that link is helpful and sheds a bit more light.
It apparently lived there indeed and then it was "moved to its own repo" back in https://github.com/takari/polyglot-maven/commit/1ef30a1798f657af2496a2c549b0fb4fd098187e. But it's unclear what this new repo lives. My current guess is that the @takari organization has continued development on this new repo, but forgot to make it public when the move was made.
I guess we could also ask @mosabua (only public member of the @takari organization) and @jvanzyl (author of the commit that I just mentioned).
There is no ruby-maven repo in the takari org. I help with releases of polyglot-maven which includes the jruby dialect. I dont know about ruby-maven myself. @mkristian did look at upgrading polyglot for Java 11 a bit. I am not sure where ruby-maven lives .. maybe @headius knows a bit more as well..
Thanks for responding @mosabua anyways. Hopefully we'll find out the answers :)
@deivid-rodriguez I resurrected the ruby-maven repo on https://github.com/jruby/ruby-maven
Thanks! I'll contribute a patch :)
Awesome @mkristian .. we should work towards getting polyglot-maven to Java 11 ..
Ok, so funny enough, the fix I want to contribute belongs in a library called ruby-maven-libs
, which I can't find either :laughing:.
@mkristian I assume you intend to publish that too since there's now an empty https://github.com/jruby/ruby-maven-libs repo. Right?
@deivid-rodriguez right - I hoped this is not so pressing. this just the maven distribution repack into a gem. what kind of fix you want to make there ? I will work on this then.
No, not pressing at all!
The problem is that current jruby-openssl
CI against java 11 (and maybe other matrix entries, not sure) shows as green, but it's currently broken. See for example https://travis-ci.org/github/jruby/jruby-openssl/jobs/667216105.
The problem lies in the rmvn
executable failing to report the right status. The fix is simple, but it should be made inside ruby-maven-libs
code I believe.
the problem is that I did find some old code on backup but not the current setup where the ruby-maven and ruby-maven-libs are split into two.
I guess you can gem fetch ruby-maven-libs -v 3.3.9 && gem unpack ruby-maven-libs-3.3.9.gem
and push the result if you can't recover the old code.
@deivid-rodriguez have look if this helps: https://github.com/jruby/ruby-maven-libs
since I follow the version of the underlying maven it would need a newer maven version which is probably a good idea as well :)
Thanks a lot! I'll work on my fix!
I'll close this now, since I can now install the master version of jruby-openssl
and this is a separate problem.
I'm reopening this because I'm not sure why I closed it. I still need the following local patch to be able to rake install
the head version of jruby-openssl
, when using java 11.
diff --git a/Mavenfile b/Mavenfile
index 591ea52..3b6a169 100644
--- a/Mavenfile
+++ b/Mavenfile
@@ -64,7 +64,7 @@ plugin( :compiler, '3.1',
execute_goal :compile,
:id => 'compile-populators', :phase => 'process-classes',
- :includes => [ 'org/jruby/gen/**/*.java' ],
+ :includes => [ 'org/jruby/**/*.java' ],
:optimize => true,
:compilerArgs => [ '', '-XDignore.symbol.file=true' ]
end
diff --git a/Rakefile b/Rakefile
index 67c47b2..52597de 100644
--- a/Rakefile
+++ b/Rakefile
@@ -1,5 +1,7 @@
#-*- mode: ruby -*-
+require "bundler/gem_tasks"
+
begin
require 'ruby-maven'
rescue LoadError
Hello :wave: :wave:!
I still see these warnings when starting up jruby. It'd be really nice if the default branch of jruby-openssl
was released so all the WARNING: An illegal reflective access operation has occurred
warnings will be gone. Or at least that rake install
'ing this gem was a bit easier.
No pressure, just wanted to friendly ping since I don't have a great relationship with noisy warnings :smiley:.
Hey David, have pushed 0.10.5 ... kept postponing as I promised some fixes but I just keep not getting at them :crying_cat_face:
That's great! Thanks for the heads up!
Hi, just a heads-up that I still see this error in the master branch. I can confirm that I get clean builds after applying this diff.
I'm getting some warnings when using jruby that seem to come from jruby-openssl. I researched the errors and they seem to have been fixed recently in jruby-openssl's master, by the latest commit.
So I'd like to try it out and see if it fixes it.
So I run the following to try build the gem locally:
JAVA_OPTS=--illegal-access mvn package -Dmaven.test.skip=true
This is the result I get
```console WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1 (file:/usr/share/maven/lib/guice.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain) WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$1 WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release [INFO] Scanning for projects... [WARNING] [WARNING] Some problems were encountered while building the effective model for rubygems:jruby-openssl:gem:0.10.5.dev-SNAPSHOT [WARNING] 'build.plugins.plugin.(groupId:artifactId)' must be unique but found duplicate declaration of plugin org.apache.maven.plugins:maven-clean-plugin @ line 300, column 15 [WARNING] 'build.plugins.plugin.(groupId:artifactId)' must be unique but found duplicate declaration of plugin org.apache.maven.plugins:maven-dependency-plugin @ line 346, column 15 [WARNING] [WARNING] It is highly recommended to fix these problems because they threaten the stability of your build. [WARNING] [WARNING] For this reason, future Maven versions might no longer support building such malformed projects. [WARNING] [INFO] [INFO] -----------------------< rubygems:jruby-openssl >----------------------- [INFO] Building JRuby OpenSSL 0.10.5.dev-SNAPSHOT [INFO] --------------------------------[ gem ]--------------------------------- [INFO] [INFO] --- gem-maven-plugin:1.1.8:initialize (default-initialize) @ jruby-openssl --- [INFO] [INFO] --- maven-resources-plugin:3.1.0:resources (default-resources) @ jruby-openssl --- [WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent! [INFO] skip non existing resourceDirectory /home/deivid/Code/jruby-openssl/src/main/resources [INFO] [INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ jruby-openssl --- [INFO] Nothing to compile - all classes are up to date [INFO] [INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ jruby-openssl --- [INFO] [INFO] --- exec-maven-plugin:1.3.2:exec (invoker-generator) @ jruby-openssl --- /home/deivid/Code/jruby-openssl/target/generated-sources/annotated_classes.txt - not found. skip generator. [INFO] [INFO] --- build-helper-maven-plugin:1.9:add-source (default) @ jruby-openssl --- [INFO] Source directory: /home/deivid/Code/jruby-openssl/target/generated-sources added. [INFO] [INFO] --- maven-compiler-plugin:3.8.1:compile (compile-populators) @ jruby-openssl --- [INFO] Nothing to compile - all classes are up to date [INFO] [INFO] --- maven-dependency-plugin:2.8:copy-dependencies (default) @ jruby-openssl --- [INFO] bctls-jdk15on-1.62.jar already exists in destination. [INFO] bcpkix-jdk15on-1.62.jar already exists in destination. [INFO] bcprov-jdk15on-1.62.jar already exists in destination. [INFO] [INFO] --- maven-resources-plugin:3.1.0:testResources (default-testResources) @ jruby-openssl --- [INFO] Not copying test resources [INFO] [INFO] --- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) @ jruby-openssl --- [INFO] Not compiling test sources [INFO] [INFO] --- maven-surefire-plugin:3.0.0-M4:test (default-test) @ jruby-openssl --- [INFO] Tests are skipped. [INFO] [INFO] --- runit-maven-plugin:1.1.8:test (default) @ jruby-openssl --- [INFO] Skipping RUnit tests [INFO] [INFO] --- maven-jar-plugin:2.4:jar (default) @ jruby-openssl --- [INFO] [INFO] --- gem-maven-plugin:1.1.8:package (default-package) @ jruby-openssl --- [INFO] include dependencies? true [INFO] use repository layout? true [INFO] -- include -- org.bouncycastle:bcprov-jdk15on:jar:1.62:compile [INFO] -- include -- org.bouncycastle:bcpkix-jdk15on:jar:1.62:compile [INFO] -- include -- org.bouncycastle:bctls-jdk15on:jar:1.62:compile [WARNING] ERROR: Loading command: build (NameError) missing class name (`org.jruby.ext.openssl.OpenSSL') ERROR: While executing gem ... (NoMethodError) undefined method `invoke_with_build_args' for nil:NilClass [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 19.445 s [INFO] Finished at: 2020-03-25T19:39:27+01:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal de.saumya.mojo:gem-maven-plugin:1.1.8:package (default-package) on project jruby-openssl: Execution default-package of goal de.saumya.mojo:gem-maven-plugin:1.1.8:package failed: Java returned: 1 -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException ```This is the error after enabling full debug logging:
```bash Apache Maven 3.6.0 Maven home: /usr/share/maven Java version: 11.0.6, vendor: Ubuntu, runtime: /usr/lib/jvm/java-11-openjdk-amd64 Default locale: es_ES, platform encoding: UTF-8 OS name: "linux", version: "5.3.0-42-generic", arch: "amd64", family: "unix" WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1 (file:/usr/share/maven/lib/guice.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain) WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$1 WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release [DEBUG] Created new class realm maven.api [DEBUG] Importing foreign packages into class realm maven.api [DEBUG] Imported: javax.annotation.* < plexus.core [DEBUG] Imported: javax.annotation.security.* < plexus.core [DEBUG] Imported: javax.enterprise.inject.* < plexus.core [DEBUG] Imported: javax.enterprise.util.* < plexus.core [DEBUG] Imported: javax.inject.* < plexus.core [DEBUG] Imported: org.apache.maven.* < plexus.core [DEBUG] Imported: org.apache.maven.artifact < plexus.core [DEBUG] Imported: org.apache.maven.classrealm < plexus.core [DEBUG] Imported: org.apache.maven.cli < plexus.core [DEBUG] Imported: org.apache.maven.configuration < plexus.core [DEBUG] Imported: org.apache.maven.exception < plexus.core [DEBUG] Imported: org.apache.maven.execution < plexus.core [DEBUG] Imported: org.apache.maven.execution.scope < plexus.core [DEBUG] Imported: org.apache.maven.lifecycle < plexus.core [DEBUG] Imported: org.apache.maven.model < plexus.core [DEBUG] Imported: org.apache.maven.monitor < plexus.core [DEBUG] Imported: org.apache.maven.plugin < plexus.core [DEBUG] Imported: org.apache.maven.profiles < plexus.core [DEBUG] Imported: org.apache.maven.project < plexus.core [DEBUG] Imported: org.apache.maven.reporting < plexus.core [DEBUG] Imported: org.apache.maven.repository < plexus.core [DEBUG] Imported: org.apache.maven.rtinfo < plexus.core [DEBUG] Imported: org.apache.maven.settings < plexus.core [DEBUG] Imported: org.apache.maven.toolchain < plexus.core [DEBUG] Imported: org.apache.maven.usability < plexus.core [DEBUG] Imported: org.apache.maven.wagon.* < plexus.core [DEBUG] Imported: org.apache.maven.wagon.authentication < plexus.core [DEBUG] Imported: org.apache.maven.wagon.authorization < plexus.core [DEBUG] Imported: org.apache.maven.wagon.events < plexus.core [DEBUG] Imported: org.apache.maven.wagon.observers < plexus.core [DEBUG] Imported: org.apache.maven.wagon.proxy < plexus.core [DEBUG] Imported: org.apache.maven.wagon.repository < plexus.core [DEBUG] Imported: org.apache.maven.wagon.resource < plexus.core [DEBUG] Imported: org.codehaus.classworlds < plexus.core [DEBUG] Imported: org.codehaus.plexus.* < plexus.core [DEBUG] Imported: org.codehaus.plexus.classworlds < plexus.core [DEBUG] Imported: org.codehaus.plexus.component < plexus.core [DEBUG] Imported: org.codehaus.plexus.configuration < plexus.core [DEBUG] Imported: org.codehaus.plexus.container < plexus.core [DEBUG] Imported: org.codehaus.plexus.context < plexus.core [DEBUG] Imported: org.codehaus.plexus.lifecycle < plexus.core [DEBUG] Imported: org.codehaus.plexus.logging < plexus.core [DEBUG] Imported: org.codehaus.plexus.personality < plexus.core [DEBUG] Imported: org.codehaus.plexus.util.xml.Xpp3Dom < plexus.core [DEBUG] Imported: org.codehaus.plexus.util.xml.pull.XmlPullParser < plexus.core [DEBUG] Imported: org.codehaus.plexus.util.xml.pull.XmlPullParserException < plexus.core [DEBUG] Imported: org.codehaus.plexus.util.xml.pull.XmlSerializer < plexus.core [DEBUG] Imported: org.eclipse.aether.* < plexus.core [DEBUG] Imported: org.eclipse.aether.artifact < plexus.core [DEBUG] Imported: org.eclipse.aether.collection < plexus.core [DEBUG] Imported: org.eclipse.aether.deployment < plexus.core [DEBUG] Imported: org.eclipse.aether.graph < plexus.core [DEBUG] Imported: org.eclipse.aether.impl < plexus.core [DEBUG] Imported: org.eclipse.aether.installation < plexus.core [DEBUG] Imported: org.eclipse.aether.internal.impl < plexus.core [DEBUG] Imported: org.eclipse.aether.metadata < plexus.core [DEBUG] Imported: org.eclipse.aether.repository < plexus.core [DEBUG] Imported: org.eclipse.aether.resolution < plexus.core [DEBUG] Imported: org.eclipse.aether.spi < plexus.core [DEBUG] Imported: org.eclipse.aether.transfer < plexus.core [DEBUG] Imported: org.eclipse.aether.version < plexus.core [DEBUG] Imported: org.fusesource.jansi.* < plexus.core [DEBUG] Imported: org.slf4j.* < plexus.core [DEBUG] Imported: org.slf4j.helpers.* < plexus.core [DEBUG] Imported: org.slf4j.spi.* < plexus.core [DEBUG] Populating class realm maven.api [INFO] Error stacktraces are turned on. [DEBUG] Message scheme: color [DEBUG] Message styles: debug info warning error success failure strong mojo project [DEBUG] Reading global settings from /usr/share/maven/conf/settings.xml [DEBUG] Reading user settings from /home/deivid/.m2/settings.xml [DEBUG] Reading global toolchains from /usr/share/maven/conf/toolchains.xml [DEBUG] Reading user toolchains from /home/deivid/.m2/toolchains.xml [DEBUG] Using local repository at /home/deivid/.m2/repository [DEBUG] Using manager EnhancedLocalRepositoryManager with priority 10.0 for /home/deivid/.m2/repository [INFO] Scanning for projects... [DEBUG] Dependency collection stats: {ConflictMarker.analyzeTime=3087316, ConflictMarker.markTime=1427812, ConflictMarker.nodeCount=39, ConflictIdSorter.graphTime=1809298, ConflictIdSorter.topsortTime=1197551, ConflictIdSorter.conflictIdCount=29, ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=21251006, ConflictResolver.conflictItemCount=38, DefaultDependencyCollector.collectTime=503841921, DefaultDependencyCollector.transformTime=35431832} [DEBUG] org.torquebox.mojo:mavengem-wagon:jar:1.0.3: [DEBUG] org.torquebox.mojo:mavengem-protocol:jar:1.0.3:compile [DEBUG] org.torquebox.mojo:rubygems-tools:jar:1.0.3:compile [DEBUG] commons-codec:commons-codec:jar:1.11:compile [DEBUG] org.jruby:jruby:pom:9.1.17.0:compile [DEBUG] org.jruby:jruby:jar:9.1.17.0:compile [DEBUG] org.jruby:jruby-core:jar:9.1.17.0:compile [DEBUG] com.github.jnr:jnr-netdb:jar:1.1.6:compile [DEBUG] com.github.jnr:jnr-enxio:jar:0.16:compile [DEBUG] com.github.jnr:jnr-x86asm:jar:1.0.2:compile [DEBUG] com.github.jnr:jnr-unixsocket:jar:0.17:compile [DEBUG] com.github.jnr:jnr-posix:jar:3.0.44:compile [DEBUG] com.github.jnr:jnr-constants:jar:0.9.9:compile [DEBUG] com.github.jnr:jffi:jar:1.2.16:compile [DEBUG] com.github.jnr:jffi:jar:native:1.2.16:compile [DEBUG] org.jruby.joni:joni:jar:2.1.15:compile [DEBUG] org.jruby.extras:bytelist:jar:1.0.15:compile [DEBUG] org.jruby.jcodings:jcodings:jar:1.0.27:compile [DEBUG] org.jruby:dirgra:jar:0.3:compile [DEBUG] com.headius:invokebinder:jar:1.10:compile [DEBUG] com.headius:options:jar:1.4:compile [DEBUG] com.headius:unsafe-fences:jar:1.0:compile [DEBUG] com.jcraft:jzlib:jar:1.1.3:compile [DEBUG] com.martiansoftware:nailgun-server:jar:0.9.1:compile [DEBUG] joda-time:joda-time:jar:2.8.2:compile [DEBUG] com.headius:modulator:jar:1.0:compile [DEBUG] org.jruby:jruby-stdlib:jar:9.1.17.0:compile [DEBUG] org.apache.maven.wagon:wagon-provider-api:jar:2.10:compile [DEBUG] org.codehaus.plexus:plexus-utils:jar:3.0.15:compile [DEBUG] Created new class realm extension>org.torquebox.mojo:mavengem-wagon:1.0.3 [DEBUG] Importing foreign packages into class realm extension>org.torquebox.mojo:mavengem-wagon:1.0.3 [DEBUG] Imported: < maven.api [DEBUG] Populating class realm extension>org.torquebox.mojo:mavengem-wagon:1.0.3 [DEBUG] Included: org.torquebox.mojo:mavengem-wagon:jar:1.0.3 [DEBUG] Included: org.torquebox.mojo:mavengem-protocol:jar:1.0.3 [DEBUG] Included: org.torquebox.mojo:rubygems-tools:jar:1.0.3 [DEBUG] Included: commons-codec:commons-codec:jar:1.11 [DEBUG] Included: org.jruby:jruby:pom:9.1.17.0 [DEBUG] Included: org.jruby:jruby:jar:9.1.17.0 [DEBUG] Included: org.jruby:jruby-core:jar:9.1.17.0 [DEBUG] Included: com.github.jnr:jnr-netdb:jar:1.1.6 [DEBUG] Included: com.github.jnr:jnr-enxio:jar:0.16 [DEBUG] Included: com.github.jnr:jnr-x86asm:jar:1.0.2 [DEBUG] Included: com.github.jnr:jnr-unixsocket:jar:0.17 [DEBUG] Included: com.github.jnr:jnr-posix:jar:3.0.44 [DEBUG] Included: com.github.jnr:jnr-constants:jar:0.9.9 [DEBUG] Included: com.github.jnr:jffi:jar:1.2.16 [DEBUG] Included: com.github.jnr:jffi:jar:native:1.2.16 [DEBUG] Included: org.jruby.joni:joni:jar:2.1.15 [DEBUG] Included: org.jruby.extras:bytelist:jar:1.0.15 [DEBUG] Included: org.jruby.jcodings:jcodings:jar:1.0.27 [DEBUG] Included: org.jruby:dirgra:jar:0.3 [DEBUG] Included: com.headius:invokebinder:jar:1.10 [DEBUG] Included: com.headius:options:jar:1.4 [DEBUG] Included: com.headius:unsafe-fences:jar:1.0 [DEBUG] Included: com.jcraft:jzlib:jar:1.1.3 [DEBUG] Included: com.martiansoftware:nailgun-server:jar:0.9.1 [DEBUG] Included: joda-time:joda-time:jar:2.8.2 [DEBUG] Included: com.headius:modulator:jar:1.0 [DEBUG] Included: org.jruby:jruby-stdlib:jar:9.1.17.0 [DEBUG] Included: org.codehaus.plexus:plexus-utils:jar:3.0.15 [DEBUG] Dependency collection stats: {ConflictMarker.analyzeTime=591055, ConflictMarker.markTime=372522, ConflictMarker.nodeCount=59, ConflictIdSorter.graphTime=217064, ConflictIdSorter.topsortTime=72190, ConflictIdSorter.conflictIdCount=23, ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=2903667, ConflictResolver.conflictItemCount=58, DefaultDependencyCollector.collectTime=329321424, DefaultDependencyCollector.transformTime=4233052} [DEBUG] de.saumya.mojo:gem-with-jar-extension:jar:1.1.8: [DEBUG] org.apache.maven:maven-plugin-api:jar:3.0.3:compile [DEBUG] org.apache.maven:maven-model:jar:3.0.3:compile [DEBUG] org.sonatype.sisu:sisu-inject-plexus:jar:2.1.1:compile [DEBUG] org.sonatype.sisu:sisu-inject-bean:jar:2.1.1:compile [DEBUG] org.sonatype.sisu:sisu-guice:jar:no_aop:2.9.4:compile [DEBUG] org.apache.maven:maven-core:jar:3.0.3:compile [DEBUG] org.apache.maven:maven-settings:jar:3.0.3:compile [DEBUG] org.apache.maven:maven-settings-builder:jar:3.0.3:compile [DEBUG] org.apache.maven:maven-repository-metadata:jar:3.0.3:compile [DEBUG] org.apache.maven:maven-model-builder:jar:3.0.3:compile [DEBUG] org.apache.maven:maven-aether-provider:jar:3.0.3:compile [DEBUG] org.sonatype.aether:aether-spi:jar:1.11:compile [DEBUG] org.sonatype.aether:aether-impl:jar:1.11:compile [DEBUG] org.sonatype.aether:aether-api:jar:1.11:compile [DEBUG] org.sonatype.aether:aether-util:jar:1.11:compile [DEBUG] org.codehaus.plexus:plexus-interpolation:jar:1.14:compile [DEBUG] org.codehaus.plexus:plexus-utils:jar:2.0.6:compile [DEBUG] org.codehaus.plexus:plexus-classworlds:jar:2.4:compile [DEBUG] org.codehaus.plexus:plexus-component-annotations:jar:1.5.5:compile [DEBUG] org.sonatype.plexus:plexus-sec-dispatcher:jar:1.3:compile [DEBUG] org.sonatype.plexus:plexus-cipher:jar:1.4:compile [DEBUG] org.apache.maven:maven-artifact:jar:3.0.3:compile [DEBUG] Created new class realm extension>de.saumya.mojo:gem-with-jar-extension:1.1.8 [DEBUG] Importing foreign packages into class realm extension>de.saumya.mojo:gem-with-jar-extension:1.1.8 [DEBUG] Imported: < maven.api [DEBUG] Populating class realm extension>de.saumya.mojo:gem-with-jar-extension:1.1.8 [DEBUG] Included: de.saumya.mojo:gem-with-jar-extension:jar:1.1.8 [DEBUG] Included: org.sonatype.sisu:sisu-inject-bean:jar:2.1.1 [DEBUG] Included: org.sonatype.sisu:sisu-guice:jar:no_aop:2.9.4 [DEBUG] Included: org.sonatype.aether:aether-util:jar:1.11 [DEBUG] Included: org.codehaus.plexus:plexus-interpolation:jar:1.14 [DEBUG] Included: org.codehaus.plexus:plexus-utils:jar:2.0.6 [DEBUG] Included: org.codehaus.plexus:plexus-component-annotations:jar:1.5.5 [DEBUG] Included: org.sonatype.plexus:plexus-sec-dispatcher:jar:1.3 [DEBUG] Included: org.sonatype.plexus:plexus-cipher:jar:1.4 [DEBUG] Extension realms for project rubygems:jruby-openssl:gem:0.10.5.dev-SNAPSHOT: [ClassRealm[extension>org.torquebox.mojo:mavengem-wagon:1.0.3, parent: jdk.internal.loader.ClassLoaders$AppClassLoader@277050dc], ClassRealm[extension>de.saumya.mojo:gem-with-jar-extension:1.1.8, parent: jdk.internal.loader.ClassLoaders$AppClassLoader@277050dc]] [DEBUG] Created new class realm project>rubygems:jruby-openssl:0.10.5.dev-SNAPSHOT [DEBUG] Populating class realm project>rubygems:jruby-openssl:0.10.5.dev-SNAPSHOT [DEBUG] Looking up lifecycle mappings for packaging gem from ClassRealm[project>rubygems:jruby-openssl:0.10.5.dev-SNAPSHOT, parent: ClassRealm[maven.api, parent: null]] [WARNING] [WARNING] Some problems were encountered while building the effective model for rubygems:jruby-openssl:gem:0.10.5.dev-SNAPSHOT [WARNING] 'build.plugins.plugin.(groupId:artifactId)' must be unique but found duplicate declaration of plugin org.apache.maven.plugins:maven-clean-plugin @ line 300, column 15 [WARNING] 'build.plugins.plugin.(groupId:artifactId)' must be unique but found duplicate declaration of plugin org.apache.maven.plugins:maven-dependency-plugin @ line 346, column 15 [WARNING] [WARNING] It is highly recommended to fix these problems because they threaten the stability of your build. [WARNING] [WARNING] For this reason, future Maven versions might no longer support building such malformed projects. [WARNING] [DEBUG] === REACTOR BUILD PLAN ================================================ [DEBUG] Project: rubygems:jruby-openssl:gem:0.10.5.dev-SNAPSHOT [DEBUG] Tasks: [package] [DEBUG] Style: Regular [DEBUG] ======================================================================= [INFO] [INFO] -----------------------< rubygems:jruby-openssl >----------------------- [INFO] Building JRuby OpenSSL 0.10.5.dev-SNAPSHOT [INFO] --------------------------------[ gem ]--------------------------------- [DEBUG] Could not find metadata org.apache.maven.plugins:maven-resources-plugin/maven-metadata.xml in local (/home/deivid/.m2/repository) [DEBUG] Skipped remote request for org.apache.maven.plugins:maven-resources-plugin/maven-metadata.xml, locally cached metadata up-to-date. [DEBUG] Resolved plugin version for org.apache.maven.plugins:maven-resources-plugin to 3.1.0 from repository central (https://repo.maven.apache.org/maven2, default, releases) [DEBUG] Could not find metadata org.apache.maven.plugins:maven-surefire-plugin/maven-metadata.xml in local (/home/deivid/.m2/repository) [DEBUG] Skipped remote request for org.apache.maven.plugins:maven-surefire-plugin/maven-metadata.xml, locally cached metadata up-to-date. [DEBUG] Resolved plugin version for org.apache.maven.plugins:maven-surefire-plugin to 3.0.0-M4 from repository central (https://repo.maven.apache.org/maven2, default, releases) [DEBUG] Could not find metadata org.apache.maven.plugins:maven-install-plugin/maven-metadata.xml in local (/home/deivid/.m2/repository) [DEBUG] Skipped remote request for org.apache.maven.plugins:maven-install-plugin/maven-metadata.xml, locally cached metadata up-to-date. [DEBUG] Resolved plugin version for org.apache.maven.plugins:maven-install-plugin to 3.0.0-M1 from repository central (https://repo.maven.apache.org/maven2, default, releases) [DEBUG] Lifecycle default -> [validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy] [DEBUG] Lifecycle clean -> [pre-clean, clean, post-clean] [DEBUG] Lifecycle site -> [pre-site, site, post-site, site-deploy] [DEBUG] Lifecycle default -> [validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy] [DEBUG] Lifecycle clean -> [pre-clean, clean, post-clean] [DEBUG] Lifecycle site -> [pre-site, site, post-site, site-deploy] [DEBUG] Lifecycle default -> [validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy] [DEBUG] Lifecycle clean -> [pre-clean, clean, post-clean] [DEBUG] Lifecycle site -> [pre-site, site, post-site, site-deploy] [DEBUG] Lifecycle default -> [validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy] [DEBUG] Lifecycle clean -> [pre-clean, clean, post-clean] [DEBUG] Lifecycle site -> [pre-site, site, post-site, site-deploy] [DEBUG] Lifecycle default -> [validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy] [DEBUG] Lifecycle clean -> [pre-clean, clean, post-clean] [DEBUG] Lifecycle site -> [pre-site, site, post-site, site-deploy] [DEBUG] Lifecycle default -> [validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy] [DEBUG] Lifecycle clean -> [pre-clean, clean, post-clean] [DEBUG] Lifecycle site -> [pre-site, site, post-site, site-deploy] [DEBUG] Lifecycle default -> [validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy] [DEBUG] Lifecycle clean -> [pre-clean, clean, post-clean] [DEBUG] Lifecycle site -> [pre-site, site, post-site, site-deploy] [DEBUG] Lifecycle default -> [validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy] [DEBUG] Lifecycle clean -> [pre-clean, clean, post-clean] [DEBUG] Lifecycle site -> [pre-site, site, post-site, site-deploy] [DEBUG] Lifecycle default -> [validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy] [DEBUG] Lifecycle clean -> [pre-clean, clean, post-clean] [DEBUG] Lifecycle site -> [pre-site, site, post-site, site-deploy] [DEBUG] Lifecycle default -> [validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy] [DEBUG] Lifecycle clean -> [pre-clean, clean, post-clean] [DEBUG] Lifecycle site -> [pre-site, site, post-site, site-deploy] [DEBUG] Lifecycle default -> [validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy] [DEBUG] Lifecycle clean -> [pre-clean, clean, post-clean] [DEBUG] Lifecycle site -> [pre-site, site, post-site, site-deploy] [DEBUG] === PROJECT BUILD PLAN ================================================ [DEBUG] Project: rubygems:jruby-openssl:0.10.5.dev-SNAPSHOT [DEBUG] Dependencies (collect): [] [DEBUG] Dependencies (resolve): [compile, runtime, test] [DEBUG] Repositories (dependencies): [mavengems (mavengem:https://rubygems.org, default, releases+snapshots), central (https://repo.maven.apache.org/maven2, default, releases)] [DEBUG] Repositories (plugins) : [central (https://repo.maven.apache.org/maven2, default, releases)] [DEBUG] ----------------------------------------------------------------------- [DEBUG] Goal: de.saumya.mojo:gem-maven-plugin:1.1.8:initialize (default-initialize) [DEBUG] Style: Regular [DEBUG] Configuration:I tired upgrading some stuff in
pom.xml
like this:but I still get the same errors.
My environment is the following: