Skip to content

Commit

Permalink
ADD maven-compiler-plugin release for cross compile compatibility (#801)
Browse files Browse the repository at this point in the history
  • Loading branch information
vharseko authored Oct 15, 2024
1 parent a59aed5 commit 3fe9007
Show file tree
Hide file tree
Showing 7 changed files with 164 additions and 26 deletions.
26 changes: 26 additions & 0 deletions openam-authentication/openam-auth-cert/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* information: "Portions copyright [year] [name of copyright owner]".
*
* Copyright 2011-2016 ForgeRock AS.
* Portions copyright 2017-2024 3A Systems, LLC
-->
<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>
Expand All @@ -30,6 +31,31 @@
<artifactId>openam-auth-cert</artifactId>
<packaging>jar</packaging>

<profiles>
<profile>
<id>set-compiler-release</id>
<activation>
<jdk>[9,)</jdk>
</activation>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<!--
package sun.security.x509 does not exist
-->
<release combine.self="override"/>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</profile>
</profiles>

<dependencies>
<dependency>
<groupId>javax.servlet</groupId>
Expand Down
26 changes: 25 additions & 1 deletion openam-certs/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* information: "Portions copyright [year] [name of copyright owner]".
*
* Copyright 2015-2016 ForgeRock AS.
* Portions copyright 2017-2024 3A Systems, LLC
-->
<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">
<parent>
Expand All @@ -24,7 +25,30 @@

<artifactId>openam-certs</artifactId>
<name>OpenAM Certificate Validation</name>

<profiles>
<profile>
<id>set-compiler-release</id>
<activation>
<jdk>[9,)</jdk>
</activation>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<!--
package sun.security.x509 does not exist
-->
<release combine.self="override"/>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</profile>
</profiles>
<dependencies>
<dependency>
<groupId>org.openidentityplatform.openam</groupId>
Expand Down
25 changes: 25 additions & 0 deletions openam-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* information: "Portions copyright [year] [name of copyright owner]".
*
* Copyright 2011-2016 ForgeRock AS.
* Portions copyright 2017-2024 3A Systems, LLC
-->
<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>
Expand Down Expand Up @@ -40,6 +41,30 @@
</snapshots>
</repository>
</repositories>
<profiles>
<profile>
<id>set-compiler-release</id>
<activation>
<jdk>[9,)</jdk>
</activation>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<!--
package sun.security.x509 does not exist
-->
<release combine.self="override"/>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</profile>
</profiles>
<!-- Build -->
<build>
<plugins>
Expand Down
2 changes: 1 addition & 1 deletion openam-distribution/openam-distribution-docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ENV CATALINA_HOME=/usr/local/tomcat \
OPENAM_USER="openam" \
OPENAM_DATA_DIR="/usr/openam/config"
ENV PATH=$CATALINA_HOME/bin:$PATH \
JAVA_OPTS="--add-exports java.base/sun.security.x509=ALL-UNNAMED --add-exports java.base/sun.security.tools.keytool=ALL-UNNAMED --add-exports java.xml/com.sun.org.apache.xerces.internal.dom=ALL-UNNAMED" \
JAVA_OPTS="--add-exports java.base/sun.security.util=ALL-UNNAMED --add-exports java.base/sun.security.krb5=ALL-UNNAMED --add-exports java.base/sun.security.x509=ALL-UNNAMED --add-exports java.base/sun.security.tools.keytool=ALL-UNNAMED --add-exports java.xml/com.sun.org.apache.xerces.internal.dom=ALL-UNNAMED" \
MEMORY="-server -XX:+UseG1GC -XX:+UseContainerSupport" \
CATALINA_OPTS="$MEMORY -Dcom.iplanet.services.configpath=$OPENAM_DATA_DIR -Dcom.sun.identity.configuration.directory=$OPENAM_DATA_DIR"

Expand Down
26 changes: 25 additions & 1 deletion openam-federation/OpenFM/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* information: "Portions copyright [year] [name of copyright owner]".
*
* Copyright 2011-2016 ForgeRock AS.
* Portions copyright 2017-2024 3A Systems, LLC
-->
<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>
Expand All @@ -32,7 +33,30 @@
<properties>
<skipTests>true</skipTests>
</properties>

<profiles>
<profile>
<id>set-compiler-release</id>
<activation>
<jdk>[9,)</jdk>
</activation>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<!--
package sun.security.krb5 does not exist
-->
<release combine.self="override"/>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</profile>
</profiles>
<!-- Build -->
<build>
<resources>
Expand Down
27 changes: 27 additions & 0 deletions openam-shared/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* information: "Portions copyright [year] [name of copyright owner]".
*
* Copyright 2011-2016 ForgeRock AS.
* Portions copyright 2017-2024 3A Systems, LLC
-->
<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>
Expand All @@ -34,6 +35,32 @@
<checkstyleFailOnError>true</checkstyleFailOnError>
</properties>

<profiles>
<profile>
<id>set-compiler-release</id>
<activation>
<jdk>[9,)</jdk>
</activation>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<!--
package sun.security.util does not exist
package sun.security.x509 does not exist
-->
<release combine.self="override"/>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</profile>
</profiles>

<dependencies>
<dependency>
<groupId>org.openidentityplatform.openam</groupId>
Expand Down
58 changes: 35 additions & 23 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*
* Copyright 2011-2016 ForgeRock AS.
* Portions Copyrighted 2016 Agile Digital Engineering
* Portions Copyrighted 2017-2024 3A Systems, LLC
* Portions copyright 2017-2024 3A Systems, LLC
-->
<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>
Expand Down Expand Up @@ -75,8 +75,8 @@
<!-- Project Encoding -->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<!-- Version Properties -->
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
<maven.compiler.source>8</maven.compiler.source>
<!-- Supress checkstyle errors on legacy com.iplanet and com.sun.identity packages -->
<checkstyleUnitTestSuppressionsLocation>checkstyle/suppressions.xml</checkstyleUnitTestSuppressionsLocation>
<opendj.version>4.8.0</opendj.version>
Expand Down Expand Up @@ -154,6 +154,30 @@
<javadoc.options>-J-Xmx2g</javadoc.options>
</properties>
</profile>
<profile>
<id>set-compiler-release</id>
<activation>
<jdk>[9,)</jdk>
</activation>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<fork>true</fork>
<release>8</release>
<compilerArgs>
<arg>-XDignore.symbol.file</arg>
<arg>-Xlint:unchecked</arg>
</compilerArgs>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</profile>
<profile>
<id>jdk11.options</id>
<activation>
Expand Down Expand Up @@ -193,6 +217,7 @@
--add-exports java.base/jdk.internal.ref=ALL-UNNAMED
--add-exports java.base/jdk.internal.misc=ALL-UNNAMED
--add-exports java.base/sun.nio.ch=ALL-UNNAMED
--add-exports java.base/sun.security.krb5=ALL-UNNAMED
--add-exports java.base/sun.security.util=ALL-UNNAMED
--add-exports java.base/sun.security.jca=ALL-UNNAMED
--add-exports java.base/sun.security.x509=ALL-UNNAMED
Expand Down Expand Up @@ -1933,17 +1958,6 @@
<shortRevisionLength>10</shortRevisionLength>
</configuration>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
<encoding>UTF-8</encoding>
<!-- Override Enforcer Rules for OpenAM Compilation -->
<compilerArgument>-Xlint:none</compilerArgument>
<showDeprecation>false</showDeprecation>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
Expand Down Expand Up @@ -2160,15 +2174,13 @@
<inherited>true</inherited>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.10.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<fork>true</fork>
<compilerArgs>
<arg>-XDignore.symbol.file</arg>
</compilerArgs>
</configuration>
<version>3.13.0</version>
<configuration>
<fork>true</fork>
<compilerArgs>
<arg>-XDignore.symbol.file=true</arg>
</compilerArgs>
</configuration>
</plugin>

<plugin>
Expand Down

0 comments on commit 3fe9007

Please sign in to comment.