[ 
https://issues.apache.org/jira/browse/MJAR-62?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17829843#comment-17829843
 ] 

ASF GitHub Bot commented on MJAR-62:
------------------------------------

elharo commented on code in PR #73:
URL: https://github.com/apache/maven-jar-plugin/pull/73#discussion_r1535452791


##########
src/test/java/org/apache/maven/plugins/jar/ToolchainsJdkVersionTest.java:
##########
@@ -0,0 +1,88 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.maven.plugins.jar;
+
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.Locale;
+import java.util.Optional;
+
+import org.apache.maven.toolchain.Toolchain;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Assumptions;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.ExtendWith;
+import org.mockito.Mock;
+import org.mockito.junit.jupiter.MockitoExtension;
+
+import static org.mockito.Mockito.when;
+
+@ExtendWith(MockitoExtension.class)
+class ToolchainsJdkVersionTest {
+
+    @Mock
+    private Toolchain toolchain;
+
+    private final ToolchainsJdkSpecification toolchainsJdkSpecification = new 
ToolchainsJdkSpecification();
+
+    @Test
+    void shouldReturnCorrectSpec() {
+
+        Path javaCPath = getJavaCPath();

Review Comment:
   do you need to push? I still see javaCPath





> Build-Jdk in Manifest.mf does not reflect which compiler version actually 
> compiled the classes in the jar
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: MJAR-62
>                 URL: https://issues.apache.org/jira/browse/MJAR-62
>             Project: Maven JAR Plugin
>          Issue Type: Bug
>            Reporter: Stefan Magnus Landrø
>            Assignee: Slawomir Jaranowski
>            Priority: Major
>             Fix For: 3.4.0
>
>         Attachments: example-app.zip
>
>
> Manifest.mf does not reflect the version of the compiler that built the jar, 
> but defaults to the version that maven runs under:  Build-Jdk: 
> ${java.version}.
> I believe this makes users uncertain of which compiler was actually used to 
> build the classes.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to