[Git][java-team/tomcat-jakartaee-migration][master] 3 commits: New upstream version 1.0.9
Emmanuel Bourg (@ebourg)
gitlab at salsa.debian.org
Mon Mar 3 12:00:48 GMT 2025
Emmanuel Bourg pushed to branch master at Debian Java Maintainers / tomcat-jakartaee-migration
Commits:
6c4c649a by Emmanuel Bourg at 2025-03-03T12:37:33+01:00
New upstream version 1.0.9
- - - - -
78bfed79 by Emmanuel Bourg at 2025-03-03T12:37:33+01:00
Update upstream source from tag 'upstream/1.0.9'
Update to upstream version '1.0.9'
with Debian dir dff492699e42f71cc9a4b6aac1c48617ecc4113e
- - - - -
684ebeba by Emmanuel Bourg at 2025-03-03T12:38:47+01:00
New upstream release (1.0.9)
- - - - -
12 changed files:
- + .github/dependabot.yml
- .github/workflows/ci.yml
- CHANGES.md
- NOTICE.txt
- README.md
- debian/changelog
- pom.xml
- src/main/java/org/apache/tomcat/jakartaee/EESpecProfiles.java
- src/main/java/org/apache/tomcat/jakartaee/Migration.java
- src/main/resources/org/apache/tomcat/jakartaee/LocalStrings.properties
- src/test/java/org/apache/tomcat/jakartaee/EESpecProfileTest.java
- src/test/resources/HelloServlet.java
Changes:
=====================================
.github/dependabot.yml
=====================================
@@ -0,0 +1,11 @@
+# To get started with Dependabot version updates, you'll need to specify which
+# package ecosystems to update and where the package manifests are located.
+# Please see the documentation for all configuration options:
+# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
+
+version: 2
+updates:
+ - package-ecosystem: "maven"
+ directory: "/" # Location of package manifests
+ schedule:
+ interval: "weekly"
=====================================
.github/workflows/ci.yml
=====================================
@@ -56,7 +56,7 @@ jobs:
continue-on-error:
true
- name: Upload logs
- uses: actions/upload-artifact at v2
+ uses: actions/upload-artifact at v4
with:
name: JDK${{ matrix.java }}-${{ matrix.os }}-logs
path: output/build/logs/TEST*.txt
=====================================
CHANGES.md
=====================================
@@ -1,5 +1,16 @@
# Tomcat Migration Tool for Jakarta EE - Changelog
+## 1.0.9
+- Update the JaCoCo Maven plugin to 0.8.12. (dependabot/markt)
+- Update Commons BCEL to 6.10.0. (dependabot/markt)
+- Update Commons Compress to 1.27.1. (dependabot/markt)
+- Update Commons IO to 2.18.0. (dependabot/markt)
+- Update Ant to 1.10.15. (dependabot/markt)
+- Fix issue that `matchExcludesAgainstPathName` didn't work for files. Part of PR[#60](https://github.com/apache/tomcat-jakartaee-migration/pull/42) provided by Semiao Marco. (markt)
+- Update ASF parent POM to 33. (markt)
+- Added a new profile, `SERVLET` that only migrates the `javax.servlet` package and sub-packages. PR[#57](https://github.com/apache/tomcat-jakartaee-migration/pull/57) provided by Ralf Wiebicke. (markt)
+
+
## 1.0.8
- Include `.ear` files in list of recognised archives. PR[#50](https://github.com/apache/tomcat-jakartaee-migration/pull/50) provided by Sammy Chu. (markt)
- Update Commons BCEL to 6.8.1. (markt)
@@ -12,7 +23,7 @@
## 1.0.7
- When converting directories, rename files according to the chosen profile. (fschumacher)
-- Add configuration option, `matchExcludesAgainstPathName` that can be used to configure exclusions base don path name rather than just file name. PR[#38](https://github.com/apache/tomcat-jakartaee-migration/pull/38) provided by Réda Housni Alaoui. (markt)
+- Add configuration option, `matchExcludesAgainstPathName` that can be used to configure exclusions based on path name rather than just file name. PR[#38](https://github.com/apache/tomcat-jakartaee-migration/pull/38) provided by Réda Housni Alaoui. (markt)
- Update OSGI servlet specification versions if present in manifest file. PR[#42](https://github.com/apache/tomcat-jakartaee-migration/pull/42) provided by Ivan Furnadjiev. (markt)
- Update Commons BCEL to 6.7.0. (markt)
- Update Commons Compress to 1.23.0. (markt)
=====================================
NOTICE.txt
=====================================
@@ -1,5 +1,5 @@
Apache Tomcat migration tool for Jakarta EE
-Copyright 2020-2024 The Apache Software Foundation
+Copyright 2020-2025 The Apache Software Foundation
This product includes software developed at
The Apache Software Foundation (https://www.apache.org/).
\ No newline at end of file
=====================================
README.md
=====================================
@@ -45,9 +45,8 @@ the same type as the source.
>
> A warning will be logged for each JAR file where the signature has been removed.
-This tool is also available on Debian and Ubuntu systems by installing the
-[tomcat-jakartaee-migration](https://tracker.debian.org/tomcat-jakartaee-migration)
-package and invoking the `javax2jakarta` command.
+This tool is also available on [Debian, Ubuntu](https://tracker.debian.org/tomcat-jakartaee-migration) and [Fedora](https://packages.fedoraproject.org/pkgs/tomcat-jakartaee-migration/tomcat-jakartaee-migration/) systems by installing the
+*tomcat-jakartaee-migration* package and invoking the `javax2jakarta` command.
## Ant task
@@ -81,4 +80,4 @@ This tool modifies web application content as described in the previous section.
This may include modification of third-party provided content. It is strongly
recommended that you confirm that the license(s) associated with any third-party
content permit such modifications, especially if you intend to distribute the
-result.
\ No newline at end of file
+result.
=====================================
debian/changelog
=====================================
@@ -1,3 +1,9 @@
+tomcat-jakartaee-migration (1.0.9-1) unstable; urgency=medium
+
+ * New upstream release
+
+ -- Emmanuel Bourg <ebourg at apache.org> Mon, 03 Mar 2025 12:38:36 +0100
+
tomcat-jakartaee-migration (1.0.8-1) unstable; urgency=medium
* New upstream release
=====================================
pom.xml
=====================================
@@ -21,12 +21,12 @@
<parent>
<groupId>org.apache</groupId>
<artifactId>apache</artifactId>
- <version>31</version>
+ <version>33</version>
</parent>
<groupId>org.apache.tomcat</groupId>
<artifactId>jakartaee-migration</artifactId>
- <version>1.0.8</version>
+ <version>1.0.9</version>
<name>Apache Tomcat Migration Tool for Jakarta EE</name>
<description>The aim of the tool is to take a web application written for Java EE 8 that
@@ -62,7 +62,7 @@
<scm>
<connection>scm:git:https://gitbox.apache.org/repos/asf/tomcat-jakartaee-migration.git</connection>
<developerConnection>scm:git:https://gitbox.apache.org/repos/asf/tomcat-jakartaee-migration.git</developerConnection>
- <tag>1.0.8</tag>
+ <tag>1.0.9</tag>
<url>https://gitbox.apache.org/repos/asf?p=tomcat-jakartaee-migration.git</url>
</scm>
@@ -77,22 +77,22 @@
<dependency>
<groupId>org.apache.bcel</groupId>
<artifactId>bcel</artifactId>
- <version>6.8.1</version>
+ <version>6.10.0</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-compress</artifactId>
- <version>1.25.0</version>
+ <version>1.27.1</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
- <version>2.15.1</version>
+ <version>2.18.0</version>
</dependency>
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant</artifactId>
- <version>1.10.14</version>
+ <version>1.10.15</version>
<scope>provided</scope>
</dependency>
@@ -301,7 +301,7 @@
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
- <version>0.8.8</version>
+ <version>0.8.12</version>
<executions>
<execution>
<goals>
=====================================
src/main/java/org/apache/tomcat/jakartaee/EESpecProfiles.java
=====================================
@@ -25,6 +25,12 @@ import java.util.regex.Pattern;
*/
public enum EESpecProfiles implements EESpecProfile {
+ /**
+ * Specification profile matching the Jakarta Servlet API only.
+ */
+ SERVLET("javax", "jakarta",
+ "javax([/\\.](servlet))"),
+
/**
* Specification profile matching the packages provided with Tomcat.
*/
=====================================
src/main/java/org/apache/tomcat/jakartaee/Migration.java
=====================================
@@ -283,13 +283,13 @@ public class Migration {
if (!inplace) {
try (InputStream is = new FileInputStream(src);
OutputStream os = new FileOutputStream(dest)) {
- migrateStream(src.getName(), is, os);
+ migrateStream(src.getAbsolutePath(), is, os);
}
} else {
ByteArrayOutputStream buffer = new ByteArrayOutputStream((int) (src.length() * 1.05));
try (InputStream is = new FileInputStream(src)) {
- migrateStream(src.getName(), is, buffer);
+ migrateStream(src.getAbsolutePath(), is, buffer);
}
try (OutputStream os = new FileOutputStream(dest)) {
@@ -353,7 +353,7 @@ public class Migration {
// Create the destination in memory
SeekableInMemoryByteChannel destByteChannel = new SeekableInMemoryByteChannel();
- try (ZipFile srcZipFile = new ZipFile(srcByteChannel);
+ try (ZipFile srcZipFile = ZipFile.builder().setSeekableByteChannel(srcByteChannel).get();
ZipArchiveOutputStream destZipStream = new ZipArchiveOutputStream(destByteChannel)) {
Enumeration<ZipArchiveEntry> entries = srcZipFile.getEntries();
while (entries.hasMoreElements()) {
=====================================
src/main/resources/org/apache/tomcat/jakartaee/LocalStrings.properties
=====================================
@@ -40,6 +40,7 @@ where options includes:\n\
\ -profile=<profile name>\n\
\ TOMCAT (default) to convert Java EE APIs provided by Tomcat\n\
\ EE to convert all Java EE APIs\n\
+\ SERVLET to convert the Jakarta Servlet API only\n\
\ JEE8 to convert back to old Java EE8 APIs. Note that the\n\
\ resulting classes will not work if the classes to be\n\
\ migrated use any APIs added in Jakarta EE 10 onwards.\n\
=====================================
src/test/java/org/apache/tomcat/jakartaee/EESpecProfileTest.java
=====================================
@@ -23,6 +23,66 @@ import static org.junit.Assert.*;
public class EESpecProfileTest {
+ @Test
+ public void testProfileServlet() {
+ EESpecProfile profile = EESpecProfiles.SERVLET;
+
+ assertEquals("javax.annotation.PostConstruct", profile.convert("javax.annotation.PostConstruct"));
+ assertEquals("javax.annotation.security.DeclareRoles", profile.convert("javax.annotation.security.DeclareRoles"));
+ assertEquals("javax.ejb", profile.convert("javax.ejb"));
+ assertEquals("javax.el", profile.convert("javax.el"));
+ assertEquals("javax.mail", profile.convert("javax.mail"));
+ assertEquals("javax.persistence", profile.convert("javax.persistence"));
+ assertEquals("javax.security.auth.message", profile.convert("javax.security.auth.message"));
+ assertEquals("jakarta.servlet", profile.convert("javax.servlet"));
+ assertEquals("javax.transaction", profile.convert("javax.transaction"));
+ assertEquals("javax.websocket", profile.convert("javax.websocket"));
+
+ // not converted EE packages
+ assertEquals("javax.activation", profile.convert("javax.activation"));
+ assertEquals("javax.batch", profile.convert("javax.batch"));
+ assertEquals("javax.decorator", profile.convert("javax.decorator"));
+ assertEquals("javax.enterprise", profile.convert("javax.enterprise"));
+ assertEquals("javax.faces", profile.convert("javax.faces"));
+ assertEquals("javax.jms", profile.convert("javax.jms"));
+ assertEquals("javax.json", profile.convert("javax.json"));
+ assertEquals("javax.jws", profile.convert("javax.jws"));
+ assertEquals("javax.interceptor", profile.convert("javax.interceptor"));
+ assertEquals("javax.inject", profile.convert("javax.inject"));
+ assertEquals("javax.management.j2ee", profile.convert("javax.management.j2ee"));
+ assertEquals("javax.resource", profile.convert("javax.resource"));
+ assertEquals("javax.security.enterprise", profile.convert("javax.security.enterprise"));
+ assertEquals("javax.security.jacc", profile.convert("javax.security.jacc"));
+ assertEquals("javax.validation", profile.convert("javax.validation"));
+ assertEquals("javax.ws.rs", profile.convert("javax.ws.rs"));
+ assertEquals("javax.xml.bind", profile.convert("javax.xml.bind"));
+ assertEquals("javax.xml.rpc", profile.convert("javax.xml.rpc"));
+ assertEquals("javax.xml.registry", profile.convert("javax.xml.registry"));
+ assertEquals("javax.xml.soap", profile.convert("javax.xml.soap"));
+ assertEquals("javax.xml.ws", profile.convert("javax.xml.ws"));
+
+ // non EE javax packages
+ assertEquals("javax.annotation", profile.convert("javax.annotation"));
+ assertEquals("javax.management", profile.convert("javax.management"));
+ assertEquals("javax.security", profile.convert("javax.security"));
+ assertEquals("javax.security.auth", profile.convert("javax.security.auth"));
+ assertEquals("javax.swing", profile.convert("javax.swing"));
+ assertEquals("javax.transaction.xa", profile.convert("javax.transaction.xa"));
+ assertEquals("javax.xml.stream", profile.convert("javax.xml.stream"));
+ assertEquals("javax.xml.namespace", profile.convert("javax.xml.namespace"));
+ assertEquals("javax.xml.xpath.XPathConstants", profile.convert("javax.xml.xpath.XPathConstants"));
+ assertEquals("javax.xml.XMLConstants", profile.convert("javax.xml.XMLConstants"));
+
+ // Findbugs JSR-305 packages and classes
+ assertEquals("javax.annotation.concurrent", profile.convert("javax.annotation.concurrent"));
+ assertEquals("javax.annotation.meta", profile.convert("javax.annotation.meta"));
+ assertEquals("javax.annotation.PropertyKey", profile.convert("javax.annotation.PropertyKey"));
+
+ // Annotation classes that overlap between earlier and later annotations implementations
+ assertEquals("javax.annotation.Nonnull", profile.convert("javax.annotation.Nonnull"));
+ assertEquals("javax.annotation.Nullable", profile.convert("javax.annotation.Nullable"));
+ }
+
@Test
public void testProfileTomcat() {
EESpecProfile profile = EESpecProfiles.TOMCAT;
=====================================
src/test/resources/HelloServlet.java
=====================================
@@ -23,6 +23,9 @@ import javax.servlet.GenericServlet;
public class HelloServlet extends GenericServlet {
+ private static final long serialVersionUID = 1L;
+
+ @Override
public void service(ServletRequest request, ServletResponse response) throws IOException, ServletException {
response.setContentType("text/plain");
response.getWriter().print("Hello JakartaEE!");
View it on GitLab: https://salsa.debian.org/java-team/tomcat-jakartaee-migration/-/compare/9809afe90c3a00ab75aca43e4477d97a5f497a27...684ebeba60b89fa39986acac67004cc584b1c74d
--
View it on GitLab: https://salsa.debian.org/java-team/tomcat-jakartaee-migration/-/compare/9809afe90c3a00ab75aca43e4477d97a5f497a27...684ebeba60b89fa39986acac67004cc584b1c74d
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-commits/attachments/20250303/f7d23b91/attachment.htm>
More information about the pkg-java-commits
mailing list