You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by sj...@apache.org on 2024/04/14 21:52:18 UTC

(maven-jar-plugin) branch MJAR-307 created (now ff57ff8)

This is an automated email from the ASF dual-hosted git repository.

sjaranowski pushed a change to branch MJAR-307
in repository https://gitbox.apache.org/repos/asf/maven-jar-plugin.git


      at ff57ff8  ITs for MJAR-307 - try to reproduce

This branch includes the following new commits:

     new ff57ff8  ITs for MJAR-307 - try to reproduce

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



(maven-jar-plugin) 01/01: ITs for MJAR-307 - try to reproduce

Posted by sj...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

sjaranowski pushed a commit to branch MJAR-307
in repository https://gitbox.apache.org/repos/asf/maven-jar-plugin.git

commit ff57ff8ae6d35e4c8080072b1f4e50ba30e95ccd
Author: Slawomir Jaranowski <s....@gmail.com>
AuthorDate: Sun Apr 14 23:52:03 2024 +0200

    ITs for MJAR-307 - try to reproduce
---
 src/it/MJAR-307/pom.xml                            | 57 ++++++++++++++++++++++
 .../MJAR-307/src/main/java/foo/project003/App.java | 32 ++++++++++++
 src/it/MJAR-307/verify.groovy                      | 32 ++++++++++++
 3 files changed, 121 insertions(+)

diff --git a/src/it/MJAR-307/pom.xml b/src/it/MJAR-307/pom.xml
new file mode 100644
index 0000000..0f283ad
--- /dev/null
+++ b/src/it/MJAR-307/pom.xml
@@ -0,0 +1,57 @@
+<!--
+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.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>org.apache.maven.plugins.jar.it</groupId>
+  <artifactId>mjar-307</artifactId>
+  <packaging>jar</packaging>
+  <version>1.0</version>
+  <name>it-mjar-307</name>
+
+  <properties>
+    <build.number>123</build.number>
+    <build.sealed>sealed</build.sealed>
+  </properties>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-jar-plugin</artifactId>
+        <version>@project.version@</version>
+        <configuration>
+          <archive>
+            <index>true</index>
+            <manifest>
+              <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
+            </manifest>
+            <manifestEntries>
+              <Implementation-Build>${build.number}</Implementation-Build>
+              <Sealed>${build.sealed}</Sealed>
+            </manifestEntries>
+          </archive>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
+</project>
diff --git a/src/it/MJAR-307/src/main/java/foo/project003/App.java b/src/it/MJAR-307/src/main/java/foo/project003/App.java
new file mode 100644
index 0000000..3a3d166
--- /dev/null
+++ b/src/it/MJAR-307/src/main/java/foo/project003/App.java
@@ -0,0 +1,32 @@
+package foo.project003;
+
+/*
+ * 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.
+ */
+
+/**
+ * Hello world!
+ *
+ */
+public class App 
+{
+    public static void main( String[] args )
+    {
+        System.out.println( "Hello World!" );
+    }
+}
diff --git a/src/it/MJAR-307/verify.groovy b/src/it/MJAR-307/verify.groovy
new file mode 100644
index 0000000..8629f97
--- /dev/null
+++ b/src/it/MJAR-307/verify.groovy
@@ -0,0 +1,32 @@
+import java.util.jar.JarFile
+
+/*
+ * 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.
+ */
+
+def target = new File( basedir, "target" );
+def jarFile = new File( target, "mjar-307-1.0.jar" );
+
+assert jarFile.exists()
+
+def jar = new JarFile(jarFile)
+assert  jar.getEntry("META-INF/INDEX.LIST") != null
+
+def manifest = jar.getManifest().getMainAttributes()
+assert manifest.getValue("Implementation-Build") == "123"
+assert manifest.getValue("Sealed") == "sealed"
\ No newline at end of file