Merge pull request #23778 from eclipse-ee4j/6.x-debug

Add project to anchor remote debugger to.
diff --git a/appserver/featuresets/debug/pom.xml b/appserver/featuresets/debug/pom.xml
new file mode 100644
index 0000000..d2633fc
--- /dev/null
+++ b/appserver/featuresets/debug/pom.xml
@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Copyright 2022 Contributors to the Eclipse Foundation.
+
+    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 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>
+		<groupId>org.glassfish.main.featuresets</groupId>
+		<artifactId>featuresets</artifactId>
+		<version>6.2.5-SNAPSHOT</version>
+	</parent>
+
+	<artifactId>debug</artifactId>
+	<description>
+		This project can be used as entry project in remote debugging, giving
+		one most dependencies of GlassFish to step through the source.
+		
+		Compile GF with mvn clean install -Pfastest,source -T10
+		
+		Start GF with ./adadmin start-domain --verbose --suspend
+		
+		In the IDE, for instance, Eclipse, go to 
+		  run - debug configurations - remote java application - project
+		And add this project there. 
+	</description>
+
+	<name>Debug</name>
+
+	<dependencies>
+		<dependency>
+			<groupId>org.glassfish.main.featuresets</groupId>
+			<artifactId>glassfish</artifactId>
+			<version>${project.version}</version>
+			<type>pom</type>
+		</dependency>
+		<dependency>
+			<groupId>org.glassfish.main.featuresets</groupId>
+			<artifactId>web</artifactId>
+			<version>${project.version}</version>
+			<type>pom</type>
+		</dependency>
+		<dependency>
+			<groupId>org.glassfish.main.featuresets</groupId>
+			<artifactId>nucleus</artifactId>
+			<version>${project.version}</version>
+			<type>pom</type>
+		</dependency>
+		<dependency>
+			<groupId>org.glassfish.main.featuresets</groupId>
+			<artifactId>atomic</artifactId>
+			<version>${project.version}</version>
+			<type>pom</type>
+		</dependency>
+
+		<dependency>
+			<groupId>org.glassfish.main.jdbc.jdbc-ra.jdbc-core</groupId>
+			<artifactId>jdbc-core</artifactId>
+			<version>${project.version}</version>
+		</dependency>
+	</dependencies>
+
+</project>
\ No newline at end of file
diff --git a/appserver/featuresets/debug/src/main/java/org/glassfish/main/debug/Debug.java b/appserver/featuresets/debug/src/main/java/org/glassfish/main/debug/Debug.java
new file mode 100644
index 0000000..d148915
--- /dev/null
+++ b/appserver/featuresets/debug/src/main/java/org/glassfish/main/debug/Debug.java
@@ -0,0 +1,24 @@
+/*
+ * Copyright 2022 Contributors to the Eclipse Foundation.
+ *
+ * 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
+ */
+package org.glassfish.main.debug;
+
+public class Debug {
+
+    public static void main(String[] args) {
+
+    }
+
+}
diff --git a/appserver/featuresets/debug/src/test/java/org/glassfish/debug/DebugTest.java b/appserver/featuresets/debug/src/test/java/org/glassfish/debug/DebugTest.java
new file mode 100644
index 0000000..7482dbe
--- /dev/null
+++ b/appserver/featuresets/debug/src/test/java/org/glassfish/debug/DebugTest.java
@@ -0,0 +1,20 @@
+/*
+ * Copyright 2022 Contributors to the Eclipse Foundation.
+ *
+ * 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
+ */
+package org.glassfish.debug;
+
+public class DebugTest {
+
+}
diff --git a/appserver/featuresets/pom.xml b/appserver/featuresets/pom.xml
index 2597826..ef1473d 100644
--- a/appserver/featuresets/pom.xml
+++ b/appserver/featuresets/pom.xml
@@ -46,5 +46,6 @@
     <modules>
         <module>web</module>
         <module>glassfish</module>
+        <module>debug</module>
     </modules>
 </project>
diff --git a/nucleus/parent/pom.xml b/nucleus/parent/pom.xml
index 83a0e70..16b1a0d 100644
--- a/nucleus/parent/pom.xml
+++ b/nucleus/parent/pom.xml
@@ -1323,6 +1323,24 @@
             </properties>
         </profile>
         <profile>
+            <id>source</id>
+            <build>
+                <plugins>
+                    <plugin>
+                        <artifactId>maven-source-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>attach-sources</id>
+                                <goals>
+                                    <goal>jar-no-fork</goal>
+                                </goals>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+        <profile>
             <id>findbugs</id>
             <activation>
                 <activeByDefault>false</activeByDefault>