Skip to content

add support for JDK toolchains #327

@hboutemy

Description

@hboutemy

New feature, improvement proposal

Maven Archiver defines META-INF/MANIFEST.MF entries:

  • Build-Jdk-Spec
  • Build-Jdk

they are taken from Maven runtime: when a JDK toochain is used, we need clarity between JDK/JRE running Maven (the build tool) vs JDK for compiling (running the compiler)

Build-Jdkand Build-Jdk-Spec in spirit are more about he compiler than Maven runtime

Build-Tool-Jdk-Spec (or Jre?) should give the Java version used by Maven build tool runtime, at least when toolchains is used, perhaps also when toolchains are not used, just to start giving good habits of not always considering they are the same
And perhaps do the equivalent for Build-Tool-Jdk

Existing solution in Maven Jar Plugin

this has been partially done in Maven Jar Plugin 3.4.0 MJAR-62:

this algorithm would be better implemented in Maven Archiver, with the plugin just configuring the toolchain to Maven Archiver: then Maven Archiver can use the toolchain

this would probably also be a good first step to injecting later the toolchain to Plexus Module Archiver that seems to be necessary given failure described in apache/maven-jar-plugin#439

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions