Skip to content

Commit

Permalink
Switch from javax.json to jakarta.json
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanseifert committed Nov 8, 2023
1 parent ad7e499 commit 777bd2c
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 21 deletions.
6 changes: 6 additions & 0 deletions changes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@
xsi:schemaLocation="http://maven.apache.org/changes/1.0.0 http://maven.apache.org/plugins/maven-changes-plugin/xsd/changes-1.0.0.xsd">
<body>

<release version="1.3.2" date="not released">
<action type="add" dev="sseifert">
Switch from javax.json to jakarta.json.
</action>
</release>

<release version="1.3.0" date="2023-01-26">
<action type="add" dev="sseifert" issue="9">
Introduce new output format JSON_PROPERTIES: Flat list of key/value pairs in JSON format.
Expand Down
12 changes: 9 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,15 @@
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-json_1.1_spec</artifactId>
<version>1.5</version>
<groupId>jakarta.json</groupId>
<artifactId>jakarta.json-api</artifactId>
<version>2.1.3</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>jakarta.json.bind</groupId>
<artifactId>jakarta.json.bind-api</artifactId>
<version>3.0.0</version>
<scope>compile</scope>
</dependency>
<dependency>
Expand Down
16 changes: 8 additions & 8 deletions src/main/java/io/wcm/maven/plugins/i18n/JsonUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@
import java.io.StringWriter;
import java.util.Map;

import javax.json.Json;
import javax.json.JsonObject;
import javax.json.JsonReader;
import javax.json.JsonReaderFactory;
import javax.json.JsonWriter;
import javax.json.JsonWriterFactory;
import javax.json.stream.JsonGenerator;
import javax.json.stream.JsonParsingException;
import jakarta.json.Json;
import jakarta.json.JsonObject;
import jakarta.json.JsonReader;
import jakarta.json.JsonReaderFactory;
import jakarta.json.JsonWriter;
import jakarta.json.JsonWriterFactory;
import jakarta.json.stream.JsonGenerator;
import jakarta.json.stream.JsonParsingException;

/**
* Helper methods for JSON handling.
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/io/wcm/maven/plugins/i18n/SlingI18nMap.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,17 @@
import java.util.SortedMap;
import java.util.TreeMap;

import javax.json.Json;
import javax.json.JsonObject;
import javax.json.JsonObjectBuilder;

import org.apache.commons.lang3.StringUtils;
import org.jdom2.Document;
import org.jdom2.Element;
import org.jdom2.Namespace;
import org.jdom2.output.Format;
import org.jdom2.output.XMLOutputter;

import jakarta.json.Json;
import jakarta.json.JsonObject;
import jakarta.json.JsonObjectBuilder;

/**
* Helper class integrating i18n JSON generation into a sorted map.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,11 @@
import java.util.HashMap;
import java.util.Map;

import javax.json.JsonObject;
import javax.json.JsonValue;

import org.apache.commons.io.IOUtils;

import io.wcm.maven.plugins.i18n.JsonUtil;
import jakarta.json.JsonObject;
import jakarta.json.JsonValue;

/**
* Reads i18n resources from JSON files.
Expand Down
5 changes: 2 additions & 3 deletions src/test/java/io/wcm/maven/plugins/i18n/JsonUtilTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,11 @@

import java.io.IOException;

import javax.json.Json;
import javax.json.JsonObject;

import org.junit.jupiter.api.Test;
import org.skyscreamer.jsonassert.JSONAssert;

import jakarta.json.Json;
import jakarta.json.JsonObject;

class JsonUtilTest {

Expand Down

0 comments on commit 777bd2c

Please sign in to comment.