[xmlsectool] branch main updated: JPAR-182 - Avoid use of dependencySet in assembly descriptor

Ian Young ian at iay.org.uk
Thu Feb 10 13:44:19 UTC 2022


This is an automated email from the git hooks/post-receive script.

iay pushed a commit to branch main
in repository xmlsectool.

View the commit online:
http://git.shibboleth.net/view/?p=xmlsectool.git;a=commit;h=dd3b276088c4f6d141b8eb1b3f31bbb9263914b2

The following commit(s) were added to refs/heads/main by this push:
     new dd3b276  JPAR-182 - Avoid use of dependencySet in assembly descriptor
dd3b276 is described below

commit dd3b276088c4f6d141b8eb1b3f31bbb9263914b2
Author: Ian Young <ian at iay.org.uk>
AuthorDate: Thu Feb 10 13:42:56 2022 +0000

    JPAR-182 - Avoid use of dependencySet in assembly descriptor
    
    This drastically reduces the number of plugins that the Maven
    assembly plugin pulls in.
    
    https://shibboleth.atlassian.net/browse/JPAR-182
---
 pom.xml                   | 21 ++++++++++++++
 src/main/assembly/bin.xml | 73 +++++++++++++++++++++++++++--------------------
 2 files changed, 63 insertions(+), 31 deletions(-)

diff --git a/pom.xml b/pom.xml
index 8c2d50b..b5d469c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -27,6 +27,7 @@
         <opensaml.version>4.1.1</opensaml.version>
         <java-support.version>8.2.1</java-support.version>
         <net.shibboleth.maven.enforcer.rules.checkM2>false</net.shibboleth.maven.enforcer.rules.checkM2>
+        <dependenciesDirectory>${project.build.directory}/dependencies</dependenciesDirectory>
     </properties>
 
     <repositories>
@@ -161,6 +162,26 @@
 
     <build>
         <plugins>
+
+            <!-- Copy the executable's dependencies into a directory. -->
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-dependency-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>copy-dependencies</id>
+                        <phase>prepare-package</phase>
+                        <goals>
+                            <goal>copy-dependencies</goal>
+                        </goals>
+                        <configuration>
+                            <outputDirectory>${dependenciesDirectory}</outputDirectory>
+                            <includeScope>runtime</includeScope>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-assembly-plugin</artifactId>
diff --git a/src/main/assembly/bin.xml b/src/main/assembly/bin.xml
index 52565c0..789617b 100644
--- a/src/main/assembly/bin.xml
+++ b/src/main/assembly/bin.xml
@@ -3,39 +3,50 @@
 <assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd" >
 
-	<id>bin</id>
-	<formats>
-		<format>zip</format>
-	</formats>
+    <id>bin</id>
+    <formats>
+        <format>zip</format>
+    </formats>
 
-	<dependencySets>
-		<dependencySet>
-			<outputDirectory>lib</outputDirectory>
-            <fileMode>444</fileMode>
-            <scope>runtime</scope>
-			<includes>
-				<include>*:jar:*</include>
-			</includes>
-		</dependencySet>
-	</dependencySets>
+    <fileSets>
+        <!-- Project artifact. -->
+        <fileSet>
+            <directory>${project.build.directory}</directory>
+            <outputDirectory>lib</outputDirectory>
+            <includes>
+                <include>*.jar</include>
+            </includes>
+            <excludes>
+                <exclude>*tests*</exclude>
+                <exclude>*javadoc*</exclude>
+                <exclude>*sources*</exclude>
+            </excludes>
+            <fileMode>0444</fileMode>
+        </fileSet>
 
-	<fileSets>
-		<!-- Documentation -->
-		<fileSet>
-			<directory>doc/</directory>
-			<outputDirectory>doc</outputDirectory>
-		</fileSet>
+        <!-- Dependencies -->
+        <fileSet>
+            <directory>${dependenciesDirectory}</directory>
+            <outputDirectory>lib</outputDirectory>
+            <fileMode>0444</fileMode>
+        </fileSet>
 
-		<!-- Copy execution scripts into the root of the package -->
-		<fileSet>
-			<directory>src/main/bash</directory>
-			<outputDirectory/>
-			<includes>
-				<include>*.sh</include>
-			</includes>
-			<fileMode>0755</fileMode>
-			<directoryMode>0755</directoryMode>
-		</fileSet>
-	</fileSets>
+        <!-- Documentation -->
+        <fileSet>
+            <directory>doc/</directory>
+            <outputDirectory>doc</outputDirectory>
+        </fileSet>
+
+        <!-- Copy execution scripts into the root of the package -->
+        <fileSet>
+            <directory>src/main/bash</directory>
+            <outputDirectory/>
+            <includes>
+                <include>*.sh</include>
+            </includes>
+            <fileMode>0755</fileMode>
+            <directoryMode>0755</directoryMode>
+        </fileSet>
+    </fileSets>
 
 </assembly>

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list