mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

vharseko
18.55.2022 0e25cf118d88428769f36c98c7a5b624d627ac94
Add support jdk '16','17','18' (#232)

8 files modified
70 ■■■■■ changed files
.github/workflows/build.yml 5 ●●●●● patch | view | raw | blame | history
.github/workflows/deploy.yml 4 ●●●● patch | view | raw | blame | history
.github/workflows/release.yml 2 ●●● patch | view | raw | blame | history
opendj-dsml-servlet/pom.xml 30 ●●●● patch | view | raw | blame | history
opendj-dsml-servlet/resources/schema/bindings.xjb 2 ●●● patch | view | raw | blame | history
opendj-dsml-servlet/src/main/java/org/opends/dsml/protocol/DSMLSearchOperation.java 2 ●●● patch | view | raw | blame | history
opendj-dsml-servlet/src/main/java/org/opends/dsml/protocol/DSMLServlet.java 10 ●●●● patch | view | raw | blame | history
pom.xml 15 ●●●● patch | view | raw | blame | history
.github/workflows/build.yml
@@ -2,7 +2,6 @@
on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]
@@ -11,7 +10,7 @@
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        java: [ '8', '11']
        java: [ '8','11','16','17','18']
        os: [ 'ubuntu-latest', 'macos-latest', 'windows-latest' ]
    steps:
    - name:  Install wine+rpm for distribution
@@ -33,7 +32,7 @@
      uses: actions/setup-java@v2
      with:
        java-version: ${{ matrix.java }}
        distribution: 'adopt'
        distribution: 'temurin'
    - name: Cache Maven packages
      uses: actions/cache@v3
      with:
.github/workflows/deploy.yml
@@ -6,7 +6,7 @@
    workflows: ["Build"]
    types: [completed]
jobs:
  deploy-maven:
  package-deploy-maven:
    if: ${{ github.event.workflow_run.conclusion == 'success' }}
    runs-on: 'ubuntu-latest'
    steps:
@@ -33,7 +33,7 @@
        uses: actions/setup-java@v2
        with:
          java-version: '8'
          distribution: 'adopt'
          distribution: 'temurin'
          server-id: ossrh
          server-username: MAVEN_USERNAME
          server-password: MAVEN_PASSWORD
.github/workflows/release.yml
@@ -37,7 +37,7 @@
        uses: actions/setup-java@v2
        with:
          java-version: '8'
          distribution: 'adopt'
          distribution: 'temurin'
          server-id: ossrh
          server-username: MAVEN_USERNAME
          server-password: MAVEN_PASSWORD
opendj-dsml-servlet/pom.xml
@@ -86,6 +86,12 @@
            <version>2.3.2</version>
            <type>pom</type>
        </dependency>
        <dependency>
            <groupId>jakarta.xml.bind</groupId>
            <artifactId>jakarta.xml.bind-api</artifactId>
            <version>3.0.1</version>
        </dependency>
    </dependencies>
    <build><finalName>${project.groupId}.${project.artifactId}</finalName>
@@ -229,7 +235,7 @@
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>jaxb2-maven-plugin</artifactId>
                <version>1.6</version>
                <version>3.1.0</version>
                <executions>
                    <execution>
                        <id>prepare-dsml-library</id>
@@ -238,23 +244,19 @@
                        </goals>
                        <configuration>
                            <outputDirectory>${project.build.directory}/gen</outputDirectory>
                            <schemaDirectory>${basedir}/resources/schema</schemaDirectory>
                            <schemaFiles>DSMLv2.xsd</schemaFiles>
                            <sources>
                                <source>resources/schema/DSMLv2.xsd</source>
                            </sources>
                            <packageName>org.opends.dsml.protocol</packageName>
                            <bindingDirectory>${basedir}/resources/schema</bindingDirectory>
                            <bindingFiles>bindings.xjb</bindingFiles>
                            <target>2.1</target>
                            <npa>true</npa>
                            <xjbSources>
                                <xjbSource>resources/schema/bindings.xjb</xjbSource>
                            </xjbSources>
                            <target>3.0</target>
                            <extension>true</extension>
                            <noPackageLevelAnnotations>true</noPackageLevelAnnotations>
                        </configuration>
                    </execution>
                </executions>
                <dependencies>
                    <dependency>
                        <groupId>javax.activation</groupId>
                        <artifactId>activation</artifactId>
                        <version>1.1.1</version>
                    </dependency>
                </dependencies>
            </plugin>
            <!-- WAR artefact is build by the assembly plugin -->
opendj-dsml-servlet/resources/schema/bindings.xjb
@@ -14,7 +14,7 @@
  Copyright 2012 ForgeRock AS.
  ! -->
<bindings xmlns="http://java.sun.com/xml/ns/jaxb" version="2.0"
<bindings xmlns="https://jakarta.ee/xml/ns/jaxb" version="3.0"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" schemaLocation="DSMLv2.xsd" >
 <bindings 
node="//xsd:complexType[@name='AttributeValueAssertion']/xsd:sequence/xsd:element[@name='value']">
opendj-dsml-servlet/src/main/java/org/opends/dsml/protocol/DSMLSearchOperation.java
@@ -24,7 +24,7 @@
import java.util.LinkedList;
import java.util.List;
import javax.xml.bind.JAXBElement;
import jakarta.xml.bind.JAXBElement;
import org.forgerock.i18n.LocalizableMessage;
import org.forgerock.opendj.ldap.ByteString;
opendj-dsml-servlet/src/main/java/org/opends/dsml/protocol/DSMLServlet.java
@@ -50,11 +50,11 @@
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.xml.XMLConstants;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.JAXBException;
import javax.xml.bind.Marshaller;
import javax.xml.bind.Unmarshaller;
import jakarta.xml.bind.JAXBContext;
import jakarta.xml.bind.JAXBElement;
import jakarta.xml.bind.JAXBException;
import jakarta.xml.bind.Marshaller;
import jakarta.xml.bind.Unmarshaller;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
pom.xml
@@ -356,7 +356,7 @@
                    <inherited>true</inherited>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.8.1</version>
                    <version>3.10.1</version>
                    <configuration>
                        <fork>true</fork>
                        <compilerArgs>
@@ -440,9 +440,8 @@
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>3.0.0-M4</version>
                    <version>3.0.0-M4</version> <!-- M6 DecodeException but got java.nio.BufferOverflowException -->
                    <configuration>
                        <argLine>-server</argLine>
                        <properties>
                            <property>
                                <name>usedefaultlisteners</name>
@@ -705,7 +704,15 @@
                <module>opendj-packages</module>
            </modules>
        </profile>
        <profile>
          <id>jdk16.options</id>
          <activation>
            <jdk>[16,)</jdk>
          </activation>
          <properties>
            <argLine>--add-exports java.base/sun.security.x509=ALL-UNNAMED --add-exports java.base/sun.security.tools.keytool=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.lang.reflect=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.net=ALL-UNNAMED  --add-opens java.base/java.io=ALL-UNNAMED --add-opens java.base/java.util.regex=ALL-UNNAMED --add-opens java.base/java.security=ALL-UNNAMED --add-opens java.naming/javax.naming.spi=ALL-UNNAMED</argLine>
          </properties>
        </profile>
        <profile>
            <id>release-sign-artifacts</id>
            <activation>