[Git][java-team/tomcat-jakartaee-migration][upstream] 2 commits: New upstream version 1.0.11

Emmanuel Bourg (@ebourg) gitlab at salsa.debian.org
Fri Sep 18 11:02:54 BST 2026



Emmanuel Bourg pushed to branch upstream at Debian Java Maintainers / tomcat-jakartaee-migration


Commits:
4a026417 by Emmanuel Bourg at 2026-09-18T11:15:52+02:00
New upstream version 1.0.11
- - - - -
8ace745d by Emmanuel Bourg at 2026-09-18T11:23:39+02:00
New upstream version 1.0.12
- - - - -


12 changed files:

- + .asf.yaml
- .github/workflows/ci.yml
- + .github/workflows/codeql.yml
- .github/workflows/coverage.yml
- + AGENTS.md
- CHANGES.md
- + SECURITY.md
- pom.xml
- src/main/java/org/apache/tomcat/jakartaee/CacheEntry.java
- src/main/java/org/apache/tomcat/jakartaee/MigrationCLI.java
- src/main/java/org/apache/tomcat/jakartaee/MigrationTask.java
- src/test/java/org/apache/tomcat/jakartaee/MigrationTest.java


Changes:

=====================================
.asf.yaml
=====================================
@@ -0,0 +1,14 @@
+github:
+  rulesets:
+    - name: "Default Branch Protection"
+      type: branch
+      branches:
+        includes:
+          - "~DEFAULT_BRANCH"
+          - "release/*"
+          - "rel/*"
+        excludes: []
+      bypass_teams:
+        - root
+      restrict_deletion: true
+      restrict_force_push: true


=====================================
.github/workflows/ci.yml
=====================================
@@ -23,6 +23,9 @@ on:
     branches:
       - main
 
+permissions:
+  contents: read
+
 env:
   LC_ALL: en_US.UTF-8
 
@@ -39,8 +42,8 @@ jobs:
     name: JDK${{ matrix.java }} ${{ matrix.os }}
     runs-on: ${{ matrix.os }}
     steps:
-    - uses: actions/checkout at v5
-    - uses: actions/cache at v4.3.0
+    - uses: actions/checkout at v6
+    - uses: actions/cache at v5.0.5
       with:
         path: ~/.m2/repository
         key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
@@ -56,7 +59,7 @@ jobs:
       continue-on-error:
         true
     - name: Upload logs
-      uses: actions/upload-artifact at v5
+      uses: actions/upload-artifact at v7
       with:
         name: JDK${{ matrix.java }}-${{ matrix.os }}-logs
         path: output/build/logs/TEST*.txt


=====================================
.github/workflows/codeql.yml
=====================================
@@ -0,0 +1,51 @@
+name: "CodeQL Advanced"
+
+on:
+  push:
+    branches: [ "main" ]
+  pull_request:
+    branches: [ "main" ]
+  schedule:
+    - cron: '42 19 * * 3'
+
+jobs:
+  analyze:
+    name: Analyze (${{ matrix.language }})
+    runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
+    permissions:
+      # required for all workflows
+      security-events: write
+
+      # required to fetch internal or private CodeQL packs
+      packages: read
+
+      # only required for workflows in private repositories
+      actions: read
+      contents: read
+
+    strategy:
+      fail-fast: false
+      matrix:
+        include:
+        - language: actions
+          build-mode: none
+        - language: java-kotlin
+          build-mode: none # This mode only analyzes Java. Set this to 'autobuild' or 'manual' to analyze Kotlin too.
+    steps:
+    - name: Checkout repository
+      uses: actions/checkout at v6
+
+    # Initializes the CodeQL tools for scanning.
+    - name: Initialize CodeQL
+      uses: github/codeql-action/init at v4
+      with:
+        languages: ${{ matrix.language }}
+        build-mode: ${{ matrix.build-mode }}
+        queries: security-extended,security-and-quality
+        # For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
+        # queries: security-extended,security-and-quality
+
+    - name: Perform CodeQL Analysis
+      uses: github/codeql-action/analyze at v4
+      with:
+        category: "/language:${{matrix.language}}"


=====================================
.github/workflows/coverage.yml
=====================================
@@ -23,6 +23,9 @@ on:
     branches:
       - main
 
+permissions:
+  contents: read
+  
 env:
   LC_ALL: en_US.UTF-8
 
@@ -33,8 +36,8 @@ jobs:
         java: [ 8 ]
     runs-on: ubuntu-latest
     steps:
-    - uses: actions/checkout at v5
-    - uses: actions/cache at v4.3.0
+    - uses: actions/checkout at v6
+    - uses: actions/cache at v5.0.5
       with:
         path: ~/.m2/repository
         key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
@@ -48,6 +51,7 @@ jobs:
     - name: Build
       run: mvn -V test jacoco:report --file pom.xml --no-transfer-progress
     - name: Upload coverage to Codecov
-      uses: codecov/codecov-action at v5
+      # Pin to 6.0.1
+      uses: codecov/codecov-action at e79a6962e0d4c0c17b229090214935d2e33f8354
       with:
         files: ./target/site/jacoco/jacoco.xml


=====================================
AGENTS.md
=====================================
@@ -0,0 +1,17 @@
+# Agent guidance
+
+This file is read by automated agents (security scanners, code
+analyzers, AI assistants) operating on this repository. It
+points them at the human-authored references they should
+consult before producing output.
+
+## Security
+
+Security model: [SECURITY.md](./SECURITY.md), which links to
+the canonical model document at
+<https://tomcat.apache.org/security-model.html>.
+
+Agents that scan this repository should consult the linked
+security model for the project's threat model, in-scope /
+out-of-scope declarations, and known non-findings before
+reporting issues.


=====================================
CHANGES.md
=====================================
@@ -1,5 +1,15 @@
 # Tomcat Migration Tool for Jakarta EE - Changelog
 
+## 1.0.12
+- Add Maven Wrapper Plugin to manage the Maven wrapper. (markt)
+- Update the Maven Wrapper and switch to 'only-script' configuration. (markt)
+- Enable successful running of tests without having to clean the output directory bewteen test runs. (markt)
+
+## 1.0.11
+- Update Eclipse OSGI to 3.23.200. (dependabot/remm)
+- [#108](https://github.com/apache/tomcat-jakartaee-migration/issues/108) possible array exception when using the CLI. (remm)
+- Shade the OSGI dependencies to avoid conflicts when migrated applications use the same libraries. (markt)
+
 ## 1.0.10
 - When migrating files in place, don't replace the original file if no conversion has taken place. Based on PR[#78] by Semiao Marco.
 - When converting a file in an archive, update the last modified time for that archive entry.  Based on PR[#78] by Semiao Marco.
@@ -20,7 +30,6 @@
 - 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)
@@ -29,7 +38,6 @@
 - Update Ant to 1.10.14. (markt)
 - Include `.jspf` and `.tagf` files in the conversion process. (markt)
 
-
 ## 1.0.7
 
 - When converting directories, rename files according to the chosen profile. (fschumacher)
@@ -39,7 +47,6 @@
 - Update Commons Compress to 1.23.0. (markt)
 - Provided workaround for the known JDK bug identified as the cause of migration failures in issue [#46](https://github.com/apache/tomcat-jakartaee-migration/issues/46). (markt/ebourg)
 
-
 ## 1.0.6
 
 - Fix handling of javax.annotation package in 1.0.5. PR [#40](https://github.com/apache/tomcat-jakartaee-migration/pull/40) provided by Danny Thomas (remm)


=====================================
SECURITY.md
=====================================
@@ -0,0 +1,14 @@
+# Security
+
+Apache Tomcat's security model and disclosure process are
+published on the project website rather than in the repository:
+
+- **Threat model and security policy**:
+  <https://tomcat.apache.org/security-model.html>
+- **How to report a vulnerability**: see the Security section
+  of <https://tomcat.apache.org/>.
+
+The project website is the authoritative source; this file
+exists so agents and tooling that look for `SECURITY.md` in
+the repository can mechanically follow the link to the
+canonical documents.


=====================================
pom.xml
=====================================
@@ -21,12 +21,12 @@
   <parent>
     <groupId>org.apache</groupId>
     <artifactId>apache</artifactId>
-    <version>35</version>
+    <version>38</version>
   </parent>
 
   <groupId>org.apache.tomcat</groupId>
   <artifactId>jakartaee-migration</artifactId>
-  <version>1.0.10</version>
+  <version>1.0.12</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.10</tag>
+    <tag>1.0.12</tag>
     <url>https://gitbox.apache.org/repos/asf?p=tomcat-jakartaee-migration.git</url>
   </scm>
 
@@ -77,7 +77,7 @@
     <dependency>
       <groupId>org.apache.bcel</groupId>
       <artifactId>bcel</artifactId>
-      <version>6.11.0</version>
+      <version>6.12.0</version>
     </dependency>
     <dependency>
       <groupId>org.apache.commons</groupId>
@@ -87,18 +87,18 @@
     <dependency>
       <groupId>commons-io</groupId>
       <artifactId>commons-io</artifactId>
-      <version>2.21.0</version>
+      <version>2.22.0</version>
     </dependency>
     <dependency>
       <groupId>org.apache.ant</groupId>
       <artifactId>ant</artifactId>
-      <version>1.10.15</version>
+      <version>1.10.17</version>
       <scope>provided</scope>
     </dependency>
     <dependency>
         <groupId>org.eclipse.platform</groupId>
         <artifactId>org.eclipse.osgi</artifactId>
-        <version>3.18.600</version>
+        <version>3.24.100</version>
     </dependency>
 
     <!-- Test dependencies -->
@@ -145,6 +145,11 @@
     </resources>
 
     <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-wrapper-plugin</artifactId>
+        <version>3.3.4</version>
+      </plugin>
       <plugin>
         <artifactId>maven-antrun-plugin</artifactId>
         <executions>
@@ -156,8 +161,8 @@
             <phase>process-test-classes</phase>
             <configuration>
               <target>
-                <jar basedir="target/test-classes" destfile="target/test-classes/cgi-api.jar" includes="**/CommonGatewayInterface*" />
-                <jar basedir="target/test-classes" destfile="target/test-classes/hellocgi.jar" includes="**/HelloCGI*">
+                <jar basedir="target/test-classes" destfile="target/test-classes/cgi-api.jar" includes="**/CommonGatewayInterface.class" />
+                <jar basedir="target/test-classes" destfile="target/test-classes/hellocgi.jar" includes="**/HelloCGI.class">
                   <manifest>
                     <attribute name="Implementation-Version" value="1.2.3" />
                   </manifest>
@@ -305,6 +310,14 @@
                   <pattern>org.apache.bcel</pattern>
                   <shadedPattern>org.apache.tomcat.jakartaee.bcel</shadedPattern>
                 </relocation>
+                <relocation>
+                  <pattern>org.eclipse</pattern>
+                  <shadedPattern>org.apache.tomcat.jakartaee.eclipse</shadedPattern>
+                </relocation>
+                <relocation>
+                  <pattern>org.osgi</pattern>
+                  <shadedPattern>org.apache.tomcat.jakartaee.osgi</shadedPattern>
+                </relocation>
               </relocations>
               <transformers>
                 <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">


=====================================
src/main/java/org/apache/tomcat/jakartaee/CacheEntry.java
=====================================
@@ -36,6 +36,7 @@ class CacheEntry {
     private final boolean exists;
     private final File cacheFile;
     private final File tempFile;
+    private FileOutputStream fos;
 
     CacheEntry(String hash, boolean exists, File cacheFile, File tempFile) {
         this.hash = hash;
@@ -80,7 +81,8 @@ class CacheEntry {
      * @throws IOException if an I/O error occurs
      */
     public OutputStream beginStore() throws IOException {
-        return new FileOutputStream(tempFile);
+        fos = new FileOutputStream(tempFile);
+        return fos;
     }
 
     /**
@@ -88,6 +90,7 @@ class CacheEntry {
      * @throws IOException if an I/O error occurs
      */
     public void commitStore() throws IOException {
+        fos.close();
         if (!tempFile.exists()) {
             throw new IOException(sm.getString("cacheEntry.tempNotExist", tempFile));
         }
@@ -114,6 +117,11 @@ class CacheEntry {
      * Rollback the store operation - delete temp file.
      */
     public void rollbackStore() {
+        try {
+            fos.close();
+        } catch (IOException ioe) {
+            // Ignore
+        }
         if (tempFile.exists()) {
             tempFile.delete();
         }


=====================================
src/main/java/org/apache/tomcat/jakartaee/MigrationCLI.java
=====================================
@@ -85,7 +85,9 @@ public class MigrationCLI {
                     invalidArguments();
                 }
                 // Configure the explicit level
-                Logger.getGlobal().getParent().getHandlers()[0].setLevel(level);
+                if (Logger.getGlobal().getParent().getHandlers().length > 0) {
+                    Logger.getGlobal().getParent().getHandlers()[0].setLevel(level);
+                }
                 Logger.getGlobal().getParent().setLevel(level);
             } else if (argument.startsWith(PROFILE_ARG)) {
                 iter.remove();


=====================================
src/main/java/org/apache/tomcat/jakartaee/MigrationTask.java
=====================================
@@ -128,4 +128,10 @@ public class MigrationTask extends Task {
             throw new BuildException(e, getLocation());
         }
     }
+
+    @Override
+    public Object clone() throws CloneNotSupportedException {
+        // Tasks don't need to support clone()
+        throw new CloneNotSupportedException();
+    }
 }


=====================================
src/test/java/org/apache/tomcat/jakartaee/MigrationTest.java
=====================================
@@ -26,6 +26,7 @@ import java.util.jar.JarFile;
 
 import org.apache.commons.io.FileUtils;
 import org.junit.After;
+import org.junit.Assert;
 import org.junit.Assume;
 import org.junit.Before;
 import org.junit.Test;
@@ -178,6 +179,8 @@ public class MigrationTest {
     @Test
     public void testMigrateClassFile() throws Exception {
         File classFile = new File("target/test-classes/org/apache/tomcat/jakartaee/HelloCGI.class");
+        File classFileOriginal = new File("target/test-classes/org/apache/tomcat/jakartaee/HelloCGI-original.class");
+        FileUtils.copyFile(classFile, classFileOriginal);
 
         Migration migration = new Migration();
         migration.setSource(classFile);
@@ -186,6 +189,9 @@ public class MigrationTest {
 
         Class<?> cls = Class.forName("org.apache.tomcat.jakartaee.HelloCGI");
         assertEquals("jakarta.servlet.CommonGatewayInterface", cls.getSuperclass().getName());
+
+        Assert.assertTrue("Failed to delete migrated class file", classFile.delete());
+        FileUtils.copyFile(classFileOriginal, classFile);
     }
 
     @Test



View it on GitLab: https://salsa.debian.org/java-team/tomcat-jakartaee-migration/-/compare/316be028bfa66f76b8e151cc73dbb4c92ac281de...8ace745dabc9ddbb969f53362304a98a8dfdb29a

-- 
View it on GitLab: https://salsa.debian.org/java-team/tomcat-jakartaee-migration/-/compare/316be028bfa66f76b8e151cc73dbb4c92ac281de...8ace745dabc9ddbb969f53362304a98a8dfdb29a
You're receiving this email because of your account on salsa.debian.org. Manage all notifications: https://salsa.debian.org/-/profile/notifications | Help: https://salsa.debian.org/help


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-commits/attachments/20260918/1cc4c92f/attachment.htm>


More information about the pkg-java-commits mailing list