Nils Breunese created MTOOLCHAINS-58:
----------------------------------------
Summary: Auto-detected Azul Zulu OpenJDK 8 is not found when
selecting version 8, 1.8 or 1.8.0
Key: MTOOLCHAINS-58
URL: https://issues.apache.org/jira/browse/MTOOLCHAINS-58
Project: Maven Toolchains Plugin
Issue Type: Bug
Affects Versions: 3.2.0
Reporter: Nils Breunese
I have Azul Zulu OpenJDK 8 installed, and it is indeed auto-discovered by
{{toolchains:display-discovered-jdk-toolchains}}:
{code}
[INFO] -
/opt/local/Library/Java/JavaVirtualMachines/openjdk8-zulu/Contents/Home
[INFO] provides:
[INFO] version: 1.8.0_432
[INFO] runtime.name: OpenJDK Runtime Environment
[INFO] runtime.version: 1.8.0_432-b06
[INFO] vendor: Azul Systems, Inc.
[INFO] lts: true
{code}
I then want Maven to use Java 1.8 to build this project by adding this:
{code}
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-toolchains-plugin</artifactId>
<version>3.2.0</version>
<executions>
<execution>
<goals>
<goal>select-jdk-toolchain</goal>
</goals>
<configuration>
<version>1.8</version><!-- I also tried 8 here -->
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
{code}
But then I get this error message:
{code}
org.apache.maven.plugin.MojoFailureException: Cannot find matching toolchain
definitions for the following toolchain types:{version=1.8}
Define the required toolchains in your ~/.m2/toolchains.xml file.
{code}
I've also tried setting the version to {{8}} and {{1.8.0}}, but that also
didn't work.
Setting the version to {{1.8.0_432}} does work, but I don't want to force other
developers to have this exact Java 8 build installed.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)