Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added jdk 11, 17, 21 to the build workflow #17

Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
java: [ '8' ]
java: [ '8', '11', '17', '21' ]
os: [ 'ubuntu-latest', 'macos-latest', 'windows-latest' ]
fail-fast: false
steps:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,9 @@ public void testRecursion() {
properties.setProperty("key3", "value3 ${key2}");
properties = PropertiesResolver.resolveProperties(properties);
System.out.println(properties.get("key3"));
Assert.assertEquals("value3 value2 value1 RECURSION", properties.get("key3"));
String key3val = properties.get("key3").toString();
Assert.assertTrue(key3val.startsWith("value3 value2 value1"));
Assert.assertTrue(key3val.endsWith("RECURSION"));
}

}
17 changes: 5 additions & 12 deletions OpenICF-groovy-connector/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
<version>2.4.7</version>
<scope>provided</scope>
</dependency>

Expand Down Expand Up @@ -232,11 +231,10 @@
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.gmaven</groupId>
<artifactId>gmaven-plugin</artifactId>
<version>1.5</version>
<groupId>org.codehaus.gmavenplus</groupId>
<artifactId>gmavenplus-plugin</artifactId>
<version>3.0.2</version>
<configuration>
<providerSelection>2.0</providerSelection>
<sourceEncoding>UTF-8</sourceEncoding>
</configuration>
<executions>
Expand All @@ -245,20 +243,15 @@
<goal>generateStubs</goal>
<goal>compile</goal>
<goal>generateTestStubs</goal>
<goal>testCompile</goal>
<goal>compileTests</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.codehaus.gmaven.runtime</groupId>
<artifactId>gmaven-runtime-2.0</artifactId>
<version>1.5</version>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
<version>2.2.2</version>
<version>${groovy.version}</version>
</dependency>
</dependencies>
</plugin>
Expand Down
3 changes: 2 additions & 1 deletion OpenICF-java-framework/bundles-parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@
<links>
<link>http://download.oracle.com/javase/8/docs/api/</link>
<link>http://docs.groovy-lang.org/latest/html/api/</link>
<link>http://openicf.forgerock.org/apidocs/</link>
<!-- <link>http://openicf.forgerock.org/apidocs/</link>-->
</links>
</configuration>
</plugin>
Expand Down Expand Up @@ -216,6 +216,7 @@
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<version>5.1.9</version>
<configuration>
<excludeDependencies>${openicf.osgi.exclude.dependencies}</excludeDependencies>
<instructions>
Expand Down
16 changes: 16 additions & 0 deletions OpenICF-java-framework/connector-framework-internal/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,22 @@
The IdentityConnectors framework provides a container to separate the Connector bundle from the application.
The framework provides many common features that developers would otherwise need to implement on their own.
</description>
<profiles>
<profile>
<id>jdk17.options</id>
<activation>
<jdk>[17,)</jdk>
</activation>
<dependencies>
<dependency>
<groupId>org.openjdk.nashorn</groupId>
<artifactId>nashorn-core</artifactId>
<version>15.4</version>
<optional>true</optional>
</dependency>
</dependencies>
</profile>
</profiles>

<dependencies>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,10 @@
* Creates a new ScriptExecutorFactory for executing JavaScript scripts.
*/
public class JavaScriptExecutorFactory extends ScriptExecutorFactory {

public static final String JAVA_SCRIPT = "JavaScript";
private final ScriptEngineManager manager = new ScriptEngineManager(null);
private final ScriptEngineManager manager =
Double.parseDouble(System.getProperty("java.specification.version")) < 15
? new ScriptEngineManager(null) : new ScriptEngineManager();
private final boolean compilable;

/**
Expand Down
4 changes: 2 additions & 2 deletions OpenICF-java-framework/connector-server-jetty/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@

<properties>
<!-- maven-compiler-plugin -->
<maven.compiler.target>1.7</maven.compiler.target>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>1.8</maven.compiler.source>
maximthomas marked this conversation as resolved.
Show resolved Hide resolved
<jetty.version>9.2.24.v20180105</jetty.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
Expand Down
25 changes: 22 additions & 3 deletions OpenICF-java-framework/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@

<slf4j.version>1.7.12</slf4j.version>
<logback.version>1.1.7</logback.version>
<groovy.version>2.2.2</groovy.version>
<groovy.version>2.4.21</groovy.version>
<grizzly.version>2.3.35</grizzly.version>
<protobuf-java.version>3.0.2</protobuf-java.version>

Expand Down Expand Up @@ -122,7 +122,26 @@
</modules>

<profiles>

<profile>
<id>jdk17.options</id>
<activation>
<jdk>[17,)</jdk>
</activation>
<properties>
<nashorn.version>15.4</nashorn.version>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.openjdk.nashorn</groupId>
<artifactId>nashorn-core</artifactId>
<version>${nashorn.version}</version>
<scope>provided</scope>
<optional>true</optional>
</dependency>
</dependencies>
</dependencyManagement>
</profile>
</profiles>

<dependencyManagement>
Expand All @@ -134,7 +153,6 @@
<version>${groovy.version}</version>
<scope>provided</scope>
</dependency>

<!-- Test Dependencies -->
<dependency>
<groupId>org.openidentityplatform.openicf.framework</groupId>
Expand Down Expand Up @@ -202,6 +220,7 @@
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<version>5.1.9</version>
<configuration>
<instructions>
<!-- OSGi Headers -->
Expand Down
14 changes: 4 additions & 10 deletions OpenICF-kerberos-connector/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,10 @@
<artifactId>maven-compiler-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.codehaus.gmaven</groupId>
<artifactId>gmaven-plugin</artifactId>
<version>1.5</version>
<groupId>org.codehaus.gmavenplus</groupId>
<artifactId>gmavenplus-plugin</artifactId>
<version>3.0.2</version>
<configuration>
<providerSelection>2.0</providerSelection>
<sourceEncoding>UTF-8</sourceEncoding>
</configuration>
<executions>
Expand All @@ -92,15 +91,10 @@
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.codehaus.gmaven.runtime</groupId>
<artifactId>gmaven-runtime-2.0</artifactId>
<version>1.5</version>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
<version>2.2.2</version>
<version>${groovy.version}</version>
</dependency>
</dependencies>
</plugin>
Expand Down
20 changes: 7 additions & 13 deletions OpenICF-ssh-connector/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
<name>OpenICF SSH Connector</name>
<description>Generic SSH connector</description>
<properties>
<maven.compiler.target>1.7</maven.compiler.target>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>1.8</maven.compiler.source>
<connectorPackage>org.forgerock.openicf.connectors.ssh</connectorPackage>
<connectorClass>SSHConnector</connectorClass>
<framework.compatibilityVersion>1.5</framework.compatibilityVersion>
Expand Down Expand Up @@ -108,11 +108,10 @@
<build>
<plugins>
<plugin>
<groupId>org.codehaus.gmaven</groupId>
<artifactId>gmaven-plugin</artifactId>
<version>1.5</version>
<groupId>org.codehaus.gmavenplus</groupId>
<artifactId>gmavenplus-plugin</artifactId>
<version>3.0.2</version>
<configuration>
<providerSelection>2.0</providerSelection>
<sourceEncoding>UTF-8</sourceEncoding>
</configuration>
<executions>
Expand All @@ -121,20 +120,15 @@
<goal>generateStubs</goal>
<goal>compile</goal>
<goal>generateTestStubs</goal>
<goal>testCompile</goal>
<goal>compileTests</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.codehaus.gmaven.runtime</groupId>
<artifactId>gmaven-runtime-2.0</artifactId>
<version>1.5</version>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
<version>2.2.2</version>
<version>${groovy.version}</version>
</dependency>
</dependencies>
</plugin>
Expand Down
19 changes: 19 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>1.8</maven.compiler.source>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.surefire.options></java.surefire.options>
</properties>
<licenses>
<license>
Expand Down Expand Up @@ -141,6 +142,21 @@
</plugins>
</build>
</profile>
<profile>
<id>jdk17.options</id>
<activation>
<jdk>[17,)</jdk>
</activation>
<properties>
<java.surefire.options>
--add-opens java.base/java.lang=ALL-UNNAMED
--add-opens java.base/java.security=ALL-UNNAMED
--add-opens java.base/java.net=ALL-UNNAMED
--add-opens java.base/java.lang.reflect=ALL-UNNAMED
--add-opens java.base/java.util=ALL-UNNAMED
</java.surefire.options>
</properties>
</profile>
</profiles>

<dependencyManagement>
Expand Down Expand Up @@ -249,6 +265,9 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.2.5</version>
<configuration>
<argLine>${java.surefire.options}</argLine>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down