Skip to content

Instantly share code, notes, and snippets.

@johnmay
Created July 13, 2023 14:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save johnmay/cc1d246ee1708465d7fca22180145913 to your computer and use it in GitHub Desktop.
Save johnmay/cc1d246ee1708465d7fca22180145913 to your computer and use it in GitHub Desktop.
JavaEE/Jakarta Maven Cross-Compile
<plugin>
<groupId>com.google.code.maven-replacer-plugin</groupId>
<artifactId>replacer</artifactId>
<version>1.5.3</version>
<executions>
<execution>
<id>JavaEE to Jakarta</id>
<phase>generate-sources</phase>
<goals>
<goal>replace</goal>
</goals>
<configuration>
<includes>
<include>${basedir}/src/main/java/com/nextmovesoftware/arthor/core/Configuration.java</include>
<include>${basedir}/src/main/java/com/nextmovesoftware/arthor/api/dt/DataTablesController.java</include>
</includes>
<replacements>
<replacement>
<token>javax.annotation.</token>
<value>jakarta.annotation.</value>
</replacement>
<replacement>
<token>javax.servlet.</token>
<value>jakarta.servlet.</value>
</replacement>
</replacements>
</configuration>
</execution>
<execution>
<id>Jakarta to JavaEE</id>
<phase>package</phase>
<goals>
<goal>replace</goal>
</goals>
<configuration>
<includes>
<include>${basedir}/src/main/java/com/nextmovesoftware/arthor/core/Configuration.java</include>
<include>${basedir}/src/main/java/com/nextmovesoftware/arthor/api/dt/DataTablesController.java</include>
</includes>
<replacements>
<replacement>
<token>jakarta.annotation.</token>
<value>javax.annotation.</value>
</replacement>
<replacement>
<token>jakarta.servlet.</token>
<value>javax.servlet.</value>
</replacement>
</replacements>
</configuration>
</execution>
</executions>
</plugin>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment