Avoid bad interaction between maven-release-plugin and tidy-maven-plugin
diff --git a/apidocs/pom.xml b/apidocs/pom.xml
index 7018b02..9634414 100644
--- a/apidocs/pom.xml
+++ b/apidocs/pom.xml
@@ -31,6 +31,13 @@
 
     <name>Javadoc</name>
 
+    <scm>
+        <connection>scm:git:https://gitbox.apache.org/repos/asf/axis-axis2-java-core.git</connection>
+        <developerConnection>scm:git:https://gitbox.apache.org/repos/asf/axis-axis2-java-core.git</developerConnection>
+        <url>https://gitbox.apache.org/repos/asf?p=axis-axis2-java-core.git;a=summary</url>
+        <tag>HEAD</tag>
+    </scm>
+
     <dependencies>
         <dependency>
             <groupId>${project.groupId}</groupId>
diff --git a/databinding-tests/jaxbri-tests/pom.xml b/databinding-tests/jaxbri-tests/pom.xml
index 24c52b2..5f4d525 100644
--- a/databinding-tests/jaxbri-tests/pom.xml
+++ b/databinding-tests/jaxbri-tests/pom.xml
@@ -30,6 +30,13 @@
 
     <url>http://axis.apache.org/axis2/java/core/</url>
 
+    <scm>
+        <connection>scm:git:https://gitbox.apache.org/repos/asf/axis-axis2-java-core.git</connection>
+        <developerConnection>scm:git:https://gitbox.apache.org/repos/asf/axis-axis2-java-core.git</developerConnection>
+        <url>https://gitbox.apache.org/repos/asf?p=axis-axis2-java-core.git;a=summary</url>
+        <tag>HEAD</tag>
+    </scm>
+
     <dependencies>
         <dependency>
             <groupId>org.apache.ws.commons.axiom</groupId>
diff --git a/databinding-tests/pom.xml b/databinding-tests/pom.xml
index b4dc4a9..c275ff0 100644
--- a/databinding-tests/pom.xml
+++ b/databinding-tests/pom.xml
@@ -35,6 +35,13 @@
         <module>jaxbri-tests</module>
     </modules>
 
+    <scm>
+        <connection>scm:git:https://gitbox.apache.org/repos/asf/axis-axis2-java-core.git</connection>
+        <developerConnection>scm:git:https://gitbox.apache.org/repos/asf/axis-axis2-java-core.git</developerConnection>
+        <url>https://gitbox.apache.org/repos/asf?p=axis-axis2-java-core.git;a=summary</url>
+        <tag>HEAD</tag>
+    </scm>
+
     <build>
         <plugins>
             <plugin>
diff --git a/modules/samples/java_first_jaxws/pom.xml b/modules/samples/java_first_jaxws/pom.xml
index c3cc437..bc3f4bb 100644
--- a/modules/samples/java_first_jaxws/pom.xml
+++ b/modules/samples/java_first_jaxws/pom.xml
@@ -33,6 +33,13 @@
     <name>JAXWS - Starting from Java Example</name>
     <inceptionYear>2004</inceptionYear>
 
+    <scm>
+        <connection>scm:git:https://gitbox.apache.org/repos/asf/axis-axis2-java-core.git</connection>
+        <developerConnection>scm:git:https://gitbox.apache.org/repos/asf/axis-axis2-java-core.git</developerConnection>
+        <url>https://gitbox.apache.org/repos/asf?p=axis-axis2-java-core.git;a=summary</url>
+        <tag>HEAD</tag>
+    </scm>
+
     <dependencies>
         <dependency>
             <groupId>javax.servlet</groupId>
diff --git a/modules/samples/jaxws-addressbook/pom.xml b/modules/samples/jaxws-addressbook/pom.xml
index 52d3211..2a94031 100644
--- a/modules/samples/jaxws-addressbook/pom.xml
+++ b/modules/samples/jaxws-addressbook/pom.xml
@@ -32,6 +32,13 @@
 
     <name>JAXWS Addressbook Service</name>
 
+    <scm>
+        <connection>scm:git:https://gitbox.apache.org/repos/asf/axis-axis2-java-core.git</connection>
+        <developerConnection>scm:git:https://gitbox.apache.org/repos/asf/axis-axis2-java-core.git</developerConnection>
+        <url>https://gitbox.apache.org/repos/asf?p=axis-axis2-java-core.git;a=summary</url>
+        <tag>HEAD</tag>
+    </scm>
+
     <dependencies>
         <dependency>
             <groupId>jakarta.xml.bind</groupId>
diff --git a/modules/samples/jaxws-calculator/pom.xml b/modules/samples/jaxws-calculator/pom.xml
index 23d049e..505070f 100644
--- a/modules/samples/jaxws-calculator/pom.xml
+++ b/modules/samples/jaxws-calculator/pom.xml
@@ -32,6 +32,13 @@
 
     <name>JAXWS Calculator Service</name>
 
+    <scm>
+        <connection>scm:git:https://gitbox.apache.org/repos/asf/axis-axis2-java-core.git</connection>
+        <developerConnection>scm:git:https://gitbox.apache.org/repos/asf/axis-axis2-java-core.git</developerConnection>
+        <url>https://gitbox.apache.org/repos/asf?p=axis-axis2-java-core.git;a=summary</url>
+        <tag>HEAD</tag>
+    </scm>
+
     <dependencies>
         <dependency>
             <groupId>jakarta.xml.bind</groupId>
diff --git a/modules/samples/jaxws-interop/pom.xml b/modules/samples/jaxws-interop/pom.xml
index ed150b8..1d4df5a 100644
--- a/modules/samples/jaxws-interop/pom.xml
+++ b/modules/samples/jaxws-interop/pom.xml
@@ -32,6 +32,13 @@
 
     <name>JAXWS Interop Sample</name>
 
+    <scm>
+        <connection>scm:git:https://gitbox.apache.org/repos/asf/axis-axis2-java-core.git</connection>
+        <developerConnection>scm:git:https://gitbox.apache.org/repos/asf/axis-axis2-java-core.git</developerConnection>
+        <url>https://gitbox.apache.org/repos/asf?p=axis-axis2-java-core.git;a=summary</url>
+        <tag>HEAD</tag>
+    </scm>
+
     <dependencies>
         <dependency>
             <groupId>jakarta.xml.bind</groupId>
diff --git a/modules/samples/jaxws-samples/pom.xml b/modules/samples/jaxws-samples/pom.xml
index c065cff..70e3b30 100644
--- a/modules/samples/jaxws-samples/pom.xml
+++ b/modules/samples/jaxws-samples/pom.xml
@@ -32,6 +32,13 @@
 
     <name>JAXWS Samples - Echo, Ping, MTOM</name>
 
+    <scm>
+        <connection>scm:git:https://gitbox.apache.org/repos/asf/axis-axis2-java-core.git</connection>
+        <developerConnection>scm:git:https://gitbox.apache.org/repos/asf/axis-axis2-java-core.git</developerConnection>
+        <url>https://gitbox.apache.org/repos/asf?p=axis-axis2-java-core.git;a=summary</url>
+        <tag>HEAD</tag>
+    </scm>
+
     <dependencies>
         <dependency>
             <groupId>javax.servlet</groupId>
diff --git a/modules/samples/jaxws-version/pom.xml b/modules/samples/jaxws-version/pom.xml
index 30fe673..1325cc8 100644
--- a/modules/samples/jaxws-version/pom.xml
+++ b/modules/samples/jaxws-version/pom.xml
@@ -32,6 +32,13 @@
 
     <name>Apache Axis2 -JAXWS Version Service</name>
 
+    <scm>
+        <connection>scm:git:https://gitbox.apache.org/repos/asf/axis-axis2-java-core.git</connection>
+        <developerConnection>scm:git:https://gitbox.apache.org/repos/asf/axis-axis2-java-core.git</developerConnection>
+        <url>https://gitbox.apache.org/repos/asf?p=axis-axis2-java-core.git;a=summary</url>
+        <tag>HEAD</tag>
+    </scm>
+
     <dependencies>
         <dependency>
             <groupId>org.apache.axis2</groupId>
diff --git a/modules/samples/pom.xml b/modules/samples/pom.xml
index 58dc60a..ccbdaaa 100644
--- a/modules/samples/pom.xml
+++ b/modules/samples/pom.xml
@@ -45,6 +45,13 @@
         <module>transport/jms-sample</module>
     </modules>
 
+    <scm>
+        <connection>scm:git:https://gitbox.apache.org/repos/asf/axis-axis2-java-core.git</connection>
+        <developerConnection>scm:git:https://gitbox.apache.org/repos/asf/axis-axis2-java-core.git</developerConnection>
+        <url>https://gitbox.apache.org/repos/asf?p=axis-axis2-java-core.git;a=summary</url>
+        <tag>HEAD</tag>
+    </scm>
+
     <repositories>
         <repository>
             <!-- Necessary because the samples are copied into the binary distribution -->
diff --git a/modules/samples/transport/https-sample/httpsClient/pom.xml b/modules/samples/transport/https-sample/httpsClient/pom.xml
index e6cf68f..a6f4f88 100644
--- a/modules/samples/transport/https-sample/httpsClient/pom.xml
+++ b/modules/samples/transport/https-sample/httpsClient/pom.xml
@@ -23,4 +23,11 @@
     <groupId>org.apache.axis2.examples</groupId>
     <artifactId>httpsClient</artifactId>
     <version>1.8.2-SNAPSHOT</version>
+
+    <scm>
+        <connection>scm:git:https://gitbox.apache.org/repos/asf/axis-axis2-java-core.git</connection>
+        <developerConnection>scm:git:https://gitbox.apache.org/repos/asf/axis-axis2-java-core.git</developerConnection>
+        <url>https://gitbox.apache.org/repos/asf?p=axis-axis2-java-core.git;a=summary</url>
+        <tag>HEAD</tag>
+    </scm>
 </project>
diff --git a/modules/samples/transport/https-sample/httpsService/pom.xml b/modules/samples/transport/https-sample/httpsService/pom.xml
index 7cf4d86..b506777 100644
--- a/modules/samples/transport/https-sample/httpsService/pom.xml
+++ b/modules/samples/transport/https-sample/httpsService/pom.xml
@@ -25,6 +25,13 @@
     <version>1.8.2-SNAPSHOT</version>
     <packaging>war</packaging>
 
+    <scm>
+        <connection>scm:git:https://gitbox.apache.org/repos/asf/axis-axis2-java-core.git</connection>
+        <developerConnection>scm:git:https://gitbox.apache.org/repos/asf/axis-axis2-java-core.git</developerConnection>
+        <url>https://gitbox.apache.org/repos/asf?p=axis-axis2-java-core.git;a=summary</url>
+        <tag>HEAD</tag>
+    </scm>
+
     <build>
         <plugins>
             <plugin>
diff --git a/modules/samples/transport/https-sample/pom.xml b/modules/samples/transport/https-sample/pom.xml
index 7acc562..c70c0a1 100644
--- a/modules/samples/transport/https-sample/pom.xml
+++ b/modules/samples/transport/https-sample/pom.xml
@@ -31,6 +31,13 @@
         <module>httpsClient</module>
     </modules>
 
+    <scm>
+        <connection>scm:git:https://gitbox.apache.org/repos/asf/axis-axis2-java-core.git</connection>
+        <developerConnection>scm:git:https://gitbox.apache.org/repos/asf/axis-axis2-java-core.git</developerConnection>
+        <url>https://gitbox.apache.org/repos/asf?p=axis-axis2-java-core.git;a=summary</url>
+        <tag>HEAD</tag>
+    </scm>
+
     <dependencies>
         <dependency>
             <groupId>org.apache.axis2</groupId>
diff --git a/modules/samples/transport/jms-sample/jmsService/pom.xml b/modules/samples/transport/jms-sample/jmsService/pom.xml
index 1a331ea..20cf4a5 100644
--- a/modules/samples/transport/jms-sample/jmsService/pom.xml
+++ b/modules/samples/transport/jms-sample/jmsService/pom.xml
@@ -12,6 +12,13 @@
     <artifactId>jmsService</artifactId>
     <version>1.8.2-SNAPSHOT</version>
 
+    <scm>
+        <connection>scm:git:https://gitbox.apache.org/repos/asf/axis-axis2-java-core.git</connection>
+        <developerConnection>scm:git:https://gitbox.apache.org/repos/asf/axis-axis2-java-core.git</developerConnection>
+        <url>https://gitbox.apache.org/repos/asf?p=axis-axis2-java-core.git;a=summary</url>
+        <tag>HEAD</tag>
+    </scm>
+
     <build>
         <plugins>
             <plugin>
diff --git a/modules/samples/transport/jms-sample/pom.xml b/modules/samples/transport/jms-sample/pom.xml
index ce1fded..3b84792 100644
--- a/modules/samples/transport/jms-sample/pom.xml
+++ b/modules/samples/transport/jms-sample/pom.xml
@@ -30,6 +30,13 @@
         <module>jmsService</module>
     </modules>
 
+    <scm>
+        <connection>scm:git:https://gitbox.apache.org/repos/asf/axis-axis2-java-core.git</connection>
+        <developerConnection>scm:git:https://gitbox.apache.org/repos/asf/axis-axis2-java-core.git</developerConnection>
+        <url>https://gitbox.apache.org/repos/asf?p=axis-axis2-java-core.git;a=summary</url>
+        <tag>HEAD</tag>
+    </scm>
+
     <dependencies>
         <dependency>
             <groupId>org.apache.axis2</groupId>
diff --git a/modules/tool/archetype/quickstart-webapp/pom.xml b/modules/tool/archetype/quickstart-webapp/pom.xml
index 7e0b8ec..0ccc78f 100644
--- a/modules/tool/archetype/quickstart-webapp/pom.xml
+++ b/modules/tool/archetype/quickstart-webapp/pom.xml
@@ -37,6 +37,13 @@
 	<name>Axis2 quickstart-web archetype </name>
 	<description>Maven archetype for creating a  Axis2 web Service as a webapp </description>
 
+	<scm>
+        <connection>scm:git:https://gitbox.apache.org/repos/asf/axis-axis2-java-core.git</connection>
+        <developerConnection>scm:git:https://gitbox.apache.org/repos/asf/axis-axis2-java-core.git</developerConnection>
+        <url>https://gitbox.apache.org/repos/asf?p=axis-axis2-java-core.git;a=summary</url>
+        <tag>HEAD</tag>
+    </scm>
+
 	<build>
 		<resources>
 			<resource>
diff --git a/modules/tool/archetype/quickstart/pom.xml b/modules/tool/archetype/quickstart/pom.xml
index 9cec968..27550b7 100644
--- a/modules/tool/archetype/quickstart/pom.xml
+++ b/modules/tool/archetype/quickstart/pom.xml
@@ -37,6 +37,13 @@
 	<name>Axis2 quickstart archetype </name>
 	<description>Maven archetype for creating a  Axis2 web Service </description>
 
+	<scm>
+        <connection>scm:git:https://gitbox.apache.org/repos/asf/axis-axis2-java-core.git</connection>
+        <developerConnection>scm:git:https://gitbox.apache.org/repos/asf/axis-axis2-java-core.git</developerConnection>
+        <url>https://gitbox.apache.org/repos/asf?p=axis-axis2-java-core.git;a=summary</url>
+        <tag>HEAD</tag>
+    </scm>
+
 	<build>
 		<resources>
 			<resource>
diff --git a/pom.xml b/pom.xml
index 042f5a8..c3084e6 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1412,6 +1412,31 @@
                         </configuration>
                     </execution>
                     <execution>
+                        <id>check-project-metadata</id>
+                        <phase>verify</phase>
+                        <goals>
+                            <goal>execute</goal>
+                        </goals>
+                        <configuration>
+                            <scripts>
+                                <script><![CDATA[
+                                    // Ensure that the <scm> element is present and correctly populated. This prevents
+                                    // maven-release-plugin from adding an <scm> element in a location that is then rejected by
+                                    // tidy-maven-plugin.
+                                    if (project.scm.url != "https://gitbox.apache.org/repos/asf?p=axis-axis2-java-core.git;a=summary") {
+                                        throw new Error('project.scm.url not set correctly')
+                                    }
+                                    if (project.scm.connection != "scm:git:https://gitbox.apache.org/repos/asf/axis-axis2-java-core.git") {
+                                        throw new Error('project.scm.connection not set correctly')
+                                    }
+                                    if (project.scm.developerConnection != "scm:git:https://gitbox.apache.org/repos/asf/axis-axis2-java-core.git") {
+                                        throw new Error('project.scm.developerConnection not set correctly')
+                                    }
+                                ]]></script>
+                            </scripts>
+                        </configuration>
+                    </execution>
+                    <execution>
                         <id>prepare-site</id>
                         <phase>pre-site</phase>
                         <goals>
diff --git a/systests/SOAP12TestModuleB/pom.xml b/systests/SOAP12TestModuleB/pom.xml
index 2e5e697..ca47e2a 100644
--- a/systests/SOAP12TestModuleB/pom.xml
+++ b/systests/SOAP12TestModuleB/pom.xml
@@ -31,6 +31,13 @@
 
     <url>http://axis.apache.org/axis2/java/core/</url>
 
+    <scm>
+        <connection>scm:git:https://gitbox.apache.org/repos/asf/axis-axis2-java-core.git</connection>
+        <developerConnection>scm:git:https://gitbox.apache.org/repos/asf/axis-axis2-java-core.git</developerConnection>
+        <url>https://gitbox.apache.org/repos/asf?p=axis-axis2-java-core.git;a=summary</url>
+        <tag>HEAD</tag>
+    </scm>
+
     <dependencies>
         <dependency>
             <groupId>org.apache.axis2</groupId>
diff --git a/systests/SOAP12TestModuleC/pom.xml b/systests/SOAP12TestModuleC/pom.xml
index eb5f868..8239c04 100644
--- a/systests/SOAP12TestModuleC/pom.xml
+++ b/systests/SOAP12TestModuleC/pom.xml
@@ -31,6 +31,13 @@
 
     <url>http://axis.apache.org/axis2/java/core/</url>
 
+    <scm>
+        <connection>scm:git:https://gitbox.apache.org/repos/asf/axis-axis2-java-core.git</connection>
+        <developerConnection>scm:git:https://gitbox.apache.org/repos/asf/axis-axis2-java-core.git</developerConnection>
+        <url>https://gitbox.apache.org/repos/asf?p=axis-axis2-java-core.git;a=summary</url>
+        <tag>HEAD</tag>
+    </scm>
+
     <dependencies>
         <dependency>
             <groupId>org.apache.axis2</groupId>
diff --git a/systests/SOAP12TestServiceB/pom.xml b/systests/SOAP12TestServiceB/pom.xml
index 1af80df..80c51f0 100644
--- a/systests/SOAP12TestServiceB/pom.xml
+++ b/systests/SOAP12TestServiceB/pom.xml
@@ -31,6 +31,13 @@
 
     <url>http://axis.apache.org/axis2/java/core/</url>
 
+    <scm>
+        <connection>scm:git:https://gitbox.apache.org/repos/asf/axis-axis2-java-core.git</connection>
+        <developerConnection>scm:git:https://gitbox.apache.org/repos/asf/axis-axis2-java-core.git</developerConnection>
+        <url>https://gitbox.apache.org/repos/asf?p=axis-axis2-java-core.git;a=summary</url>
+        <tag>HEAD</tag>
+    </scm>
+
     <dependencies>
         <dependency>
             <groupId>org.apache.axis2</groupId>
diff --git a/systests/SOAP12TestServiceC/pom.xml b/systests/SOAP12TestServiceC/pom.xml
index 3c91338..f6c1822 100644
--- a/systests/SOAP12TestServiceC/pom.xml
+++ b/systests/SOAP12TestServiceC/pom.xml
@@ -31,6 +31,13 @@
 
     <url>http://axis.apache.org/axis2/java/core/</url>
 
+    <scm>
+        <connection>scm:git:https://gitbox.apache.org/repos/asf/axis-axis2-java-core.git</connection>
+        <developerConnection>scm:git:https://gitbox.apache.org/repos/asf/axis-axis2-java-core.git</developerConnection>
+        <url>https://gitbox.apache.org/repos/asf?p=axis-axis2-java-core.git;a=summary</url>
+        <tag>HEAD</tag>
+    </scm>
+
     <dependencies>
         <dependency>
             <groupId>org.apache.axis2</groupId>
diff --git a/systests/echo/pom.xml b/systests/echo/pom.xml
index e5017cd..a4ae621 100644
--- a/systests/echo/pom.xml
+++ b/systests/echo/pom.xml
@@ -31,6 +31,13 @@
 
     <url>http://axis.apache.org/axis2/java/core/</url>
 
+    <scm>
+        <connection>scm:git:https://gitbox.apache.org/repos/asf/axis-axis2-java-core.git</connection>
+        <developerConnection>scm:git:https://gitbox.apache.org/repos/asf/axis-axis2-java-core.git</developerConnection>
+        <url>https://gitbox.apache.org/repos/asf?p=axis-axis2-java-core.git;a=summary</url>
+        <tag>HEAD</tag>
+    </scm>
+
     <dependencies>
         <dependency>
             <groupId>org.apache.axis2</groupId>
diff --git a/systests/pom.xml b/systests/pom.xml
index 2db9b03..8ea7fa6 100644
--- a/systests/pom.xml
+++ b/systests/pom.xml
@@ -40,6 +40,13 @@
         <module>webapp-tests</module>
     </modules>
 
+    <scm>
+        <connection>scm:git:https://gitbox.apache.org/repos/asf/axis-axis2-java-core.git</connection>
+        <developerConnection>scm:git:https://gitbox.apache.org/repos/asf/axis-axis2-java-core.git</developerConnection>
+        <url>https://gitbox.apache.org/repos/asf?p=axis-axis2-java-core.git;a=summary</url>
+        <tag>HEAD</tag>
+    </scm>
+
     <build>
         <plugins>
             <plugin>
diff --git a/systests/webapp-tests/pom.xml b/systests/webapp-tests/pom.xml
index 0a4a533..3042db4 100644
--- a/systests/webapp-tests/pom.xml
+++ b/systests/webapp-tests/pom.xml
@@ -30,6 +30,13 @@
 
     <url>http://axis.apache.org/axis2/java/core/</url>
 
+    <scm>
+        <connection>scm:git:https://gitbox.apache.org/repos/asf/axis-axis2-java-core.git</connection>
+        <developerConnection>scm:git:https://gitbox.apache.org/repos/asf/axis-axis2-java-core.git</developerConnection>
+        <url>https://gitbox.apache.org/repos/asf?p=axis-axis2-java-core.git;a=summary</url>
+        <tag>HEAD</tag>
+    </scm>
+
     <dependencies>
         <dependency>
             <groupId>${project.groupId}</groupId>