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.
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:
I tried using
targetClassesDirectoryto put them somewhere else but could not figure out how to make the build correctly see them for the rest of compilation.