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

gnodet pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-resolver.git


The following commit(s) were added to refs/heads/master by this push:
     new 353ce1f0 [Build] Unify bnd-maven-plugin and maven-jar-plugin 
invocations (#509)
353ce1f0 is described below

commit 353ce1f075ae7e802d556b8ce057dc8b8bfc8503
Author: Guillaume Nodet <[email protected]>
AuthorDate: Fri Jun 21 08:24:42 2024 +0200

    [Build] Unify bnd-maven-plugin and maven-jar-plugin invocations (#509)
---
 maven-resolver-api/pom.xml                         | 13 --------
 maven-resolver-connector-basic/pom.xml             | 13 --------
 .../maven-resolver-demo-maven-plugin/pom.xml       | 12 -------
 maven-resolver-demos/pom.xml                       | 12 +++++--
 maven-resolver-impl/pom.xml                        | 13 --------
 maven-resolver-named-locks-hazelcast/pom.xml       | 13 --------
 maven-resolver-named-locks-redisson/pom.xml        | 13 --------
 maven-resolver-named-locks/pom.xml                 | 13 --------
 maven-resolver-spi/pom.xml                         | 13 --------
 maven-resolver-supplier-mvn4/pom.xml               | 17 ----------
 maven-resolver-test-util/pom.xml                   | 17 ----------
 maven-resolver-transport-apache/pom.xml            | 13 --------
 maven-resolver-transport-classpath/pom.xml         | 13 --------
 maven-resolver-transport-file/pom.xml              | 13 --------
 maven-resolver-transport-wagon/pom.xml             | 13 --------
 maven-resolver-util/pom.xml                        | 13 --------
 pom.xml                                            | 37 +++++++++++++---------
 17 files changed, 31 insertions(+), 220 deletions(-)

diff --git a/maven-resolver-api/pom.xml b/maven-resolver-api/pom.xml
index ed32bfb5..83176a36 100644
--- a/maven-resolver-api/pom.xml
+++ b/maven-resolver-api/pom.xml
@@ -55,19 +55,6 @@
         <groupId>com.github.siom79.japicmp</groupId>
         <artifactId>japicmp-maven-plugin</artifactId>
       </plugin>
-      <plugin>
-        <groupId>biz.aQute.bnd</groupId>
-        <artifactId>bnd-maven-plugin</artifactId>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-jar-plugin</artifactId>
-        <configuration>
-          <archive>
-            
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
-          </archive>
-        </configuration>
-      </plugin>
     </plugins>
   </build>
 </project>
diff --git a/maven-resolver-connector-basic/pom.xml 
b/maven-resolver-connector-basic/pom.xml
index 4cae1a54..41c68d53 100644
--- a/maven-resolver-connector-basic/pom.xml
+++ b/maven-resolver-connector-basic/pom.xml
@@ -87,19 +87,6 @@
         <groupId>org.eclipse.sisu</groupId>
         <artifactId>sisu-maven-plugin</artifactId>
       </plugin>
-      <plugin>
-        <groupId>biz.aQute.bnd</groupId>
-        <artifactId>bnd-maven-plugin</artifactId>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-jar-plugin</artifactId>
-        <configuration>
-          <archive>
-            
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
-          </archive>
-        </configuration>
-      </plugin>
     </plugins>
   </build>
 </project>
diff --git a/maven-resolver-demos/maven-resolver-demo-maven-plugin/pom.xml 
b/maven-resolver-demos/maven-resolver-demo-maven-plugin/pom.xml
index 6c113d51..704932cd 100644
--- a/maven-resolver-demos/maven-resolver-demo-maven-plugin/pom.xml
+++ b/maven-resolver-demos/maven-resolver-demo-maven-plugin/pom.xml
@@ -74,18 +74,6 @@
     </dependency>
   </dependencies>
 
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-jar-plugin</artifactId>
-        <configuration>
-          <!-- This is needed to prevent jar plugin to fail based on wrong 
automatic module name. -->
-          <archive combine.self="override" />
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
   <profiles>
     <profile>
       <id>run-its</id>
diff --git a/maven-resolver-demos/pom.xml b/maven-resolver-demos/pom.xml
index 9342a796..7c824759 100644
--- a/maven-resolver-demos/pom.xml
+++ b/maven-resolver-demos/pom.xml
@@ -37,14 +37,20 @@
     <module>maven-resolver-demo-maven-plugin</module>
   </modules>
 
+  <properties>
+    <!-- the child modules are just source code demos and not to be shared as 
artifacts -->
+    <maven.deploy.skip>true</maven.deploy.skip>
+    <bnd.skip>true</bnd.skip>
+  </properties>
   <build>
     <pluginManagement>
       <plugins>
         <plugin>
-          <artifactId>maven-deploy-plugin</artifactId>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-jar-plugin</artifactId>
           <configuration>
-            <!-- the child modules are just source code demos and not to be 
shared as artifacts -->
-            <skip>true</skip>
+            <!-- This is needed to prevent jar plugin to fail due to a missing 
manifest and wrong automatic module name. -->
+            <archive combine.self="override" />
           </configuration>
         </plugin>
       </plugins>
diff --git a/maven-resolver-impl/pom.xml b/maven-resolver-impl/pom.xml
index 6b8923f4..9237ecb1 100644
--- a/maven-resolver-impl/pom.xml
+++ b/maven-resolver-impl/pom.xml
@@ -108,19 +108,6 @@
         <groupId>org.eclipse.sisu</groupId>
         <artifactId>sisu-maven-plugin</artifactId>
       </plugin>
-      <plugin>
-        <groupId>biz.aQute.bnd</groupId>
-        <artifactId>bnd-maven-plugin</artifactId>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-jar-plugin</artifactId>
-        <configuration>
-          <archive>
-            
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
-          </archive>
-        </configuration>
-      </plugin>
     </plugins>
   </build>
 </project>
diff --git a/maven-resolver-named-locks-hazelcast/pom.xml 
b/maven-resolver-named-locks-hazelcast/pom.xml
index 78e75a25..7bee117a 100644
--- a/maven-resolver-named-locks-hazelcast/pom.xml
+++ b/maven-resolver-named-locks-hazelcast/pom.xml
@@ -85,19 +85,6 @@
         <groupId>org.eclipse.sisu</groupId>
         <artifactId>sisu-maven-plugin</artifactId>
       </plugin>
-      <plugin>
-        <groupId>biz.aQute.bnd</groupId>
-        <artifactId>bnd-maven-plugin</artifactId>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-jar-plugin</artifactId>
-        <configuration>
-          <archive>
-            
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
-          </archive>
-        </configuration>
-      </plugin>
     </plugins>
   </build>
 
diff --git a/maven-resolver-named-locks-redisson/pom.xml 
b/maven-resolver-named-locks-redisson/pom.xml
index 71463e13..149d6b8d 100644
--- a/maven-resolver-named-locks-redisson/pom.xml
+++ b/maven-resolver-named-locks-redisson/pom.xml
@@ -146,19 +146,6 @@
         <groupId>org.eclipse.sisu</groupId>
         <artifactId>sisu-maven-plugin</artifactId>
       </plugin>
-      <plugin>
-        <groupId>biz.aQute.bnd</groupId>
-        <artifactId>bnd-maven-plugin</artifactId>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-jar-plugin</artifactId>
-        <configuration>
-          <archive>
-            
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
-          </archive>
-        </configuration>
-      </plugin>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-assembly-plugin</artifactId>
diff --git a/maven-resolver-named-locks/pom.xml 
b/maven-resolver-named-locks/pom.xml
index 3aca02f5..b47e82c0 100644
--- a/maven-resolver-named-locks/pom.xml
+++ b/maven-resolver-named-locks/pom.xml
@@ -69,19 +69,6 @@
         <groupId>org.eclipse.sisu</groupId>
         <artifactId>sisu-maven-plugin</artifactId>
       </plugin>
-      <plugin>
-        <groupId>biz.aQute.bnd</groupId>
-        <artifactId>bnd-maven-plugin</artifactId>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-jar-plugin</artifactId>
-        <configuration>
-          <archive>
-            
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
-          </archive>
-        </configuration>
-      </plugin>
     </plugins>
   </build>
 </project>
diff --git a/maven-resolver-spi/pom.xml b/maven-resolver-spi/pom.xml
index ee2ad0fc..b87cf752 100644
--- a/maven-resolver-spi/pom.xml
+++ b/maven-resolver-spi/pom.xml
@@ -54,19 +54,6 @@
         <groupId>com.github.siom79.japicmp</groupId>
         <artifactId>japicmp-maven-plugin</artifactId>
       </plugin>
-      <plugin>
-        <groupId>biz.aQute.bnd</groupId>
-        <artifactId>bnd-maven-plugin</artifactId>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-jar-plugin</artifactId>
-        <configuration>
-          <archive>
-            
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
-          </archive>
-        </configuration>
-      </plugin>
     </plugins>
   </build>
 </project>
diff --git a/maven-resolver-supplier-mvn4/pom.xml 
b/maven-resolver-supplier-mvn4/pom.xml
index 015c9514..496dc9cd 100644
--- a/maven-resolver-supplier-mvn4/pom.xml
+++ b/maven-resolver-supplier-mvn4/pom.xml
@@ -136,21 +136,4 @@
     </dependency>
   </dependencies>
 
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>biz.aQute.bnd</groupId>
-        <artifactId>bnd-maven-plugin</artifactId>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-jar-plugin</artifactId>
-        <configuration>
-          <archive>
-            
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
-          </archive>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
 </project>
diff --git a/maven-resolver-test-util/pom.xml b/maven-resolver-test-util/pom.xml
index 73e75758..6d702224 100644
--- a/maven-resolver-test-util/pom.xml
+++ b/maven-resolver-test-util/pom.xml
@@ -52,21 +52,4 @@
     </dependency>
   </dependencies>
 
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>biz.aQute.bnd</groupId>
-        <artifactId>bnd-maven-plugin</artifactId>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-jar-plugin</artifactId>
-        <configuration>
-          <archive>
-            
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
-          </archive>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
 </project>
diff --git a/maven-resolver-transport-apache/pom.xml 
b/maven-resolver-transport-apache/pom.xml
index a7c0ee37..7e318610 100644
--- a/maven-resolver-transport-apache/pom.xml
+++ b/maven-resolver-transport-apache/pom.xml
@@ -122,19 +122,6 @@
         <groupId>org.eclipse.sisu</groupId>
         <artifactId>sisu-maven-plugin</artifactId>
       </plugin>
-      <plugin>
-        <groupId>biz.aQute.bnd</groupId>
-        <artifactId>bnd-maven-plugin</artifactId>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-jar-plugin</artifactId>
-        <configuration>
-          <archive>
-            
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
-          </archive>
-        </configuration>
-      </plugin>
     </plugins>
   </build>
 </project>
diff --git a/maven-resolver-transport-classpath/pom.xml 
b/maven-resolver-transport-classpath/pom.xml
index 872ee90d..2950ff0e 100644
--- a/maven-resolver-transport-classpath/pom.xml
+++ b/maven-resolver-transport-classpath/pom.xml
@@ -74,19 +74,6 @@
         <groupId>org.eclipse.sisu</groupId>
         <artifactId>sisu-maven-plugin</artifactId>
       </plugin>
-      <plugin>
-        <groupId>biz.aQute.bnd</groupId>
-        <artifactId>bnd-maven-plugin</artifactId>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-jar-plugin</artifactId>
-        <configuration>
-          <archive>
-            
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
-          </archive>
-        </configuration>
-      </plugin>
     </plugins>
   </build>
 </project>
diff --git a/maven-resolver-transport-file/pom.xml 
b/maven-resolver-transport-file/pom.xml
index 8813871b..19faf544 100644
--- a/maven-resolver-transport-file/pom.xml
+++ b/maven-resolver-transport-file/pom.xml
@@ -89,19 +89,6 @@
         <groupId>org.eclipse.sisu</groupId>
         <artifactId>sisu-maven-plugin</artifactId>
       </plugin>
-      <plugin>
-        <groupId>biz.aQute.bnd</groupId>
-        <artifactId>bnd-maven-plugin</artifactId>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-jar-plugin</artifactId>
-        <configuration>
-          <archive>
-            
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
-          </archive>
-        </configuration>
-      </plugin>
     </plugins>
   </build>
 </project>
diff --git a/maven-resolver-transport-wagon/pom.xml 
b/maven-resolver-transport-wagon/pom.xml
index 449faf7f..6272fde5 100644
--- a/maven-resolver-transport-wagon/pom.xml
+++ b/maven-resolver-transport-wagon/pom.xml
@@ -115,19 +115,6 @@
         <groupId>org.eclipse.sisu</groupId>
         <artifactId>sisu-maven-plugin</artifactId>
       </plugin>
-      <plugin>
-        <groupId>biz.aQute.bnd</groupId>
-        <artifactId>bnd-maven-plugin</artifactId>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-jar-plugin</artifactId>
-        <configuration>
-          <archive>
-            
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
-          </archive>
-        </configuration>
-      </plugin>
     </plugins>
   </build>
 </project>
diff --git a/maven-resolver-util/pom.xml b/maven-resolver-util/pom.xml
index 905a48e8..412d9679 100644
--- a/maven-resolver-util/pom.xml
+++ b/maven-resolver-util/pom.xml
@@ -59,19 +59,6 @@
         <groupId>com.github.siom79.japicmp</groupId>
         <artifactId>japicmp-maven-plugin</artifactId>
       </plugin>
-      <plugin>
-        <groupId>biz.aQute.bnd</groupId>
-        <artifactId>bnd-maven-plugin</artifactId>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-jar-plugin</artifactId>
-        <configuration>
-          <archive>
-            
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
-          </archive>
-        </configuration>
-      </plugin>
     </plugins>
   </build>
 </project>
diff --git a/pom.xml b/pom.xml
index 6d39d436..1f730605 100644
--- a/pom.xml
+++ b/pom.xml
@@ -604,27 +604,22 @@
           <groupId>biz.aQute.bnd</groupId>
           <artifactId>bnd-maven-plugin</artifactId>
           <version>7.0.0</version>
-          <executions>
-            <execution>
-              <id>bnd-process</id>
-              <goals>
-                <goal>bnd-process</goal>
-              </goals>
-              <configuration>
-                <bnd>Bundle-SymbolicName: ${Bundle-SymbolicName}
-                  # Export packages not containing the substring 'internal'
-                  -exportcontents: 
${removeall;${packages};${packages;NAMED;*internal*}}
-                  # Reproducible build
-                  -noextraheaders: true</bnd>
-              </configuration>
-            </execution>
-          </executions>
+          <configuration>
+            <bnd><![CDATA[
+              Bundle-SymbolicName: ${Bundle-SymbolicName}
+              # Export packages not containing the substring 'internal'
+              -exportcontents: 
${removeall;${packages};${packages;NAMED;*internal*}}
+              # Reproducible build
+              -noextraheaders: true
+            ]]></bnd>
+          </configuration>
         </plugin>
         <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-jar-plugin</artifactId>
           <configuration>
             <archive>
+              
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
               <manifestEntries>
                 
<Automatic-Module-Name>${Automatic-Module-Name}</Automatic-Module-Name>
               </manifestEntries>
@@ -644,6 +639,18 @@
           </compilerArgs>
         </configuration>
       </plugin>
+      <plugin>
+        <groupId>biz.aQute.bnd</groupId>
+        <artifactId>bnd-maven-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>bnd-process</id>
+            <goals>
+              <goal>bnd-process</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
       <plugin>
         <groupId>org.eclipse.sisu</groupId>
         <artifactId>sisu-maven-plugin</artifactId>

Reply via email to