Skip to content

Commit 0cf136c

Browse files
authored
Merge pull request #116 from GedMarc/2.12
Jakarta Namespace Support
2 parents 362494a + db8563f commit 0cf136c

File tree

3 files changed

+52
-1
lines changed

3 files changed

+52
-1
lines changed

README.md

+12
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,18 @@ licensed as per:
2727

2828
whereas 3.0 will use [ByteBuddy](https://github.com/raphw/byte-buddy) (licensed as per https://github.com/raphw/byte-buddy/blob/master/LICENSE)
2929

30+
31+
## Using Jakarta
32+
* Jakarta can be referenced for the JAXB module by using the classifier "jakarta" in your dependency
33+
```
34+
<dependency>
35+
<groupId>com.fasterxml.jackson.jaxrs</groupId>
36+
<artifactId>jackson-module-jaxb-annotations</artifactId>
37+
<classifier>jakarta</classifier>
38+
</dependency>
39+
```
40+
41+
3042
## Status
3143

3244
[![Build Status](https://travis-ci.org/FasterXML/jackson-modules-base.svg)](https://travis-ci.org/FasterXML/jackson-modules-base)

jaxb/pom.xml

+38
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,44 @@ data-binding.
9797
<plugin>
9898
<groupId>org.moditect</groupId>
9999
<artifactId>moditect-maven-plugin</artifactId>
100+
<inherited>true</inherited>
101+
<configuration>
102+
<jvmVersion>11</jvmVersion>
103+
</configuration>
104+
</plugin>
105+
106+
<plugin>
107+
<groupId>org.apache.maven.plugins</groupId>
108+
<artifactId>maven-shade-plugin</artifactId>
109+
<executions>
110+
<execution>
111+
<id>jakarta</id>
112+
<phase>package</phase>
113+
<goals>
114+
<goal>shade</goal>
115+
</goals>
116+
<configuration>
117+
<shadedArtifactAttached>true</shadedArtifactAttached>
118+
<shadedClassifierName>jakarta</shadedClassifierName>
119+
<createDependencyReducedPom>false</createDependencyReducedPom>
120+
<artifactSet>
121+
<includes>
122+
<include>${project.groupId}:${project.artifactId}</include>
123+
</includes>
124+
</artifactSet>
125+
<relocations>
126+
<relocation>
127+
<pattern>javax.xml.bind</pattern>
128+
<shadedPattern>jakarta.xml.bind</shadedPattern>
129+
</relocation>
130+
<relocation>
131+
<pattern>javax.activation</pattern>
132+
<shadedPattern>jakarta.activation</shadedPattern>
133+
</relocation>
134+
</relocations>
135+
</configuration>
136+
</execution>
137+
</executions>
100138
</plugin>
101139
</plugins>
102140
</build>

jaxb/src/moditect/module-info.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
module com.fasterxml.jackson.module.jaxb {
22
requires java.logging;
33
requires java.xml;
4-
requires java.xml.bind;
4+
requires static java.xml.bind;
5+
requires static jakarta.xml.bind;
56

67
// Needed for JDK9+, but optionally only
78
requires static java.activation;

0 commit comments

Comments
 (0)