luontola / retrolambda

Backport of Java 8's lambda expressions to Java 7, 6 and 5
Apache License 2.0
3.54k stars 227 forks source link

Add "fixJava8Classpath" option to support multirelease projects #171

Open kohlschuetter opened 1 year ago

kohlschuetter commented 1 year ago

In certain environments that build multirelease jars, the Maven "classes" directory contains class files with newer Java versions, whereas the Java 8 versions are stored elsewhere.

Add a boolean "fixJava8Classpath" option that, once enabled, automatically fixes these classpath entries. It checks for the presence of a sibling directory named "classes-java8". If that's available, then the original classpath entry is replaced.

luontola commented 1 year ago

Requires a test case to reproduce whatever was the issue. "classes-java8" sounds like something project specific.