Skip to content

Commit

Permalink
Merge pull request #116 from GedMarc/2.12
Browse files Browse the repository at this point in the history
Jakarta Namespace Support
  • Loading branch information
cowtowncoder committed Nov 14, 2020
2 parents 362494a + db8563f commit 0cf136c
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 1 deletion.
12 changes: 12 additions & 0 deletions README.md
Expand Up @@ -27,6 +27,18 @@ licensed as per:

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


## Using Jakarta
* Jakarta can be referenced for the JAXB module by using the classifier "jakarta" in your dependency
```
<dependency>
<groupId>com.fasterxml.jackson.jaxrs</groupId>
<artifactId>jackson-module-jaxb-annotations</artifactId>
<classifier>jakarta</classifier>
</dependency>
```


## Status

[![Build Status](https://travis-ci.org/FasterXML/jackson-modules-base.svg)](https://travis-ci.org/FasterXML/jackson-modules-base)
Expand Down
38 changes: 38 additions & 0 deletions jaxb/pom.xml
Expand Up @@ -97,6 +97,44 @@ data-binding.
<plugin>
<groupId>org.moditect</groupId>
<artifactId>moditect-maven-plugin</artifactId>
<inherited>true</inherited>
<configuration>
<jvmVersion>11</jvmVersion>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<executions>
<execution>
<id>jakarta</id>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<shadedArtifactAttached>true</shadedArtifactAttached>
<shadedClassifierName>jakarta</shadedClassifierName>
<createDependencyReducedPom>false</createDependencyReducedPom>
<artifactSet>
<includes>
<include>${project.groupId}:${project.artifactId}</include>
</includes>
</artifactSet>
<relocations>
<relocation>
<pattern>javax.xml.bind</pattern>
<shadedPattern>jakarta.xml.bind</shadedPattern>
</relocation>
<relocation>
<pattern>javax.activation</pattern>
<shadedPattern>jakarta.activation</shadedPattern>
</relocation>
</relocations>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
Expand Down
3 changes: 2 additions & 1 deletion jaxb/src/moditect/module-info.java
@@ -1,7 +1,8 @@
module com.fasterxml.jackson.module.jaxb {
requires java.logging;
requires java.xml;
requires java.xml.bind;
requires static java.xml.bind;
requires static jakarta.xml.bind;

// Needed for JDK9+, but optionally only
requires static java.activation;
Expand Down

0 comments on commit 0cf136c

Please sign in to comment.