Merge pull request #162 from apache/CONNECTORS-1754

Working on Connectors 1754
diff --git a/.github/workflows/license-check.yml b/.github/workflows/license-check.yml
new file mode 100644
index 0000000..447caa8
--- /dev/null
+++ b/.github/workflows/license-check.yml
@@ -0,0 +1,55 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+name: License Check
+run-name: ${{ github.actor }} is executing the RAT license check🚀
+
+on:
+  workflow_dispatch:
+
+jobs:
+  licenseCheck:
+    runs-on: ubuntu-22.04
+    steps:
+      - uses: actions/checkout@v4.1.1
+      - name: Set up OpenJDK 11 Temurin x64
+        uses: actions/setup-java@v4.0.0
+        with:
+          java-version: '11'
+          distribution: 'temurin'
+          architecture: x64
+          cache: maven
+      - name: Setup Ant
+      - uses: cedx/setup-ant@v2
+        with:
+          optional-tasks: true
+          version: 1.10.14
+      - name: Setup Maven
+        uses: s4u/setup-maven-action@1.11.0
+        with:
+          maven-version: 3.9.6
+      - name: Ant Build
+        run: ant make-core-deps make-deps
+      - name: Maven Build
+        run: mvn clean install -Dmaven.test.skip=true
+      - name: RAT licence checks
+        run: mvn -pl . org.apache.rat:apache-rat:check
+      - name: RAT Report
+        if: always()
+        run: |
+          echo -e "Printing RAT report\n"
+          cat target/rat.txt || true
diff --git a/CHANGES.txt b/CHANGES.txt
index aaff742..9af40da 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -3,6 +3,9 @@
 
 ======================= 2.27-dev =====================
 
+CONNECTORS-1754: Converting release scripts to GitHub workflows
+(Piergiorgio Lucidi)
+
 CONNECTORS-1753: ant make-core-deps fails
 (Guylaine Bassett)
 
diff --git a/framework/combined-service/pom.xml b/framework/combined-service/pom.xml
index fd9228b..f26383b 100644
--- a/framework/combined-service/pom.xml
+++ b/framework/combined-service/pom.xml
@@ -125,7 +125,7 @@
       <plugin>

         <groupId>org.apache.maven.plugins</groupId>

         <artifactId>maven-war-plugin</artifactId>

-        <version>2.3</version>

+        <version>${maven-war-plugin.version}</version>

         <configuration>

           <overlays>

             <overlay>

diff --git a/pom.xml b/pom.xml
index ffdcc3d..ff1d9b6 100644
--- a/pom.xml
+++ b/pom.xml
@@ -96,6 +96,12 @@
     <jsoup.version>1.7.2</jsoup.version>
     <cxf.version>3.5.0</cxf.version>
     <jaxws-ri.version>2.3.2</jaxws-ri.version>
+    <maven-source-plugin.version>3.3.0</maven-source-plugin.version>
+    <maven-jar-plugin.version>3.3.0</maven-jar-plugin.version>
+    <maven-rat-plugin.version>0.16.1</maven-rat-plugin.version>
+    <maven-war-plugin.version>3.4.0</maven-war-plugin.version>
+    <maven-apache-source-release-assembly-descriptor.version>1.5</maven-apache-source-release-assembly-descriptor.version>
+    
   </properties>
 
   <modules>
@@ -111,13 +117,18 @@
         <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-source-plugin</artifactId>
-          <version>2.4</version>
+          <version>${maven-source-plugin.version}</version>
         </plugin>
         <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-jar-plugin</artifactId>
-          <version>2.3.1</version>
+          <version>${maven-jar-plugin.version}</version>
         </plugin>
+        <plugin>
+		    <groupId>org.apache.rat</groupId>
+		    <artifactId>apache-rat-plugin</artifactId>
+		    <version>${maven-rat-plugin.version}</version>
+		  </plugin>
       </plugins>
     </pluginManagement>
 
@@ -172,7 +183,7 @@
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-compiler-plugin</artifactId>
-        <version>3.11.0</version>
+        <version>3.12.1</version>
         <configuration>
           <source>11</source>
           <target>11</target>
@@ -183,7 +194,7 @@
 
       <plugin>
         <artifactId>maven-resources-plugin</artifactId>
-        <version>2.5</version>
+        <version>3.3.1</version>
         <configuration>
           <encoding>UTF-8</encoding>
         </configuration>
@@ -191,9 +202,23 @@
 
       <plugin>
         <artifactId>maven-clean-plugin</artifactId>
-        <version>2.4.1</version>
+        <version>3.3.2</version>
       </plugin>
-
+      
+      <plugin>
+	    <groupId>org.apache.rat</groupId>
+	    <artifactId>apache-rat-plugin</artifactId>
+	    <configuration>
+              <excludes>
+                   <exclude>CHANGES.txt</exclude>
+                   <exclude>DEPENDENCIES.txt</exclude>
+                   <exclude>site/src/documentation/skins/lucene/note.txt</exclude>
+                   <exclude>site/src/documentation/skins/common/xslt/html/split.xsl</exclude>
+                   <exclude>dist-license/DEPENDENCIES.txt</exclude>
+              </excludes>
+         </configuration>
+      </plugin>
+     
     </plugins>
   </build>
 
@@ -211,7 +236,7 @@
                         <dependency>
                             <groupId>org.apache.apache.resources</groupId>
                             <artifactId>apache-source-release-assembly-descriptor</artifactId>
-                            <version>1.0.4</version>
+                            <version>${maven-apache-source-release-assembly-descriptor.version}</version>
                         </dependency>
                     </dependencies>
                     <executions>
diff --git a/test-materials/alfresco-4-war/pom.xml b/test-materials/alfresco-4-war/pom.xml
index 3757fb9..1a5abbf 100644
--- a/test-materials/alfresco-4-war/pom.xml
+++ b/test-materials/alfresco-4-war/pom.xml
@@ -120,7 +120,7 @@
         <plugins>
             <plugin>
                 <artifactId>maven-war-plugin</artifactId>
-                <version>2.3</version>
+                <version>${maven-war-plugin.version}</version>
             </plugin>
         </plugins>
     </pluginManagement>