Have you tried "9" instead of "1.9"?
I believe the 1.x was dropped with Java 9's release.
Also might want to bump it to Java 11 as that is a LTS release, as 9
was only supported for 6 months from september 2017 to march 2018.

Also with 9 and newer, maven.compiler.source/maven.compiler.target
have been replaced with maven.compiler.release. Not sure if the test
versions also changed or not.

I've no zero luck with a single pom with multiple src/test/java
directories, using different jdk's. The compiler supports toolchain
but when I last tried only for src/main directories, not for src/test
directories.

Also when the tests run they see everything in target/test-classes so
do you run them with 1.8 or 9?

JEP 238 supports multiple java versions in a single jar, but last time
i tried it appears to have a bug that the base version has to be java
9.

Not sure if the above helps or not, or give any insight.

John

On Wed, 9 Jun 2021 at 15:29, Gilles Sadowski <gillese...@gmail.com> wrote:
>
> Hi.
>
> "Commons Numbers" POM of module "commons-numbers-core"
> contains
> ---CUT---
>     <!-- JDK 9+ required for BigDecimal.sqrt() method in unit tests. -->
>     <maven.compiler.testSource>1.9</maven.compiler.testSource>
>     <maven.compiler.testTarget>1.9</maven.compiler.testTarget>
> ---CUT---
>
> Running
> $ JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/ mvn test site site:stage
> fails:
> ---CUT---
> [...]
> [ERROR] Failed to execute goal
> org.apache.maven.plugins:maven-compiler-plugin:3.8.1:testCompile
> (default-testCompile) on project commons-numbers-core: Fatal error
> compiling: invalid target release: 1.9 -> [Help 1]
> ---CUT---
>
> Regards,
> Gilles
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
> For additional commands, e-mail: dev-h...@commons.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org

Reply via email to