Create jakartified package on build (#636)

* feat(servlet): create jakartified package on build

* feat(servlet): update README to include Jakarta classifier
This commit is contained in:
Oleh Astappiev 2021-12-14 20:25:02 +02:00 committed by GitHub
parent 584b1d9b21
commit 529c59f93f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 40 additions and 0 deletions

View File

@ -288,6 +288,16 @@ To depend on the JPEG and TIFF plugin using Maven, add the following to your POM
<artifactId>servlet</artifactId> <artifactId>servlet</artifactId>
<version>3.8.0</version> <version>3.8.0</version>
</dependency> </dependency>
<!--
Or Jakarta version, for Servlet API 5.0
-->
<dependency>
<groupId>com.twelvemonkeys.servlet</groupId>
<artifactId>servlet</artifactId>
<version>3.7.0</version>
<classifier>jakarta</classifier>
</dependency>
</dependencies> </dependencies>
``` ```

View File

@ -107,6 +107,36 @@
</archive> </archive>
</configuration> </configuration>
</plugin> </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.2</version>
<executions>
<execution>
<id>jakarta</id>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<finalName>twelvemonkeys-${project.artifactId}-${project.version}-jakarta</finalName>
<shadedArtifactAttached>true</shadedArtifactAttached>
<createDependencyReducedPom>false</createDependencyReducedPom>
<artifactSet>
<includes>
<include>${project.groupId}:${project.artifactId}</include>
</includes>
</artifactSet>
<relocations>
<relocation>
<pattern>javax.servlet</pattern>
<shadedPattern>jakarta.servlet</shadedPattern>
</relocation>
</relocations>
</configuration>
</execution>
</executions>
</plugin>
</plugins> </plugins>
</build> </build>