Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jakarta Namespace Updates and Artifact Build #130

Merged
merged 6 commits into from
Nov 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 10 additions & 0 deletions README.md
Expand Up @@ -83,9 +83,19 @@ In addition there are format-specific annotations that may be used:
```
requires javax.ws.rs.api; //Older libraries
requires java.ws.rs; //Newer libraries
requires jakarta.ws.rs; //Reserved name for Jakarta API
requires jakarta.ws.rs.api; //Reserved name for Jakarta Impl
```

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

## Other

Expand Down
38 changes: 38 additions & 0 deletions base/pom.xml
Expand Up @@ -50,7 +50,45 @@ ${project.groupId}.annotation.*;version=${project.version}
<plugin>
<groupId>org.moditect</groupId>
<artifactId>moditect-maven-plugin</artifactId>
<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.ws.rs</pattern>
<shadedPattern>jakarta.ws.rs</shadedPattern>
</relocation>
</relocations>
</configuration>
</execution>
</executions>
</plugin>

</plugins>
</build>
</project>
38 changes: 38 additions & 0 deletions datatypes/pom.xml
Expand Up @@ -75,7 +75,45 @@
<plugin>
<groupId>org.moditect</groupId>
<artifactId>moditect-maven-plugin</artifactId>
<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.ws.rs</pattern>
<shadedPattern>jakarta.ws.rs</shadedPattern>
</relocation>
</relocations>
</configuration>
</execution>
</executions>
</plugin>

</plugins>
</build>
</project>
37 changes: 37 additions & 0 deletions json/pom.xml
Expand Up @@ -110,6 +110,43 @@
<plugin>
<groupId>org.moditect</groupId>
<artifactId>moditect-maven-plugin</artifactId>
<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.ws.rs</pattern>
<shadedPattern>jakarta.ws.rs</shadedPattern>
</relocation>
</relocations>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
Expand Down
7 changes: 7 additions & 0 deletions json/src/moditect/module-info.java
Expand Up @@ -27,4 +27,11 @@
com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider;
provides javax.ws.rs.ext.MessageBodyWriter with
com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider;

//gedmarc - move to custom for jakarta shade
/*
provides jakarta.ws.rs.ext.MessageBodyReader with
com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider;
provides jakarta.ws.rs.ext.MessageBodyWriter with
com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider;*/
}