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 shadow-2.0.2.jar #352

Closed
sormuras opened this Issue Dec 16, 2017 · 6 comments

Comments

Projects
None yet
3 participants
@sormuras

sormuras commented Dec 16, 2017

shadow-2.0.2.jar contains the module-info.class from ASM project. It reports:

  • org.objectweb.asm.commons (6.0)

as its name to the JPMS. Compiled module desriptors from other artifacts should not be present.

jar --describe-module reports:

org.objectweb.asm.commons@6.0 jar:file:///[...]shadow-2.0.2.jar/!module-info.class open
exports shadow.org.objectweb.asm.commons
requires java.base mandated
requires org.objectweb.asm transitive
requires org.objectweb.asm.tree transitive
@johnrengelman

This comment has been minimized.

Show comment
Hide comment
@johnrengelman

johnrengelman Dec 21, 2017

Owner

This is a Java 9 thing right?
I'm thinking we need to auto-configure Shadow to exclude module-info.class from dependencies.

Owner

johnrengelman commented Dec 21, 2017

This is a Java 9 thing right?
I'm thinking we need to auto-configure Shadow to exclude module-info.class from dependencies.

@sormuras

This comment has been minimized.

Show comment
Hide comment
@sormuras

sormuras Dec 21, 2017

Sounds reasonable.

sormuras commented Dec 21, 2017

Sounds reasonable.

@swankjesse

This comment has been minimized.

Show comment
Hide comment
@swankjesse

swankjesse Jun 15, 2018

FYI, I tried to use exclude to exclude module-info.class but it didn’t work. Perhaps class files are special?

task shadedJar(type: ShadowJar) {
  classifier = null
  manifest.attributes 'Main-Class': 'com.squareup.exemplar.ExemplarServiceKt'

  from(project.convention.getPlugin(JavaPluginConvention).sourceSets.main.output)
  configurations = [project.configurations.runtime]
  exclude('META-INF/INDEX.LIST', 'META-INF/*.SF', 'META-INF/*.DSA', 'META-INF/*.RSA', 'module-info.class')
}

swankjesse commented Jun 15, 2018

FYI, I tried to use exclude to exclude module-info.class but it didn’t work. Perhaps class files are special?

task shadedJar(type: ShadowJar) {
  classifier = null
  manifest.attributes 'Main-Class': 'com.squareup.exemplar.ExemplarServiceKt'

  from(project.convention.getPlugin(JavaPluginConvention).sourceSets.main.output)
  configurations = [project.configurations.runtime]
  exclude('META-INF/INDEX.LIST', 'META-INF/*.SF', 'META-INF/*.DSA', 'META-INF/*.RSA', 'module-info.class')
}
@johnrengelman

This comment has been minimized.

Show comment
Hide comment
@johnrengelman

johnrengelman Jun 19, 2018

Owner

Hmm, that should work. Theres nothing special about the file types for the exclude filter.

Owner

johnrengelman commented Jun 19, 2018

Hmm, that should work. Theres nothing special about the file types for the exclude filter.

@swankjesse

This comment has been minimized.

Show comment
Hide comment
@swankjesse

swankjesse Jun 24, 2018

@johnrengelman it was my fault. In my project we defined a shadedJar task and I was executing the shadowJar task, which wasn’t honoring any of my customizations.

swankjesse commented Jun 24, 2018

@johnrengelman it was my fault. In my project we defined a shadedJar task and I was executing the shadowJar task, which wasn’t honoring any of my customizations.

@johnrengelman johnrengelman added this to the 4.0.0 milestone Sep 16, 2018

@johnrengelman

This comment has been minimized.

Show comment
Hide comment
@johnrengelman

johnrengelman Sep 16, 2018

Owner

Added this in 275382c

Owner

johnrengelman commented Sep 16, 2018

Added this in 275382c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment