Skip to content

Downloading JDK EA builds #13

@cushon

Description

@cushon

Is there a way to download early access JDK builds with the plugin?

E.g. looking at https://api.foojay.io/disco/v3.0/distributions there are several entries for early access builds of JDK 24 with versions like 24-ea+9, but there doesn't appear to be a way to download them.

Demo:

      <plugin>
        <groupId>org.mvnsearch</groupId>
        <artifactId>toolchains-maven-plugin</artifactId>
        <version>4.5.0</version>
        <executions>
            <execution>
              <id>download-24</id>
              <goals>
                <goal>toolchain</goal>
              </goals>
              <configuration>
                <toolchains>
                  <jdk>
                    <version>24</version>
                    <vendor>zulu</vendor>
                  </jdk>
                </toolchains>
              </configuration>
            </execution>
          </executions>
        </plugin>
$ mvn package
...
java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0
    at jdk.internal.util.Preconditions.outOfBounds (Preconditions.java:100)
    at jdk.internal.util.Preconditions.outOfBoundsCheckIndex (Preconditions.java:106)
    at jdk.internal.util.Preconditions.checkIndex (Preconditions.java:302)
    at java.util.Objects.checkIndex (Objects.java:385)
    at java.util.ArrayList.get (ArrayList.java:427)
    at com.google.gson.JsonArray.get (JsonArray.java:203)
    at org.apache.maven.plugins.toolchain.FoojayService.parseFileNameAndDownloadUrl (FoojayService.java:145)

This CLI also does not download EA versions:

$ ./mt.sh add 24 --vendor=zulu
JDK not found: 24

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions