Merge pull request #23543 from dmatej/ant-maven

Issue #23542 Removed fixup.xml
diff --git a/appserver/appclient/client/acc-standalone/fixup.xml b/appserver/appclient/client/acc-standalone/fixup.xml
deleted file mode 100644
index 5244620..0000000
--- a/appserver/appclient/client/acc-standalone/fixup.xml
+++ /dev/null
@@ -1,102 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-    Copyright (c) 2010, 2020 Oracle and/or its affiliates. All rights reserved.
-
-    This program and the accompanying materials are made available under the
-    terms of the Eclipse Public License v. 2.0, which is available at
-    http://www.eclipse.org/legal/epl-2.0.
-
-    This Source Code may also be made available under the following Secondary
-    Licenses when the conditions for such availability set forth in the
-    Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
-    version 2 with the GNU Classpath Exception, which is available at
-    https://www.gnu.org/software/classpath/license.html.
-
-    SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
-
--->
-
-<project name="glassfish v3, app client library fix-up" default="fixup.library" basedir=".">
-    <property name="mq.dir.path" value="../../mq"/>
-    <property name="mq.lib" value="${mq.dir.path}/lib"/>
-    <property name="jmsra.apps.dir" value="../lib/install/applications/jmsra"/>
-    <property name="mq.classpath.additions" value="${mq.lib}/imq.jar ${mq.lib}/imqadmin.jar ${mq.lib}/imqutil.jar ${mq.lib}/fscontext.jar ${jmsra.apps.dir}/imqjmsra.jar"/>
-
-    <property name="ds-jdbcra.classpath.additions" value="../lib/install/applications/__ds_jdbc_ra/__ds_jdbc_ra.jar"/>
-    <property name="cp-jdbcra.classpath.additions" value="../lib/install/applications/__cp_jdbc_ra/__cp_jdbc_ra.jar"/>
-    <property name="xa-jdbcra.classpath.additions" value="../lib/install/applications/__xa_jdbc_ra/__xa_jdbc_ra.jar"/>
-    <property name="dm-jdbcra.classpath.additions" value="../lib/install/applications/__dm_jdbc_ra/__dm_jdbc_ra.jar"/>
-    <property name="derby.jar.classpath.additions" value="../../javadb/lib/derby.jar ../../javadb/lib/derbyclient.jar ../../javadb/lib/derbynet.jar ../../javadb/lib/derbytools.jar ../../javadb/lib/derbyrun.jar"/>
-    <property name="jaxr-ra.classpath.additions" value="../lib/install/applications/jaxr-ra/jaxr-ra.jar"/>
-    <property name="resources-runtime.classpath.additions" value="../modules/resources-runtime.jar"/>
-    <property name="mail-connector.classpath.additions" value="../modules/mail-connector.jar"/>
-    <property name="mail-runtime.classpath.additions" value="../modules/mail-runtime.jar"/>
-    <property name="jdbc-runtime.classpath.additions" value="../modules/jdbc-runtime.jar"/>
-    <property name="jdbc-config.classpath.additions" value="../modules/jdbc-config.jar"/>
-    <property name="aix.additions" value="../modules/aixporting-repackaged.jar"/>
-    <property name="entitybean-container.additions" value="../modules/entitybean-container.jar"/>
-    <property name="weld.classpath.additions" value="../modules/weld-osgi-bundle.jar"/>
-
-    <property name="classpath.additions" value=" ${resources-runtime.classpath.additions} ${mail-connector.classpath.additions} ${mail-runtime.classpath.additions} ${mq.classpath.additions} ${ds-jdbcra.classpath.additions} ${cp-jdbcra.classpath.additions} ${xa-jdbcra.classpath.additions} ${dm-jdbcra.classpath.additions} ${derby.jar.classpath.additions} ${jaxr-ra.classpath.additions} ${entitybean-container.additions} ${jdbc-runtime.classpath.additions} ${jdbc-config.classpath.additions} ${weld.classpath.additions}"/>
-    <property name="classpath.conditional.additions" value="${aix.additions}"/>
-    <target name="fixup.library">
-        <unzip src="${output.dir}/${output.file}" dest="${stage.dir}">
-            <patternset>
-                <include name="META-INF/MANIFEST.MF"/>
-            </patternset>
-        </unzip>
-
-        <replace file="${classpath.file}">
-            <!-- replace the colons used as path separators with blanks -->
-            <replacefilter token=":" value=" "/>
-
-            <!-- replace incorrect entries ../modules/x.jar for JARs that will actually reside in the
-                 endorsed subdirectory with ../modules/endorsed/x.jar                -->
-
-            <replacefilter token="../modules/weld-se-shaded.jar" value="../lib/appclient/weld-se-shaded.jar"/>
-
-            <!--
-                The jakarta.mail JAR will reference activation.jar, because it is
-                built to work with Java SE 1.4 and later. Prior to Java SE 6
-                activation was separate from the Java SE libraries and so
-                mail must refer to it explicitly.  But GlassFish requires
-                Java SE 11 and there will be no activation.jar.
-                So remove it so jar indexing (which would help
-                optimize Java Web Start) will not fail due to a missing JAR.
-            -->
-            <!--
-                As of Jakarta Mail 2.0 and Jakarta EE 9, Jakarta Mail
-                references jakarta.activation.jar, which is NOT included
-                in Java SE, but IS included in GlassFish, so we don't
-                need to remove it here.
-            &lt;replacefilter token=" ../modules/activation.jar" value=""/&gt;>
-            -->
-        </replace>
-
-        <!-- define the classpath property -->
-        <property file="${classpath.file}"/>
-
-        <!--
-            Entries in zip (and JAR) files have two-second timestamp resolution.  The
-            next sleep makes sure that the time stamp on the updated manifest
-            file will later than the original manifest's time + two seconds;
-            this make sure the zip task will actually replace the manifest
-            in the JAR file.
-
-            Also, the manifest task seems not to update the timestamp on the
-            manifest file, so we need to explicitly touch it after updating
-            the manifest.
-        -->
-        <sleep seconds="5"/>
-        <manifest mode="update" file="${stage.dir}/META-INF/MANIFEST.MF">
-            <attribute name="Class-Path" value="${classpath} ${classpath.additions} ${classpath.conditional.additions}"/>
-            <attribute name="GlassFish-Conditional-Additions" value="${classpath.conditional.additions}"/>
-        </manifest>
-        <touch file="${stage.dir}/META-INF/MANIFEST.MF"/>
-
-        <!-- Update the JAR file with the revised manifest -->
-        <zip destfile="${output.dir}/${output.file}" basedir="${stage.dir}" update="true" includes="META-INF/MANIFEST.MF"/>
-        <echo>Manifest Class-Path updated</echo>
-   </target>
-</project>
diff --git a/appserver/appclient/client/acc-standalone/pom.xml b/appserver/appclient/client/acc-standalone/pom.xml
index ac6def8..0dc8c7f 100755
--- a/appserver/appclient/client/acc-standalone/pom.xml
+++ b/appserver/appclient/client/acc-standalone/pom.xml
@@ -17,21 +17,10 @@
 
 -->
 
-<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/xsd/maven-4.0.0.xsd"><!--
-        This module builds the free-standing JAR file for the app client
-        container which can be run without using an OSGi implementation.
-
-        This module contains little source of its own but mostly packages a JAR
-        with a manifest Class-Path that specifies all the OSGi JARs on which
-        it directly or indirectly depends.
-
-        Note that additional JARs which clients might need but which are not
-        declared as dependencies are added by updating the generated manifest's
-        Class-Path using some ant tasks.  The nicer way to do this would be to
-        create a custom plug-in which would delegate most of the work to the
-        archiver but would augment the generated Class-Path with the extra JARs.
-        Perhaps later.
-    -->
+<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/xsd/maven-4.0.0.xsd"
+>
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
@@ -44,7 +33,15 @@
     <artifactId>gf-client</artifactId>
     <packaging>glassfish-jar</packaging>
 
-    <name>Client library (including ACC)</name>
+    <name>Client Library (including ACC)</name>
+    <description>
+        This module builds the free-standing JAR file for the app client
+        container which can be run without using an OSGi implementation.
+
+        This module contains little source of its own but mostly packages a JAR
+        with a manifest Class-Path that specifies all the OSGi JARs on which
+        it directly or indirectly depends.
+    </description>
 
     <developers>
       <developer>
@@ -60,114 +57,99 @@
     </developers>
 
     <properties>
-        <classpath.file>${project.build.directory}/tmp/classpath.txt</classpath.file>
-        <!--
-            Property settings used for adding parts to the Class-Path used to
-            be defined here.  They are now in the fixup.xml file instead so
-            the pom is less changeable.
-        -->
+        <path.apps>../lib/install/applications</path.apps>
+        <path.appclient>../lib/appclient</path.appclient>
+        <path.derby>../../javadb/lib</path.derby>
+        <path.mq>../../mq/lib</path.mq>
+
+        <classpath.derby>${path.derby}/derby.jar ${path.derby}/derbyclient.jar ${path.derby}/derbynet.jar ${path.derby}/derbytools.jar ${path.derby}/derbyrun.jar</classpath.derby>
+        <classpath.jaxrra>${path.apps}/jaxr-ra/jaxr-ra.jar</classpath.jaxrra>
+        <classpath.jdbcra>${path.apps}/__ds_jdbc_ra/__ds_jdbc_ra.jar ${path.apps}/__cp_jdbc_ra/__cp_jdbc_ra.jar ${path.apps}/__xa_jdbc_ra/__xa_jdbc_ra.jar ${path.apps}/__dm_jdbc_ra/__dm_jdbc_ra.jar</classpath.jdbcra>
+        <classpath.mq>${path.mq}/imq.jar ${path.mq}/imqadmin.jar ${path.mq}/imqutil.jar ${path.mq}/fscontext.jar ${path.apps}/jmsra/imqjmsra.jar</classpath.mq>
+        <classpath.weld>${path.appclient}/weld-se-shaded.jar</classpath.weld>
+
+        <classpath.additions>${classpath.mq} ${classpath.derby} ${classpath.jaxrra} ${classpath.jdbcra} ${classpath.weld}</classpath.additions>
     </properties>
 
     <dependencies>
-        <!--
-            We specify the ACC's OSGi JAR as a dependency.
-            The maven-jar-plugin will do the work of finding the transitive
-            closure of it and the modules on which it depends to build the
-            accurate Class-Path for the manifest.
-        -->
+        <!-- Dependencies are used just to generate the Class-Path attribute of the manifest -->
         <dependency>
             <groupId>org.glassfish.main.appclient</groupId>
             <artifactId>gf-client-module</artifactId>
             <version>${project.version}</version>
+            <exclusions>
+                <exclusion>
+                    <!-- weld-se-shaded has an explicit path, would cause redundant line -->
+                    <groupId>org.jboss.weld.se</groupId>
+                    <artifactId>weld-se-shaded</artifactId>
+                </exclusion>
+            </exclusions>
         </dependency>
-   </dependencies>
+        <dependency>
+            <groupId>org.glassfish.main.jdbc</groupId>
+            <artifactId>jdbc-runtime</artifactId>
+            <version>${project.version}</version>
+            <optional>true</optional>
+        </dependency>
+        <dependency>
+            <groupId>org.glassfish.main.resources</groupId>
+            <artifactId>resources-runtime</artifactId>
+            <version>${project.version}</version>
+            <optional>true</optional>
+        </dependency>
+        <dependency>
+            <groupId>org.glassfish.main.persistence</groupId>
+            <artifactId>entitybean-container</artifactId>
+            <version>${project.version}</version>
+            <optional>true</optional>
+        </dependency>
+        <dependency>
+            <groupId>org.jboss.weld</groupId>
+            <artifactId>weld-osgi-bundle</artifactId>
+            <optional>true</optional>
+            <exclusions>
+                <exclusion>
+                    <groupId>*</groupId>
+                    <artifactId>*</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+    </dependencies>
 
     <build>
         <plugins>
-            <!--
-                Create a text file containing the generated class path.  This
-                file is used in the ant tasks when the original Class-Path is
-                augmented.  Note: we force the path separator to be a colon
-                because the plug-in will use the platform-specific separator
-                otherwise.  The ant logic replaces colons with spaces to
-                reformat the contents of the file so it's useful in the manifest.
-            -->
             <plugin>
-              <artifactId>maven-dependency-plugin</artifactId>
-              <executions>
-                  <execution>
-                      <id>generate-classpath-file</id>
-                      <phase>process-sources</phase>
-                      <goals>
-                          <goal>build-classpath</goal>
-                      </goals>
-                      <configuration>
-                          <outputFile>${classpath.file}</outputFile>
-                          <outputFilterFile>true</outputFilterFile>
-                          <pathSeparator>:</pathSeparator>
-                          <fileSeparator>/</fileSeparator>
-                          <prefix>../modules</prefix>
-                          <stripVersion>true</stripVersion>
-                          <excludeArtifactIds>jakarta.json</excludeArtifactIds>
-                          <excludeArtifactIds>jakarta.inject</excludeArtifactIds>
-                      </configuration>
-                  </execution>
-              </executions>
-          </plugin>
-
-          <plugin>
-            <artifactId>maven-jar-plugin</artifactId>
-            <configuration>
-
-              <!--
-                  Includes only the agent class.  All the rest are in
-                  the OSGi module.
-              -->
-
-                        <archive>
-
-<!-- We need the index eventually but until the plug-in itself knows the correct
-classpath we must comment this out, or else the index reflects nothing in
-this or the downstream JARs and so attempts to find things fail.
-
-                            <index>true</index>
--->
-                            <manifest>
-                                <mainClass>org.glassfish.appclient.client.AppClientFacade</mainClass>
-                                <packageName>org.glassfish.appclient.client.acc</packageName>
-                                <addClasspath>true</addClasspath>
-                                <classpathLayoutType>custom</classpathLayoutType>
-                                <customClasspathLayout>../modules/$${artifact.artifactId}$${dashClassifier?}.$${artifact.extension}</customClasspathLayout>
-                            </manifest>
-                            <manifestEntries>
-                                <PreMain-Class>org.glassfish.appclient.client.acc.agent.AppClientContainerAgent</PreMain-Class>
-                <GlassFish-ServerExcluded>true</GlassFish-ServerExcluded>
-                            </manifestEntries>
-                        </archive>
-                    </configuration>
-          </plugin>
-
-          <plugin>
-              <artifactId>maven-antrun-plugin</artifactId>
-              <executions>
-                  <execution>
-                      <id>fixup-jar-classpath</id>
-                      <phase>package</phase>
-                      <goals>
-                          <goal>run</goal>
-                      </goals>
-                      <configuration>
-                          <target>
-                              <property name="output.file" value="${project.build.finalName}.jar" />
-                              <property name="output.dir" value="${project.build.directory}" />
-                              <property name="stage.dir" value="${project.build.directory}/stage" />
-                              <property name="classpath.file" value="${classpath.file}" />
-                              <ant antfile="${basedir}/fixup.xml" />
-                          </target>
-                      </configuration>
-                  </execution>
-              </executions>
-          </plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <configuration>
+                    <archive>
+                        <manifest>
+                            <addClasspath>false</addClasspath>
+                        </manifest>
+                    </archive>
+                </configuration>
+            </plugin>
+            <plugin>
+                <artifactId>maven-jar-plugin</artifactId>
+                <configuration>
+                    <archive>
+                        <manifest>
+                            <mainClass>org.glassfish.appclient.client.AppClientFacade</mainClass>
+                            <packageName>org.glassfish.appclient.client.acc</packageName>
+                            <addClasspath>true</addClasspath>
+                            <classpathPrefix>../modules/</classpathPrefix>
+                            <classpathLayoutType>custom</classpathLayoutType>
+                            <customClasspathLayout>${artifact.artifactId}${dashClassifier?}.${artifact.extension}</customClasspathLayout>
+                        </manifest>
+                        <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
+                        <manifestEntries>
+                            <PreMain-Class>org.glassfish.appclient.client.acc.agent.AppClientContainerAgent</PreMain-Class>
+                            <GlassFish-ServerExcluded>true</GlassFish-ServerExcluded>
+                            <Class-Path>${classpath.additions}</Class-Path>
+                        </manifestEntries>
+                    </archive>
+                </configuration>
+            </plugin>
         </plugins>
     </build>
 </project>
diff --git a/appserver/extras/embedded/shell/fixup.xml b/appserver/extras/embedded/shell/fixup.xml
deleted file mode 100644
index a79cf41..0000000
--- a/appserver/extras/embedded/shell/fixup.xml
+++ /dev/null
@@ -1,59 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-    Copyright (c) 2010, 2018 Oracle and/or its affiliates. All rights reserved.
-
-    This program and the accompanying materials are made available under the
-    terms of the Eclipse Public License v. 2.0, which is available at
-    http://www.eclipse.org/legal/epl-2.0.
-
-    This Source Code may also be made available under the following Secondary
-    Licenses when the conditions for such availability set forth in the
-    Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
-    version 2 with the GNU Classpath Exception, which is available at
-    https://www.gnu.org/software/classpath/license.html.
-
-    SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
-
--->
-
-<project name="glassfish v3, embedded shell fix-up" default="fixup.library" basedir=".">
-    <property name="derby.jar.classpath.additions" value="../../../javadb/lib/derby.jar ../../../javadb/lib/derbyclient.jar ../../../javadb/lib/derbynet.jar ../../../javadb/lib/derbytools.jar ../../../javadb/lib/derbyrun.jar"/>
-    <property name="endorsed.jar.classpath.additions" value="../../modules/jakarta.annotation-api.jar ../../modules/jakarta.xml.bind-api.jar ../../modules/webservices-api-osgi.jar"/>
-    <property name="classpath.additions" value="${derby.jar.classpath.additions} ${endorsed.jar.classpath.additions}"/>
-    <target name="fixup.library">
-        <unzip src="${output.dir}/${output.file}" dest="${stage.dir}">
-            <patternset>
-                <include name="META-INF/MANIFEST.MF"/>
-            </patternset>
-        </unzip>
-
-        <!-- replace the colons used as path separators with blanks -->
-        <replace file="${classpath.file}" token=":" value=" "/>
-
-        <!-- define the classpath property -->
-        <property file="${classpath.file}"/>
-
-        <!--
-            Entries in zip (and JAR) files have two-second timestamp resolution.  The
-            next sleep makes sure that the time stamp on the updated manifest
-            file will later than the original manifest's time + two seconds;
-            this make sure the zip task will actually replacde the manifest
-            in the JAR file.
-
-            Also, the manifest task seems not to update the timestamp on the
-            manifest file, so we need to explicitly touch it after updating
-            the manifest.
-        -->
-        <sleep seconds="5"/>
-        <manifest mode="update" file="${stage.dir}/META-INF/MANIFEST.MF">
-            <attribute name="Class-Path" value="${classpath} ${classpath.additions}"/>
-            <attribute name="Bundle-SymbolicName" value="${bundlename}"/>
-        </manifest>
-        <touch file="${stage.dir}/META-INF/MANIFEST.MF"/>
-
-        <!-- Update the JAR file with the revised manifest -->
-        <zip destfile="${output.dir}/${output.file}" basedir="${stage.dir}" update="true" includes="META-INF/MANIFEST.MF"/>
-        <echo>Manifest Class-Path updated</echo>
-   </target>
-</project>
diff --git a/appserver/extras/embedded/shell/glassfish-embedded-shell/pom.xml b/appserver/extras/embedded/shell/glassfish-embedded-shell/pom.xml
index b92f848..9c43866 100755
--- a/appserver/extras/embedded/shell/glassfish-embedded-shell/pom.xml
+++ b/appserver/extras/embedded/shell/glassfish-embedded-shell/pom.xml
@@ -18,99 +18,24 @@
 -->
 
 <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>
+
     <parent>
         <groupId>org.glassfish.main.extras</groupId>
         <artifactId>extras</artifactId>
         <version>6.2.1-SNAPSHOT</version>
         <relativePath>../../../pom.xml</relativePath>
     </parent>
+
     <artifactId>glassfish-embedded-shell</artifactId>
     <name>Embedded GlassFish Shell</name>
 
-
     <properties>
-        <classpath.file>${project.build.directory}/tmp/classpath.txt</classpath.file>
+        <path.derby>../../../javadb/lib</path.derby>
+        <classpath.derby>${path.derby}/derby.jar ${path.derby}/derbyclient.jar ${path.derby}/derbynet.jar ${path.derby}/derbytools.jar ${path.derby}/derbyrun.jar</classpath.derby>
     </properties>
 
-    <build>
-        <plugins>
-            <!--
-                Create a text file containing the generated class path.  This
-                file is used in the ant tasks when the original Class-Path is
-                augmented.  Note: we force the path separator to be a colon
-                because the plug-in will use the platform-specific separator
-                otherwise.  The ant logic replaces colons with spaces to
-                reformat the contents of the file so it's useful in the manifest.
-            -->
-            <plugin>
-              <artifactId>maven-dependency-plugin</artifactId>
-              <executions>
-                  <execution>
-                      <id>generate-classpath-file</id>
-                      <phase>process-sources</phase>
-                      <goals>
-                          <goal>build-classpath</goal>
-                      </goals>
-                      <configuration>
-                          <outputFile>${classpath.file}</outputFile>
-                          <outputFilterFile>true</outputFilterFile>
-                          <pathSeparator>:</pathSeparator>
-                          <fileSeparator>/</fileSeparator>
-                          <prefix>../../modules</prefix>
-                          <stripVersion>true</stripVersion>
-                      </configuration>
-                  </execution>
-              </executions>
-          </plugin>
-
-          <plugin>
-              <artifactId>maven-jar-plugin</artifactId>
-              <configuration>
-                  <archive>
-                      <manifest>
-                          <addClasspath>true</addClasspath>
-                          <classpathLayoutType>custom</classpathLayoutType>
-                          <customClasspathLayout>../../modules/$${artifact.artifactId}$${dashClassifier?}.$${artifact.extension}</customClasspathLayout>
-                      </manifest>
-                  </archive>
-              </configuration>
-          </plugin>
-
-          <plugin>
-              <artifactId>maven-antrun-plugin</artifactId>
-              <executions>
-                  <execution>
-                      <id>fixup-jar-classpath</id>
-                      <phase>package</phase>
-                      <goals>
-                          <goal>run</goal>
-                      </goals>
-                      <configuration>
-                          <target>
-                              <ant antfile="../fixup.xml">
-                                  <property name="output.file" value="${project.build.finalName}.jar" />
-                                  <property name="output.dir" value="${project.build.directory}" />
-                                  <property name="stage.dir" value="${project.build.directory}/stage" />
-                                  <property name="classpath.file" value="${classpath.file}" />
-                                  <property name="bundlename" value="org.glassfish.embedded.shell" />
-                                  <property name="install.dir.name" value="${install.dir.name}" />
-                              </ant>
-                          </target>
-                      </configuration>
-                  </execution>
-              </executions>
-          </plugin>
-        </plugins>
-    </build>
-
     <dependencies>
-        <!--
-            The maven-jar-plugin will do the work of finding the transitive
-            closure of it and the modules on which it depends to build the
-            accurate Class-Path for the manifest.
-        -->
         <dependency>
             <groupId>org.glassfish.hk2</groupId>
             <artifactId>hk2-core</artifactId>
@@ -126,5 +51,39 @@
             <version>${project.version}</version>
         </dependency>
 
-   </dependencies>
+        <dependency>
+            <groupId>jakarta.annotation</groupId>
+            <artifactId>jakarta.annotation-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>jakarta.xml.bind</groupId>
+            <artifactId>jakarta.xml.bind-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.glassfish.metro</groupId>
+            <artifactId>webservices-api-osgi</artifactId>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <artifactId>maven-jar-plugin</artifactId>
+                <configuration>
+                    <archive>
+                        <manifest>
+                            <addClasspath>true</addClasspath>
+                            <classpathPrefix>../../modules/</classpathPrefix>
+                            <classpathLayoutType>custom</classpathLayoutType>
+                            <customClasspathLayout>$${artifact.artifactId}$${dashClassifier?}.$${artifact.extension}</customClasspathLayout>
+                        </manifest>
+                        <manifestEntries>
+                            <Bundle-SymbolicName>org.glassfish.embedded.shell</Bundle-SymbolicName>
+                            <Class-Path>${classpath.derby}</Class-Path>
+                        </manifestEntries>
+                    </archive>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
 </project>
diff --git a/appserver/extras/embedded/shell/glassfish-embedded-static-shell/pom.xml b/appserver/extras/embedded/shell/glassfish-embedded-static-shell/pom.xml
index 7ee8203..552a7aa 100755
--- a/appserver/extras/embedded/shell/glassfish-embedded-static-shell/pom.xml
+++ b/appserver/extras/embedded/shell/glassfish-embedded-static-shell/pom.xml
@@ -29,90 +29,13 @@
 
     <artifactId>glassfish-embedded-static-shell</artifactId>
     <name>Embedded GlassFish Static Shell</name>
-    <packaging>jar</packaging>
 
     <properties>
-        <classpath.file>${project.build.directory}/tmp/classpath.txt</classpath.file>
+        <path.derby>../../../javadb/lib</path.derby>
+        <classpath.derby>${path.derby}/derby.jar ${path.derby}/derbyclient.jar ${path.derby}/derbynet.jar ${path.derby}/derbytools.jar ${path.derby}/derbyrun.jar</classpath.derby>
     </properties>
 
-    <build>
-        <plugins>
-            <!--
-                Create a text file containing the generated class path.  This
-                file is used in the ant tasks when the original Class-Path is
-                augmented.  Note: we force the path separator to be a colon
-                because the plug-in will use the platform-specific separator
-                otherwise.  The ant logic replaces colons with spaces to
-                reformat the contents of the file so it's useful in the manifest.
-            -->
-            <plugin>
-              <artifactId>maven-dependency-plugin</artifactId>
-              <executions>
-                  <execution>
-                      <id>generate-classpath-file</id>
-                      <phase>process-sources</phase>
-                      <goals>
-                          <goal>build-classpath</goal>
-                      </goals>
-                      <configuration>
-                          <outputFile>${classpath.file}</outputFile>
-                          <outputFilterFile>true</outputFilterFile>
-                          <pathSeparator>:</pathSeparator>
-                          <fileSeparator>/</fileSeparator>
-                          <prefix>../../modules</prefix>
-                          <stripVersion>true</stripVersion>
-                          <excludeArtifactIds>jsftemplating, jakarta.json, jakarta.json-api</excludeArtifactIds>
-                      </configuration>
-                  </execution>
-              </executions>
-          </plugin>
-
-            <plugin>
-                <artifactId>maven-jar-plugin</artifactId>
-                <configuration>
-                    <archive>
-                        <manifest>
-                            <addClasspath>true</addClasspath>
-                            <classpathLayoutType>custom</classpathLayoutType>
-                            <customClasspathLayout>../../modules/$${artifact.artifactId}$${dashClassifier?}.$${artifact.extension}</customClasspathLayout>
-                        </manifest>
-                    </archive>
-                </configuration>
-            </plugin>
-
-            <plugin>
-                <artifactId>maven-antrun-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>fixup-jar-classpath</id>
-                        <phase>package</phase>
-                        <goals>
-                            <goal>run</goal>
-                        </goals>
-                        <configuration>
-                            <target>
-                                <ant antfile="../fixup.xml">
-                                    <property name="output.file" value="${project.build.finalName}.jar" />
-                                    <property name="output.dir" value="${project.build.directory}" />
-                                    <property name="stage.dir" value="${project.build.directory}/stage" />
-                                    <property name="classpath.file" value="${classpath.file}" />
-                                    <property name="bundlename" value="org.glassfish.embedded.static-shell" />
-                                </ant>
-                            </target>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-        </plugins>
-    </build>
-
     <dependencies>
-        <!--
-            The maven-jar-plugin will do the work of finding the transitive
-            closure of it and the modules on which it depends to build the
-            accurate Class-Path for the manifest.
-        -->
-        <!-- glassfish-cmp -->
         <dependency>
             <groupId>org.glassfish.external</groupId>
             <artifactId>antlr</artifactId>
@@ -1427,5 +1350,27 @@
             <artifactId>woodstox-core</artifactId>
             <optional>true</optional>
         </dependency>
-   </dependencies>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <artifactId>maven-jar-plugin</artifactId>
+                <configuration>
+                    <archive>
+                        <manifest>
+                            <addClasspath>true</addClasspath>
+                            <classpathPrefix>../../modules/</classpathPrefix>
+                            <classpathLayoutType>custom</classpathLayoutType>
+                            <customClasspathLayout>$${artifact.artifactId}$${dashClassifier?}.$${artifact.extension}</customClasspathLayout>
+                        </manifest>
+                        <manifestEntries>
+                            <Bundle-SymbolicName>org.glassfish.embedded.static-shell</Bundle-SymbolicName>
+                            <Class-Path>${classpath.derby}</Class-Path>
+                        </manifestEntries>
+                    </archive>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
 </project>