amaembo / streamex

Enhancing Java Stream API
Apache License 2.0
2.18k stars 249 forks source link

Include version information in module descriptor #253

Closed sormuras closed 2 years ago

sormuras commented 2 years ago

Although a local test via mvn verify failed with...

[ERROR] Failed to execute goal pw.krejci:multi-release-jar-maven-plugin:0.1.5:compile (default-compile) on project streamex: Failed to prepare multi-release sources for staged compilation.: Destination '/workspaces/streamex/target/sources-9/descriptor/module-info.java' already exists -> [Help 1]

...this should do the trick. If not, either @metlos might help here with pointing to the right location to configure the extended maven-compiler-plugin ... or adding an additional invocation of Java's jar --update --file ... --module-version is the way.

amaembo commented 2 years ago

It looks like it started working automagically when I migrated to a newer maven-compiler-plugin and got rid of multi-release-jar-maven-plugin. At least, now I see the version in decompiler:

\streamex\target\classes\META-INF\versions\9>javap module-info.class
Compiled from "module-info.java"
module one.util.streamex@0.8.1-SNAPSHOT {
  requires java.base;
  exports one.util.streamex;
}

Nevertheless thanks for the help!

sormuras commented 2 years ago

That's even better - you're welcome!