Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -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"
21 changes: 14 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 25 from jdk.java.net
uses: oracle-actions/setup-java@b1546e588c27008e88bfcabda44d11c22316b9b8 # v1.4.2
with:
website: jdk.java.net
release: 25

- 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/28/netbeans-28-bin.zip' -O /tmp/netbeans-28-bin.zip
(cd $HOME; unzip /tmp/netbeans-28-bin.zip)

- name: Run RAT
run: |
Expand All @@ -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 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 -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 -DJDK25=$JDK25 build-and-test)
8 changes: 4 additions & 4 deletions cmdline/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 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 11-21
* JDK 17-25

### Building

Build using:

```
$ ant -DNETBEANS_PLATFORM=<path-to-NetBeans-20> -DJDK11=<path-to-JDK-11> -DJDK17=<path-to-JDK-17> -DJDK21=<path-to-JDK-21> build-and-test
$ ant -DNETBEANS_PLATFORM=<path-to-NetBeans-28> -DJDK17=<path-to-JDK-17> -DJDK21=<path-to-JDK-21> -DJDK25=<path-to-JDK25> build-and-test
```

The built product is in tool/build/jackpot.
Expand Down
16 changes: 8 additions & 8 deletions cmdline/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
</target>

<target name="build-and-test">
<property name="version" value="20.0" />
<property name="version" value="28.0" />
<condition property="jackpot.root" value="${basedir}" else="${basedir}/..">
<available file="${basedir}/LICENSE" />
</condition>
Expand All @@ -66,21 +66,21 @@
<ant dir="${basedir}" inheritAll="false" inheritRefs="false">
<property name="nbplatform.default.harness.dir" value="${NETBEANS_PLATFORM}/harness" />
<property name="nbplatform.default.netbeans.dest.dir" value="${NETBEANS_PLATFORM}" />
<property name="test.nbjdk.home" value="${JDK11}" />
<property name="test.nbjdk.home" value="${JDK17}" />
<property name="jackpot.root" location="${jackpot.root}" />
<target name="test" />
</ant>
<ant dir="${basedir}" inheritAll="false" inheritRefs="false">
<property name="nbplatform.default.harness.dir" value="${NETBEANS_PLATFORM}/harness" />
<property name="nbplatform.default.netbeans.dest.dir" value="${NETBEANS_PLATFORM}" />
<property name="test.nbjdk.home" value="${JDK17}" />
<property name="test.nbjdk.home" value="${JDK21}" />
<property name="jackpot.root" location="${jackpot.root}" />
<target name="test" />
</ant>
<ant dir="${basedir}" inheritAll="false" inheritRefs="false">
<property name="nbplatform.default.harness.dir" value="${NETBEANS_PLATFORM}/harness" />
<property name="nbplatform.default.netbeans.dest.dir" value="${NETBEANS_PLATFORM}" />
<property name="test.nbjdk.home" value="${JDK21}" />
<property name="test.nbjdk.home" value="${JDK25}" />
<property name="jackpot.root" location="${jackpot.root}" />
<target name="test" />
</ant>
Expand All @@ -93,10 +93,6 @@
<property environment="env"/>
<exec executable="build/test/scripted/run" dir="tool" failonerror="true">
</exec>
<exec executable="build/test/scripted/run" dir="tool" failonerror="true">
<env key="JAVA_HOME" path="${JDK11}" />
<env key="PATH" path="${JDK11}/bin:${env.PATH}" />
</exec>
<exec executable="build/test/scripted/run" dir="tool" failonerror="true">
<env key="JAVA_HOME" path="${JDK17}" />
<env key="PATH" path="${JDK17}/bin:${env.PATH}" />
Expand All @@ -105,6 +101,10 @@
<env key="JAVA_HOME" path="${JDK21}" />
<env key="PATH" path="${JDK21}/bin:${env.PATH}" />
</exec>
<exec executable="build/test/scripted/run" dir="tool" failonerror="true">
<env key="JAVA_HOME" path="${JDK25}" />
<env key="PATH" path="${JDK25}/bin:${env.PATH}" />
</exec>
<echo>Installing tool to the local maven repository:</echo>
<exec dir="." executable="mvn" failonerror="true">
<arg line="install:install-file -Dfile=tool/build/jackpot/jackpot.jar -DgroupId=org.apache.netbeans.modules.jackpot30 -DartifactId=tool -Dversion=${version} -Dpackaging=jar -DpomFile=tool/scripts/pom.xml" />
Expand Down
2 changes: 1 addition & 1 deletion cmdline/lib/nbproject/project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion cmdline/maven/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

<groupId>org.apache.netbeans.modules.jackpot30</groupId>
<artifactId>jackpot30-maven-plugin</artifactId>
<version>20.0</version>
<version>28.0</version>
<packaging>maven-plugin</packaging>

<name>Jackpot 3.0 Command Line Tool Maven Bridge</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion cmdline/maven/tests/fail-on-warnings/golden
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion cmdline/maven/tests/sl-failure/golden
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
3 changes: 1 addition & 2 deletions cmdline/tool/nbproject/project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down