From 61ea51d987a7b837050b3479b32ff15e5b41a061 Mon Sep 17 00:00:00 2001
From: Maxim Thomas <maxim.thomas@gmail.com>
Date: Wed, 08 Apr 2026 14:56:40 +0000
Subject: [PATCH] [OpenIdentityPlatform/OpenAM#980] OpenDJ slim maven artifact (#625)

---
 opendj-server-legacy/pom.xml |   22 +++++++++++++++++++++-
 pom.xml                      |    2 +-
 2 files changed, 22 insertions(+), 2 deletions(-)

diff --git a/opendj-server-legacy/pom.xml b/opendj-server-legacy/pom.xml
index 530a32c..6001979 100644
--- a/opendj-server-legacy/pom.xml
+++ b/opendj-server-legacy/pom.xml
@@ -256,7 +256,6 @@
     <dependency>
 	    <groupId>org.apache.cassandra</groupId>
 	    <artifactId>java-driver-core</artifactId>
-	    <version>4.19.2</version>
 	    <exclusions>
 	    	<exclusion>
 	    		<groupId>org.reactivestreams</groupId>
@@ -1136,6 +1135,27 @@
               </target>
             </configuration>
           </execution>
+
+          <!-- Generate slim zip and attach artefact -->
+          <execution>
+            <id>attach-artifact-slim</id>
+            <phase>package</phase>
+            <goals>
+              <goal>run</goal>
+            </goals>
+            <configuration>
+              <target>
+                <zip destfile="${project.build.directory}/package/${product.archive.name}-slim.zip">
+                  <zipfileset dir="${project.build.directory}/package/${product.name.lowercase}" includes="**/*" excludes="bin/*,template/**/*,lib/_client-script.sh,lib/_script-util.sh,lib/_server-script.sh,lib/_mixed-script.sh,setup,uninstall,upgrade,QuickSetup.app/Contents/MacOS/universalJavaApplicationStub,Uninstall.app/Contents/MacOS/universalJavaApplicationStub,bin/ControlPanel.app/Contents/MacOS/universalJavaApplicationStub,lib/org.apache.cassandra.*,lib/com.oracle.database.jdbc*,lib/com.mysql.mysql-connector*,lib/com.microsoft.sqlserver*,lib/org.postgresql.*" filemode="644" dirmode="755" prefix="opendj" />
+                  <zipfileset dir="${project.build.directory}/package/${product.name.lowercase}" includes="lib/_client-script.sh,lib/_script-util.sh,lib/_server-script.sh,lib/_mixed-script.sh" filemode="755" dirmode="755" prefix="opendj" />
+                  <zipfileset dir="${project.build.directory}/package/${product.name.lowercase}" includes="bin/*" filemode="755" dirmode="755" prefix="opendj" />
+                  <zipfileset dir="${project.build.directory}/package/${product.name.lowercase}" includes="setup,uninstall,upgrade,QuickSetup.app/Contents/MacOS/universalJavaApplicationStub,Uninstall.app/Contents/MacOS/universalJavaApplicationStub,bin/ControlPanel.app/Contents/MacOS/universalJavaApplicationStub" filemode="755" dirmode="755" prefix="opendj" />
+                  <zipfileset dir="${project.build.directory}/package/${product.name.lowercase}" includes="template/**/*" filemode="444" dirmode="744" prefix="opendj" />
+                </zip>
+                <attachartifact file="${project.build.directory}/package/${product.archive.name}-slim.zip" classifier="slim" type="zip" />
+              </target>
+            </configuration>
+          </execution>
         </executions>
       </plugin>
 
diff --git a/pom.xml b/pom.xml
index 81b1726..209a235 100644
--- a/pom.xml
+++ b/pom.xml
@@ -35,7 +35,7 @@
         <product.locales>ca_ES,es,de,fr,ja,ko,pl,zh_CN,zh_TW</product.locales>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
         <localized.jars.classifier>i18n</localized.jars.classifier>
-        <commons.version>3.0.4</commons.version>
+        <commons.version>3.0.5-SNAPSHOT</commons.version>
         <freemarker.version>2.3.34</freemarker.version>
         <metrics-core.version>4.2.30</metrics-core.version>
         <bc.fips.version>2.1.2</bc.fips.version>

--
Gitblit v1.10.0