You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "slawekjaranowski (via GitHub)" <gi...@apache.org> on 2025/11/11 07:20:33 UTC

Re: [PR] [MJAR-311] Switch to the Maven 4 API [maven-jar-plugin]

slawekjaranowski commented on code in PR #70:
URL: https://github.com/apache/maven-jar-plugin/pull/70#discussion_r2513110241


##########
src/main/java/org/apache/maven/plugins/jar/AbstractJarMojo.java:
##########
@@ -289,79 +263,82 @@ public File createArchive() throws MojoExecutionException {
         MavenArchiver archiver = new MavenArchiver();
         archiver.setCreatedBy("Maven JAR Plugin", "org.apache.maven.plugins", "maven-jar-plugin");
         archiver.setArchiver((JarArchiver) archivers.get(archiverName));
-        archiver.setOutputFile(jarFile);
-
-        Optional.ofNullable(toolchainManager.getToolchainFromBuildContext("jdk", session))
-                .ifPresent(toolchain -> toolchainsJdkSpecification
-                        .getJDKSpecification(toolchain)
-                        .ifPresent(jdkSpec -> {
-                            archive.addManifestEntry("Build-Jdk-Spec", jdkSpec);
-                            archive.addManifestEntry(
-                                    "Build-Tool-Jdk-Spec", System.getProperty("java.specification.version"));
-                            archiver.setBuildJdkSpecDefaultEntry(false);
-                            getLog().info("Set Build-Jdk-Spec based on toolchain in maven-jar-plugin " + toolchain);
-                        }));

Review Comment:
   Why this one was removed?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org