Skip to content

Maven AOT plugin injects class files into sources jar #1254

@headius

Description

@headius

The way that the AOT classes and metadata are generated means they end up in the sources jar of a Maven project. They should not be there.

Example from the Prism parser for JRuby:

$ jar tf wasm/target/prism-parser-wasm-0.0.2-SNAPSHOT-sources.jar 
META-INF/
META-INF/MANIFEST.MF
org/
org/ruby_lang/
org/ruby_lang/prism/
org/ruby_lang/prism/wasm/
META-INF/maven/
META-INF/maven/org.ruby-lang/
META-INF/maven/org.ruby-lang/prism-parser-wasm/
org/ruby_lang/prism/wasm/Prism.java
org/ruby_lang/prism/wasm/WasmResource.java
org/ruby_lang/prism/wasm/PrismParser.java
org/ruby_lang/prism/wasm/Prism_WasiSnapshotPreview1.java
org/ruby_lang/prism/wasm/Prism_ModuleExports.java
org/ruby_lang/prism/wasm/Prism_ModuleImports.java
org/ruby_lang/prism/wasm/PrismParser.meta
org/ruby_lang/prism/wasm/PrismParserMachineFuncGroup_0.class
org/ruby_lang/prism/wasm/PrismParserMachineDispatch_0.class
org/ruby_lang/prism/wasm/PrismParserMachineShaded.class
org/ruby_lang/prism/wasm/PrismParserMachineMachineCall.class
org/ruby_lang/prism/wasm/PrismParserMachine.class
META-INF/maven/org.ruby-lang/prism-parser-wasm/pom.xml
META-INF/maven/org.ruby-lang/prism-parser-wasm/pom.properties

I tried using targetClassesDirectory to put them somewhere else but could not figure out how to make the build correctly see them for the rest of compilation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions