Skip to content

Commit

Permalink
Java 9+ compatibility by adding JAXB to dependencies #531
Browse files Browse the repository at this point in the history
  • Loading branch information
luis100 committed Jan 4, 2023
1 parent 70931d6 commit 51e9174
Show file tree
Hide file tree
Showing 5 changed files with 90 additions and 29 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,19 @@ To use the program, Java JRE 7 or higher needs to be installed. Instructions on

To use the program, open a command-line and try out the following command (replace x.y.z accordingly to the version of the binary in use):

If using Java 8 to 15:

```text
java -jar "-Dfile.encoding=UTF-8" dbptk-app-X.Y.Z.jar
```

If using Java 17:
```text
java --add-opens java.xml/com.sun.org.apache.xerces.internal.jaxp=ALL-UNNAMED -jar "-Dfile.encoding=UTF-8" dbptk-app-X.Y.Z.jar
```

NOTE: Getting `WARN could not get type for name javax.xml.bind.annotation.adapters.XmlAdapter from any class loader` issue? See [workaround](https://github.com/keeps/dbptk-developer/issues/531#issuecomment-1370810614).

Using this command you will be presented with the application usage, describing all supported modules and their parameters.
This information is also available in the [application usage page](https://github.com/keeps/db-preservation-toolkit/wiki/Application-usage).

Expand Down
57 changes: 34 additions & 23 deletions dbptk-core/pom.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<name>dbptk-core</name>
<groupId>com.databasepreservation</groupId>
Expand All @@ -23,6 +23,17 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifestEntries>
<Automatic-Module-Name>com.databasepreservation</Automatic-Module-Name>
</manifestEntries>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
Expand Down Expand Up @@ -157,10 +168,10 @@
<artifactId>dbptk-filter-external-lobs</artifactId>
</dependency>

<dependency>
<groupId>com.databasepreservation</groupId>
<artifactId>dbptk-filter-merkle-tree</artifactId>
</dependency>
<dependency>
<groupId>com.databasepreservation</groupId>
<artifactId>dbptk-filter-merkle-tree</artifactId>
</dependency>

<dependency>
<groupId>com.databasepreservation</groupId>
Expand Down Expand Up @@ -193,21 +204,21 @@
<artifactId>logback-classic</artifactId>
</dependency>

<!-- test -->
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-integration</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<scope>test</scope>
</dependency>
<!-- test -->
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-integration</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
</project>
</project>
29 changes: 26 additions & 3 deletions dbptk-model/pom.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?xml version="1.0"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<name>dbptk-model</name>
<groupId>com.databasepreservation</groupId>
Expand Down Expand Up @@ -65,6 +66,17 @@
<artifactId>jackson-annotations</artifactId>
<version>2.13.2</version>
</dependency>
<dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
<version>2.3.3</version>
</dependency>

<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<version>2.3.7</version>
</dependency>
</dependencies>
<build>
<resources>
Expand All @@ -74,10 +86,21 @@
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifestEntries>
<Automatic-Module-Name>com.databasepreservation.model</Automatic-Module-Name>
</manifestEntries>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>pl.project13.maven</groupId>
<artifactId>git-commit-id-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
</project>
15 changes: 15 additions & 0 deletions dbptk-modules/dbptk-module-siard/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,19 @@
<version>3.0.7</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifestEntries>
<Automatic-Module-Name>com.databasepreservation.modules.siard</Automatic-Module-Name>
</manifestEntries>
</archive>
</configuration>
</plugin>
</plugins>
</build>
</project>
9 changes: 6 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -116,14 +116,12 @@
<artifactId>license-maven-plugin</artifactId>
<version>3.0</version>
<configuration>
<!--<header>com/mycila/maven/plugin/license/templates/LGPL-3.txt</header> -->
<header>LICENSE_HEADER.txt</header>
<keywords>
<keyword>license</keyword>
<keyword>copyright</keyword>
</keywords>
<properties>
<!--<project.name>Database Preservation Toolkit</project.name> -->
<project.license.url>https://github.com/keeps/db-preservation-toolkit</project.license.url>
</properties>
<includes>
Expand Down Expand Up @@ -159,10 +157,15 @@
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.3.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.4</version>
<version>3.4.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down

0 comments on commit 51e9174

Please sign in to comment.