Skip to content

Commit

Permalink
fix: downgrade to Java 11 compatible XML APIs
Browse files Browse the repository at this point in the history
- NiFi 1.x targets Java 11 and brings Java 11 compatible XML libraries
- Align versions used in the project
- Use javax.xml instead of jakarta.xml
  • Loading branch information
bobeal committed Jul 25, 2024
1 parent 18cab85 commit 1a0539b
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 17 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up JDK 17
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '17'
java-version: '11'
distribution: 'temurin'
cache: maven

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ jobs:

steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '17'
java-version: '11'
distribution: 'temurin'
cache: maven
- name: Build with Maven
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/mvn-dependency-submission.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ jobs:

steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '17'
java-version: '11'
distribution: 'temurin'
cache: maven
- name: Maven Dependency Tree Dependency Submission
Expand Down
12 changes: 6 additions & 6 deletions nifi-file-identity-provider/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@
<profile>
<id>jigsaw</id>
<properties>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
</properties>
<build>
<plugins>
Expand All @@ -115,12 +115,12 @@
<dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
<version>4.0.2</version>
<version>2.3.3</version>
</dependency>
<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
<version>4.0.4</version>
<version>2.3.9</version>
</dependency>
</dependencies>
</profile>
Expand Down Expand Up @@ -150,12 +150,12 @@
<dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
<version>4.0.2</version>
<version>2.3.3</version>
</dependency>
<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
<version>4.0.4</version>
<version>2.3.9</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
import io.egm.nifi.authentication.file.generated.ObjectFactory;
import io.egm.nifi.authentication.file.generated.UserCredentials;
import io.egm.nifi.authentication.file.generated.UserCredentialsList;
import jakarta.xml.bind.*;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.security.crypto.password.PasswordEncoder;

import javax.xml.XMLConstants;
import javax.xml.bind.*;
import javax.xml.transform.stream.StreamSource;
import javax.xml.validation.Schema;
import javax.xml.validation.SchemaFactory;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@

import io.egm.nifi.authentication.file.generated.UserCredentials;
import io.egm.nifi.authentication.file.generated.UserCredentialsList;
import jakarta.xml.bind.UnmarshalException;
import org.apache.commons.io.FileUtils;
import org.junit.jupiter.api.Test;

import javax.xml.bind.UnmarshalException;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.InvalidObjectException;
Expand Down
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
<packaging>pom</packaging>

<properties>
<maven.compiler.target>17</maven.compiler.target>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<maven.compiler.source>11</maven.compiler.source>
</properties>

<modules>
Expand All @@ -44,7 +44,7 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxb2-maven-plugin</artifactId>
<version>3.1.0</version>
<version>2.5.0</version>
</plugin>
</plugins>
</pluginManagement>
Expand Down

0 comments on commit 1a0539b

Please sign in to comment.