Skip to content

Commit 35844db

Browse files
authored
Javax to jakarta cleanup plus other stuff (#393)
* Move to Kakarta library for mail annotations and REST (JAX-RS) * Update to Jakarta libraries * Initial upgrade notes * Use the latest versions of github actions modules * Add useful info for the problematic current WebUI implementation * Use V3 for Java 8 compat * Downgrade jakarta.ws.rs to V3.x for Java compile version
1 parent 2570704 commit 35844db

File tree

20 files changed

+66
-160
lines changed

20 files changed

+66
-160
lines changed

.github/workflows/actions.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ jobs:
1010
os: [windows-latest, ubuntu-latest]
1111
steps:
1212
- name: Checkout
13-
uses: actions/checkout@v2
13+
uses: actions/checkout@v4
1414
- name: Set up JDK ${{ matrix.java_version }}
15-
uses: actions/setup-java@v2
15+
uses: actions/setup-java@v4
1616
with:
1717
java-version: ${{ matrix.java_version }}
1818
distribution: 'adopt'
@@ -48,7 +48,7 @@ jobs:
4848
./mvnw clean -e --debug --file pom.xml --log-file maven.log
4949
./mvnw test -e --debug --file pom.xml --log-file maven.log
5050
- name: Archive logs
51-
uses: actions/upload-artifact@v3
51+
uses: actions/upload-artifact@v4
5252
if: always()
5353
with:
5454
name: execution-logs-${{ matrix.java_version }}-${{ matrix.os }}

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ $ docker build -t openas2:latest .
8888
```
8989

9090
Run the OpenAS2 server, with its network set to "host", so that the WebUI can access the server.
91+
NOTE: Some users have reported that using --net=host does not work for them and removing it solves the problem..
9192

9293
```console
9394
$ docker run -it --rm --net=host -p 4080:10080 -p 4081:10081 -p 8443:8080 -v ${PWD}/config:/opt/openas2/config -v ${PWD}/data:/opt/openas2/data openas2:latest

RELEASE-NOTES.md

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,29 @@
11
# OpenAS2 Server
2-
# Version 3.11.0
2+
# Version 3.12.0
33
# RELEASE NOTES
44
-----
5-
The OpenAS2 project is pleased to announce the release of OpenAS2 3.11.0
5+
The OpenAS2 project is pleased to announce the release of OpenAS2 3.12.0
66

7-
The release download file is: OpenAS2Server-3.11.0.zip
7+
The release download file is: OpenAS2Server-3.12.0.zip
88

99
The zip file contains a PDF document (OpenAS2HowTo.pdf) providing information on installing and using the application.
1010
## NOTE: Testing covers Java 8 to 17. See Java Compatibility section of the OpenAS2 documentation for using Java 8.
1111

12-
Version 3.11.0 - 2024-08-22
13-
This is a minor bugfix release:
12+
Version 3.12.0 - 2024-10-15
13+
This is a minor enhancement and bugfix release:
1414
**IMPORTANT NOTE**: Please review upgrade notes below if you are upgrading
1515

16-
1. Enhance the handling of MDN processing and asociated resend handling to provide moer reliable error handling.
17-
2. Enhance the Disposition-Notification-Options handler to properly support the standard.
18-
3. Use the LTS releases of Java for testing
19-
4. Use a SQL-92 compliant SQL format for accessing the database.
16+
1. Change the property name in config.xml from javax.mail.properties to jakarta.mail.properties
17+
2.
2018

2119
##Upgrade Notes
2220
See the openAS2HowTo appendix for the general process on upgrading OpenAS2.
2321

22+
### Upgrading to 3.12 or newer any older version:
23+
1. The property in the config.xml changed:
24+
Change ALL occurrences of javax.mail.properties to jakarta.mail.properties in config.xml and the .properties file if you implemented it.
25+
2. Completely replace all library files in the existing "lib" folder wit hthe ones supplied in the new install package (per recommended standard procedure in the user guide).
26+
2427
### Upgrading to 3.6 or newer from 3.5 (or older) version:
2528
1. Run the following command after the upgrade of the code base is complete and BEFORE you start the OpenAS2 server:
2629
- Open a shell (Command prompt or Powershell in Windows or a Terminal window in NIX systems)

Server/pom.xml

Lines changed: 20 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -204,40 +204,6 @@
204204
<groupId>org.apache.httpcomponents</groupId>
205205
<artifactId>httpclient</artifactId>
206206
</dependency>
207-
<dependency>
208-
<groupId>com.google.code.findbugs</groupId>
209-
<artifactId>findbugs</artifactId>
210-
<exclusions>
211-
<exclusion>
212-
<groupId>xml-apis</groupId>
213-
<artifactId>xml-apis</artifactId>
214-
</exclusion>
215-
<exclusion>
216-
<groupId>jaxen</groupId>
217-
<artifactId>jaxen</artifactId>
218-
</exclusion>
219-
</exclusions>
220-
</dependency>
221-
<dependency>
222-
<groupId>org.junit.jupiter</groupId>
223-
<artifactId>junit-jupiter</artifactId>
224-
<scope>test</scope>
225-
</dependency>
226-
<dependency>
227-
<groupId>org.hamcrest</groupId>
228-
<artifactId>hamcrest</artifactId>
229-
<scope>test</scope>
230-
</dependency>
231-
<dependency>
232-
<groupId>org.mockito</groupId>
233-
<artifactId>mockito-core</artifactId>
234-
<scope>test</scope>
235-
</dependency>
236-
<dependency>
237-
<groupId>org.mockito</groupId>
238-
<artifactId>mockito-junit-jupiter</artifactId>
239-
<scope>test</scope>
240-
</dependency>
241207
<dependency>
242208
<groupId>commons-io</groupId>
243209
<artifactId>commons-io</artifactId>
@@ -274,29 +240,33 @@
274240
<groupId>jakarta.xml.bind</groupId>
275241
<artifactId>jakarta.xml.bind-api</artifactId>
276242
</dependency>
277-
<dependency>
278-
<groupId>com.sun.xml.bind</groupId>
279-
<artifactId>jaxb-core</artifactId>
243+
<dependency>
244+
<groupId>jakarta.ws.rs</groupId>
245+
<artifactId>jakarta.ws.rs-api</artifactId>
246+
</dependency>
247+
<dependency>
248+
<groupId>jakarta.annotation</groupId>
249+
<artifactId>jakarta.annotation-api</artifactId>
280250
</dependency>
281251
<dependency>
282-
<groupId>com.sun.xml.bind</groupId>
283-
<artifactId>jaxb-impl</artifactId>
252+
<groupId>org.junit.jupiter</groupId>
253+
<artifactId>junit-jupiter</artifactId>
254+
<scope>test</scope>
284255
</dependency>
285-
<!--
286256
<dependency>
287-
<groupId>jakarta.activation</groupId>
288-
<artifactId>activation</artifactId>
257+
<groupId>org.hamcrest</groupId>
258+
<artifactId>hamcrest</artifactId>
259+
<scope>test</scope>
289260
</dependency>
290-
-->
291-
<!-- https://mvnrepository.com/artifact/javax.ws.rs/javax.ws.rs-api -->
292261
<dependency>
293-
<groupId>javax.ws.rs</groupId>
294-
<artifactId>javax.ws.rs-api</artifactId>
262+
<groupId>org.mockito</groupId>
263+
<artifactId>mockito-junit-jupiter</artifactId>
264+
<scope>test</scope>
295265
</dependency>
296-
<!-- https://mvnrepository.com/artifact/javax.annotation/javax.annotation-api -->
297-
<dependency>
298-
<groupId>javax.annotation</groupId>
299-
<artifactId>javax.annotation-api</artifactId>
266+
<dependency>
267+
<groupId>org.mockito</groupId>
268+
<artifactId>mockito-core</artifactId>
269+
<scope>test</scope>
300270
</dependency>
301271
</dependencies>
302272
</project>

Server/src/config/config.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
ssl_keystore="%home%/ssl_certs.jks"
5151
ssl_keystore_password="testas2"
5252
partnership_file="%home%/partnerships.xml"
53-
javax.mail.properties.file="%home%/java.mail.properties"
53+
jakarta.mail.properties.file="%home%/java.mail.properties"
5454
email.from="Open AS2 Server&lt;[email protected]&gt;"
5555
email.to="your email address"
5656
email.smtpserver="mail.openas2.org"
@@ -97,7 +97,7 @@
9797
enabled="$properties.email.logger.enabled$"
9898
only_active_msg_transfer_errors="$properties.email.logger.only_active_msg_transfer_errors$"
9999
log_exception_trace="properties.email.logger.log_exception_trace$"
100-
javax.mail.properties.file="$properties.javax.mail.properties.file$"
100+
jakarta.mail.properties.file="$properties.jakarta.mail.properties.file$"
101101
from="$properties.email.from$"
102102
to="$properties.email.to$"
103103
smtpserver="$properties.email.smtpserver$"

Server/src/main/java/org/openas2/app/OpenAS2Server.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import org.openas2.XMLSession;
88
import org.openas2.lib.helper.ICryptoHelper;
99

10-
import javax.annotation.Nonnull;
10+
import jakarta.annotation.Nonnull;
1111
import javax.crypto.Cipher;
1212
import java.io.File;
1313
import java.io.IOException;

Server/src/main/java/org/openas2/cmd/processor/BaseCommandProcessor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import org.openas2.cmd.CommandRegistry;
99
import org.openas2.schedule.HasSchedule;
1010

11-
import javax.annotation.Nullable;
11+
import jakarta.annotation.Nullable;
1212
import java.util.ArrayList;
1313
import java.util.List;
1414
import java.util.Map;

Server/src/main/java/org/openas2/cmd/processor/restapi/ApiResource.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
import org.openas2.cmd.CommandResult;
1212
import org.openas2.cmd.processor.RestCommandProcessor;
1313

14-
import javax.annotation.security.RolesAllowed;
14+
import jakarta.annotation.security.RolesAllowed;
1515
import jakarta.ws.rs.Consumes;
1616

1717
import jakarta.ws.rs.DefaultValue;

Server/src/main/java/org/openas2/lib/CryptoException.java

Lines changed: 0 additions & 24 deletions
This file was deleted.

Server/src/main/java/org/openas2/lib/MDNException.java

Lines changed: 0 additions & 24 deletions
This file was deleted.

0 commit comments

Comments
 (0)