From abccf7717c2c3930470d23943d51b458beb69b2c Mon Sep 17 00:00:00 2001 From: Jan Lahoda Date: Sun, 6 Jul 2025 13:32:55 +0200 Subject: [PATCH 1/2] Upgrading to NetBeans 27, and JDK 17 as the baseline. --- .github/dependabot.yml | 24 +++++++++++++++++++++++ .github/workflows/main.yml | 21 +++++++++++++------- cmdline/README.md | 8 ++++---- cmdline/build.xml | 14 ++++++------- cmdline/lib/nbproject/project.properties | 2 +- cmdline/tool/nbproject/project.properties | 3 +-- 6 files changed, 51 insertions(+), 21 deletions(-) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..66fc428 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,24 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +version: 2 +updates: + + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4ece384..e5ecc7f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -38,19 +38,26 @@ jobs: steps: - name: Checkout ${{ github.ref }} ( ${{ github.sha }} ) - uses: actions/checkout@v3 + uses: actions/checkout@v5 with: persist-credentials: false submodules: false - name: Set up Ubuntu dependencies run: | - sudo apt install openjdk-11-jdk openjdk-17-jdk openjdk-21-jdk + sudo apt update + sudo apt install openjdk-17-jdk openjdk-21-jdk + + - name: Set up latest JDK 24 from jdk.java.net + uses: oracle-actions/setup-java@b1546e588c27008e88bfcabda44d11c22316b9b8 # v1.4.2 + with: + website: jdk.java.net + release: 24 - name: Set up NetBeans run: | - wget -q 'https://archive.apache.org/dist/netbeans/netbeans/20/netbeans-20-bin.zip' -O /tmp/netbeans-20-bin.zip - (cd $HOME; unzip /tmp/netbeans-20-bin.zip) + wget -q 'https://archive.apache.org/dist/netbeans/netbeans/27/netbeans-27-bin.zip' -O /tmp/netbeans-27-bin.zip + (cd $HOME; unzip /tmp/netbeans-27-bin.zip) - name: Run RAT run: | @@ -60,9 +67,9 @@ jobs: - name: Do build Jackpot run: | - export JDK11=/usr/lib/jvm/java-11-openjdk-amd64 export JDK17=/usr/lib/jvm/java-17-openjdk-amd64 export JDK21=/usr/lib/jvm/java-21-openjdk-amd64 - export JAVA_HOME=$JDK11 + export JDK24=$JAVA_HOME + export JAVA_HOME=$JDK17 export PATH=$JAVA_HOME/bin:$PATH - (cd cmdline; ant -Dnbplatform.default.harness.dir=$HOME/netbeans/harness -DNETBEANS_PLATFORM=$HOME/netbeans -DJDK11=$JDK11 -DJDK17=$JDK17 -DJDK21=$JDK21 build-and-test) + (cd cmdline; ant -Dnbplatform.default.harness.dir=$HOME/netbeans/harness -DNETBEANS_PLATFORM=$HOME/netbeans -DJDK17=$JDK17 -DJDK21=$JDK21 -DJDK24=$JDK24 build-and-test) diff --git a/cmdline/README.md b/cmdline/README.md index 92918b8..7222412 100644 --- a/cmdline/README.md +++ b/cmdline/README.md @@ -27,22 +27,22 @@ This tool allows to run NetBeans Java code checker without the NetBeans IDE. Thi #### To Build -* Apache NetBeans 20 -* JDK 11, JDK 17 and JDK 21 +* Apache NetBeans 27 +* JDK 17, JDK 21 and JDK 24 * bash * Apache ant 1.9.9 or above * Apache Maven 3.3.9 or above #### To Run -* JDK 11-21 +* JDK 17-24 ### Building Build using: ``` -$ ant -DNETBEANS_PLATFORM= -DJDK11= -DJDK17= -DJDK21= build-and-test +$ ant -DNETBEANS_PLATFORM= -DJDK17= -DJDK21= -DJDK24= build-and-test ``` The built product is in tool/build/jackpot. diff --git a/cmdline/build.xml b/cmdline/build.xml index 9c7b4dc..e562dcf 100644 --- a/cmdline/build.xml +++ b/cmdline/build.xml @@ -66,21 +66,21 @@ - + - + - + @@ -93,10 +93,6 @@ - - - - @@ -105,6 +101,10 @@ + + + + Installing tool to the local maven repository: diff --git a/cmdline/lib/nbproject/project.properties b/cmdline/lib/nbproject/project.properties index 3ff4e3b..b504c98 100644 --- a/cmdline/lib/nbproject/project.properties +++ b/cmdline/lib/nbproject/project.properties @@ -14,6 +14,6 @@ # limitations under the License. is.autoload=true -javac.source=1.8 +javac.release=17 javac.compilerargs=-Xlint -Xlint:-serial spec.version.base=1.16.0 diff --git a/cmdline/tool/nbproject/project.properties b/cmdline/tool/nbproject/project.properties index ae1c338..ba027c6 100644 --- a/cmdline/tool/nbproject/project.properties +++ b/cmdline/tool/nbproject/project.properties @@ -13,8 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -javac.source=11 -javac.target=11 +javac.release=17 javac.compilerargs=-Xlint -Xlint:-serial cp.extra=build/jopt-simple-3.2.jar:build/diffparser-1.4.jar:build/slf4j-api-1.7.25.jar:build/slf4j-nop-1.7.25.jar:${tools.jar} spec.version.base=1.16.0 From 368a01e84416a4bc0c9da278fb74790b42f44fee Mon Sep 17 00:00:00 2001 From: Jan Lahoda Date: Sat, 22 Nov 2025 12:19:49 +0100 Subject: [PATCH 2/2] Upgrade to NB 28 and JDK 25. --- .github/workflows/main.yml | 12 ++++++------ cmdline/README.md | 8 ++++---- cmdline/build.xml | 8 ++++---- cmdline/maven/pom.xml | 2 +- .../modules/jackpot30/maven/RunJackpot30Test.java | 2 +- cmdline/maven/tests/fail-on-warnings/golden | 2 +- cmdline/maven/tests/sl-failure/golden | 2 +- 7 files changed, 18 insertions(+), 18 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e5ecc7f..194283a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -48,16 +48,16 @@ jobs: sudo apt update sudo apt install openjdk-17-jdk openjdk-21-jdk - - name: Set up latest JDK 24 from jdk.java.net + - name: Set up latest JDK 25 from jdk.java.net uses: oracle-actions/setup-java@b1546e588c27008e88bfcabda44d11c22316b9b8 # v1.4.2 with: website: jdk.java.net - release: 24 + release: 25 - name: Set up NetBeans run: | - wget -q 'https://archive.apache.org/dist/netbeans/netbeans/27/netbeans-27-bin.zip' -O /tmp/netbeans-27-bin.zip - (cd $HOME; unzip /tmp/netbeans-27-bin.zip) + wget -q 'https://archive.apache.org/dist/netbeans/netbeans/28/netbeans-28-bin.zip' -O /tmp/netbeans-28-bin.zip + (cd $HOME; unzip /tmp/netbeans-28-bin.zip) - name: Run RAT run: | @@ -69,7 +69,7 @@ jobs: run: | export JDK17=/usr/lib/jvm/java-17-openjdk-amd64 export JDK21=/usr/lib/jvm/java-21-openjdk-amd64 - export JDK24=$JAVA_HOME + export JDK25=$JAVA_HOME export JAVA_HOME=$JDK17 export PATH=$JAVA_HOME/bin:$PATH - (cd cmdline; ant -Dnbplatform.default.harness.dir=$HOME/netbeans/harness -DNETBEANS_PLATFORM=$HOME/netbeans -DJDK17=$JDK17 -DJDK21=$JDK21 -DJDK24=$JDK24 build-and-test) + (cd cmdline; ant -Dnbplatform.default.harness.dir=$HOME/netbeans/harness -DNETBEANS_PLATFORM=$HOME/netbeans -DJDK17=$JDK17 -DJDK21=$JDK21 -DJDK25=$JDK25 build-and-test) diff --git a/cmdline/README.md b/cmdline/README.md index 7222412..651bdf8 100644 --- a/cmdline/README.md +++ b/cmdline/README.md @@ -27,22 +27,22 @@ This tool allows to run NetBeans Java code checker without the NetBeans IDE. Thi #### To Build -* Apache NetBeans 27 -* JDK 17, JDK 21 and JDK 24 +* Apache NetBeans 28 +* JDK 17, JDK 21 and JDK 25 * bash * Apache ant 1.9.9 or above * Apache Maven 3.3.9 or above #### To Run -* JDK 17-24 +* JDK 17-25 ### Building Build using: ``` -$ ant -DNETBEANS_PLATFORM= -DJDK17= -DJDK21= -DJDK24= build-and-test +$ ant -DNETBEANS_PLATFORM= -DJDK17= -DJDK21= -DJDK25= build-and-test ``` The built product is in tool/build/jackpot. diff --git a/cmdline/build.xml b/cmdline/build.xml index e562dcf..39300ea 100644 --- a/cmdline/build.xml +++ b/cmdline/build.xml @@ -52,7 +52,7 @@ - + @@ -80,7 +80,7 @@ - + @@ -102,8 +102,8 @@ - - + + Installing tool to the local maven repository: diff --git a/cmdline/maven/pom.xml b/cmdline/maven/pom.xml index 3e5d543..65e9f12 100644 --- a/cmdline/maven/pom.xml +++ b/cmdline/maven/pom.xml @@ -21,7 +21,7 @@ org.apache.netbeans.modules.jackpot30 jackpot30-maven-plugin - 20.0 + 28.0 maven-plugin Jackpot 3.0 Command Line Tool Maven Bridge diff --git a/cmdline/maven/src/test/java/org/netbeans/modules/jackpot30/maven/RunJackpot30Test.java b/cmdline/maven/src/test/java/org/netbeans/modules/jackpot30/maven/RunJackpot30Test.java index 306007a..982a09b 100644 --- a/cmdline/maven/src/test/java/org/netbeans/modules/jackpot30/maven/RunJackpot30Test.java +++ b/cmdline/maven/src/test/java/org/netbeans/modules/jackpot30/maven/RunJackpot30Test.java @@ -67,7 +67,7 @@ protected void runTest() throws Throwable { Process p = Runtime.getRuntime().exec(new String[] { maven, - "-Djackpot.plugin.version=20.0", + "-Djackpot.plugin.version=28.0", "-q", "--batch-mode", "jackpot30:analyze" diff --git a/cmdline/maven/tests/fail-on-warnings/golden b/cmdline/maven/tests/fail-on-warnings/golden index e78523f..8aabcf1 100644 --- a/cmdline/maven/tests/fail-on-warnings/golden +++ b/cmdline/maven/tests/fail-on-warnings/golden @@ -1,7 +1,7 @@ ${basedir}/src/main/java/test/App.java:24: warning: [Convert_to_Lambda_or_Member_Reference] This anonymous inner class creation can be turned into a lambda expression. Runnable r = new Runnable() { public void run() { } }; ^ -[ERROR] Failed to execute goal org.apache.netbeans.modules.jackpot30:jackpot30-maven-plugin:20.0:analyze (default-cli) on project maven-test: jackpo30 failed. -> [Help 1] +[ERROR] Failed to execute goal org.apache.netbeans.modules.jackpot30:jackpot30-maven-plugin:28.0:analyze (default-cli) on project maven-test: jackpo30 failed. -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. diff --git a/cmdline/maven/tests/sl-failure/golden b/cmdline/maven/tests/sl-failure/golden index 6a4560d..2841e4f 100644 --- a/cmdline/maven/tests/sl-failure/golden +++ b/cmdline/maven/tests/sl-failure/golden @@ -1,5 +1,5 @@ unrecognized source level specification: unparseable -[ERROR] Failed to execute goal org.apache.netbeans.modules.jackpot30:jackpot30-maven-plugin:20.0:analyze (default-cli) on project maven-test: jackpo30 failed. -> [Help 1] +[ERROR] Failed to execute goal org.apache.netbeans.modules.jackpot30:jackpot30-maven-plugin:28.0:analyze (default-cli) on project maven-test: jackpo30 failed. -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging.