Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiled module descriptor in complete JAR distro #4899

Closed
sormuras opened this issue Dec 16, 2017 · 4 comments
Closed

Compiled module descriptor in complete JAR distro #4899

sormuras opened this issue Dec 16, 2017 · 4 comments

Comments

@sormuras
Copy link

sormuras commented Dec 16, 2017

Just loaded jruby-complete-9.1.15.0.jar from http://jruby.org/download and put it as a single JAR on the JPMS module path. Here it reports as a module with name:

  • com.headius.invokebinder

There's a module-info.class in the root of the JAR. I guess this happens when merging dependencies into the complete distro.

"complete" or "all" distro jars should not land on the module path -- but if they do, they should not present themselves as an explicit module nor provide an Automatic-Module-Name in the MANIFEST.

jruby-complete-9.1.14.0.jar is affected too.

jar --describe-module reports:

com.headius.invokebinder jar:file:///[...]/jruby-complete-9.1.15.0.jar/!module-info.class
exports com.headius.invokebinder
requires java.base
requires java.logging
@mkristian
Copy link
Member

right we have to more careful what we include in our uber-jars, dito for the manifest.

@headius headius added this to the JRuby 9.1.16.0 milestone Dec 19, 2017
@headius headius closed this as completed Dec 19, 2017
@headius
Copy link
Member

headius commented Dec 19, 2017

@mkristian There may be a cleaner way, but I believe I've addressed this in 83271e2.

@mkristian
Copy link
Member

@headius that is good enough as starter - need to find a way to filter them out of all artifacts not only one. maybe wildcards work.

@busbey
Copy link
Contributor

busbey commented May 25, 2018

this is still an issue on 9.1.17.0. y'all want a new issue?

busbey$ /Library/Java/JavaVirtualMachines/jdk-9.jdk/Contents/Home/bin/jar --describe-module -f ~/.m2/repository/org/jruby/jruby-complete/9.1.17.0/jruby-complete-9.1.17.0.jar
com.headius.invokebinder jar:file:///Users/busbey/.m2/repository/org/jruby/jruby-complete/9.1.17.0/jruby-complete-9.1.17.0.jar/!module-info.class
exports com.headius.invokebinder
requires java.base
requires java.logging

Found it because the Maven Enforcer Plugin got angry when the Apache HBase project tried to upgrade from 9.1.10.0 to 9.1.17.0

[INFO] Restricted to JDK 1.8 yet org.jruby:jruby-complete:jar:9.1.17.0:compile contains module-info.class targeted to JDK 1.9
[WARNING] Rule 4: org.apache.maven.plugins.enforcer.EnforceBytecodeVersion failed with message:
HBase has unsupported dependencies.
  HBase requires that all dependencies be compiled with version 1.8 or earlier
  of the JDK to properly build from source.  You appear to be using a newer dependency. You can use
  either "mvn -version" or "mvn enforcer:display-info" to verify what version is active.
  Non-release builds can temporarily build with a newer JDK version by setting the
  'compileSource' property (eg. mvn -DcompileSource=1.8 clean package).
Found Banned Dependency: org.jruby:jruby-complete:jar:9.1.17.0
Use 'mvn dependency:tree' to locate the source of the banned dependencies.

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

No branches or pull requests

4 participants