Incorporate pseudonymization scripts into maven project

And set minimum java version to 17

Change-Id: Ieb8c9c0cd64214111cb7ef11775ea0272f46054c
diff --git a/pom.xml b/pom.xml
index 74ceb7b..4a20c45 100644
--- a/pom.xml
+++ b/pom.xml
@@ -10,8 +10,12 @@
 
     <properties>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-        <maven.compiler.release>11</maven.compiler.release>
-    </properties>
+        <maven.compiler.source>17</maven.compiler.source>
+        <maven.compiler.target>17</maven.compiler.target>
+        <!--  Use the release flag only if you are using Java 9+  -->
+        <!--  <maven.compiler.release>8</maven.compiler.release>  -->
+        <!-- verbose is useful for debugging purposes -->
+        <maven.compiler.verbose>true</maven.compiler.verbose>     </properties>
 
     <build>
         <resources>
@@ -28,14 +32,16 @@
                 </includes>
             </resource>
         </resources>
+
         <plugins>
+
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-javadoc-plugin</artifactId>
                 <version>3.1.1</version>
                 <configuration>
                     <failOnError>false</failOnError>
-                    <source>${maven.compiler.release}</source>
+                    <source>${maven.compiler.target}</source>
                     <javadocExecutable>${java.home}/bin/javadoc
                     </javadocExecutable>
                 </configuration>
@@ -70,12 +76,11 @@
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-compiler-plugin</artifactId>
-                <version>3.8.1</version>
+                <version>3.10.1</version>
                 <configuration>
                     <!-- or whatever version you use -->
-                    <release>${maven.compiler.release}</release>
-                    <source>${maven.compiler.release}</source>
-                    <target>${maven.compiler.release}</target>
+                    <source>${maven.compiler.source}</source>
+                    <target>${maven.compiler.target}</target>
                     <showDeprecation>true</showDeprecation>
                     <annotationProcessorPaths>
                         <path>
@@ -84,10 +89,6 @@
                             <version>4.2.0</version>
                         </path>
                     </annotationProcessorPaths>
-                    <compilerArgs>
-                        <arg>-Aproject=${project.groupId}/${project.artifactId}
-                        </arg>
-                    </compilerArgs>
                 </configuration>
                 <executions>
                     <!-- Replacing default-compile as it is treated specially by maven -->
@@ -117,8 +118,9 @@
                     </execution>
                 </executions>
             </plugin>
-            <plugin>
-                <artifactId>maven-assembly-plugin</artifactId>
+
+             <plugin>
+            <artifactId>maven-assembly-plugin</artifactId>
                 <executions>
                     <execution>
                         <phase>package</phase>
@@ -172,11 +174,85 @@
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-surefire-plugin</artifactId>
-                <!-- JUnit 5 requires Surefire version 2.22.0 or higher -->
                 <version>2.22.2</version>
+                <configuration>
+                    <includes>
+                        <include>**/*Test.java</include>
+                    </includes>
+                </configuration>
             </plugin>
         </plugins>
     </build>
+
+    <profiles>
+        <profile>
+            <id>activate-this-only-outside-intellij</id>
+            <activation>
+                <property>
+                    <name>!idea.version</name>
+                </property>
+            </activation>
+
+            <build>
+                <plugins>
+                    <plugin>
+                        <artifactId>maven-compiler-plugin</artifactId>
+                        <version>3.10.1</version>
+                        <configuration>
+                            <compilerId>groovy-eclipse-compiler</compilerId>
+                            <compilerArguments>
+                                <configScript>${project.basedir}/config.groovy</configScript>
+                            </compilerArguments>
+                        </configuration>
+                        <dependencies>
+                            <dependency>
+                                <groupId>org.codehaus.groovy</groupId>
+                                <artifactId>groovy-eclipse-compiler</artifactId>
+                                <version>3.8.0</version>
+                            </dependency>
+                            <dependency>
+                                <groupId>org.codehaus.groovy</groupId>
+                                <artifactId>groovy-eclipse-batch</artifactId>
+                                <version>4.0.6-02</version>
+                            </dependency>
+                            <dependency>
+                                <groupId>org.apache.ivy</groupId>
+                                <artifactId>ivy</artifactId>
+                                <version>2.5.1</version>
+                            </dependency>
+                        </dependencies>
+                    </plugin>
+                </plugins>
+            </build>
+            <dependencies>
+                <dependency>
+                    <groupId>org.codehaus.groovy</groupId>
+                    <artifactId>groovy-eclipse-compiler</artifactId>
+                    <version>3.8.0</version>
+                </dependency>
+                <dependency>
+                    <groupId>org.codehaus.groovy</groupId>
+                    <artifactId>groovy-eclipse-batch</artifactId>
+                    <version>4.0.6-02</version>
+                </dependency>
+            </dependencies>
+
+            <repositories>
+                <repository>
+                    <id>groovy-libs-release-local</id>
+                    <url>https://groovy.jfrog.io/artifactory/plugins-release-local</url>
+                </repository>
+            </repositories>
+
+            <pluginRepositories>
+                <pluginRepository>
+                    <id>groovy-plugins-release-local</id>
+                    <url>https://groovy.jfrog.io/artifactory/plugins-release-local</url>
+                </pluginRepository>
+            </pluginRepositories>
+        </profile>
+    </profiles>
+
     <dependencies>
         <dependency>
             <groupId>info.picocli</groupId>
@@ -229,5 +305,43 @@
             <artifactId>xz</artifactId>
             <version>1.9</version>
         </dependency>
+        <dependency>
+            <groupId>org.apache.groovy</groupId>
+            <artifactId>groovy</artifactId>
+            <version>4.0.6</version>
+        </dependency>
+
+        <!-- https://mvnrepository.com/artifact/org.codehaus.groovy/groovy-eclipse-batch -->
+
+        <dependency>
+            <groupId>org.codehaus.gpars</groupId>
+            <artifactId>gpars</artifactId>
+            <version>1.2.1</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.ivy</groupId>
+            <artifactId>ivy</artifactId>
+            <version>2.5.1</version>
+            <scope>compile</scope>
+            <optional>true</optional>
+        </dependency>
+        <dependency>
+            <groupId>info.picocli</groupId>
+            <artifactId>picocli-groovy</artifactId>
+            <version>4.6.3</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.groovy</groupId>
+            <artifactId>groovy-cli-picocli</artifactId>
+            <version>4.0.6</version>
+        </dependency>
+
+        <dependency>
+            <groupId>commons-cli</groupId>
+            <artifactId>commons-cli</artifactId>
+            <version>1.2</version>
+        </dependency>
     </dependencies>
+
+
 </project>
\ No newline at end of file