From 8540bb80c07eabe021ecbefce242cb83b6fa4c32 Mon Sep 17 00:00:00 2001 From: "John J. Aylward" Date: Sun, 15 Oct 2023 20:14:44 -0400 Subject: [PATCH 1/6] Validate that the `mvn package` step completes --- .github/workflows/pipeline.yml | 4 +++- pom.xml | 1 - 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index 5e1dd42..797b9a2 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -1,5 +1,5 @@ # This workflow will build a Java project with Maven -# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven +# For more information see: https://docs.github.com/en/actions/learn-github-actions or https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions name: Java CI with Maven @@ -47,3 +47,5 @@ jobs: with: name: Test Report ${{ matrix.java }} path: target/site/ + - name: Package Jar ${{ matrix.java }} + run: mvn clean package -Dmaven.compiler.source=${{ matrix.java }} -Dmaven.compiler.target=${{ matrix.java }} -Dmaven.test.skip=true -Dmaven.site.skip=true diff --git a/pom.xml b/pom.xml index 77bbdac..2b3c8b2 100644 --- a/pom.xml +++ b/pom.xml @@ -52,7 +52,6 @@ UTF-8 - junit From 134074aeaa8ae47c9782e1e84e19682bd93599ee Mon Sep 17 00:00:00 2001 From: "John J. Aylward" Date: Sun, 15 Oct 2023 20:19:58 -0400 Subject: [PATCH 2/6] Revert "Reverting #761" This reverts commit b180dbedbc99bb177e5b277f1bff2a1b79cebda6. --- pom.xml | 32 +++++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/pom.xml b/pom.xml index 2b3c8b2..6812073 100644 --- a/pom.xml +++ b/pom.xml @@ -158,17 +158,35 @@ false + + org.moditect + moditect-maven-plugin + 1.0.0.Final + + + add-module-infos + package + + add-module-info + + + 9 + + + org.json + + org.json; + + + + + + + org.apache.maven.plugins maven-jar-plugin 3.3.0 - - - - org.json - - - From 9a9efac2af7068940173bf20efce9419e5206efa Mon Sep 17 00:00:00 2001 From: "John J. Aylward" Date: Mon, 16 Oct 2023 13:16:27 -0400 Subject: [PATCH 3/6] Correct moditect configuration to work on java8 --- .gitignore | 2 ++ pom.xml | 11 +++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 7794c4c..b78af4d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,8 @@ # ignore eclipse project files .project .classpath +# ignore vscode files +.vscode # ignore Intellij Idea project files .idea *.iml diff --git a/pom.xml b/pom.xml index 6812073..80c111d 100644 --- a/pom.xml +++ b/pom.xml @@ -172,12 +172,11 @@ 9 - - org.json - - org.json; - - + + module org.json { + exports org.json; + } + From 2b41cf44b52b25cae7c189b54f9bab87ff47eda6 Mon Sep 17 00:00:00 2001 From: "John J. Aylward" Date: Mon, 16 Oct 2023 13:24:40 -0400 Subject: [PATCH 4/6] include jar in job artifacts --- .github/workflows/pipeline.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index 797b9a2..59a7658 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -37,15 +37,21 @@ jobs: mvn site -DgenerateReports=false -Dmaven.compiler.source=${{ matrix.java }} -Dmaven.compiler.target=${{ matrix.java }} - name: Upload Test Results ${{ matrix.java }} if: ${{ always() }} - uses: actions/upload-artifact@v1 + uses: actions/upload-artifact@v3 with: name: Test Results ${{ matrix.java }} path: target/surefire-reports/ - name: Upload Test Report ${{ matrix.java }} if: ${{ always() }} - uses: actions/upload-artifact@v1 + uses: actions/upload-artifact@v3 with: name: Test Report ${{ matrix.java }} path: target/site/ - name: Package Jar ${{ matrix.java }} run: mvn clean package -Dmaven.compiler.source=${{ matrix.java }} -Dmaven.compiler.target=${{ matrix.java }} -Dmaven.test.skip=true -Dmaven.site.skip=true + - name: Upload Package Results ${{ matrix.java }} + if: ${{ always() }} + uses: actions/upload-artifact@v3 + with: + name: Package Jar ${{ matrix.java }} + path: target/*.jar From be115059e9455d5f434027204b6fe02d4c6b07a9 Mon Sep 17 00:00:00 2001 From: "John J. Aylward" Date: Mon, 16 Oct 2023 13:19:16 -0400 Subject: [PATCH 5/6] Correct supported java versions --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9f01342..cd856ab 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ Project goals include: * No external dependencies * Fast execution and low memory footprint * Maintain backward compatibility -* Designed and tested to use on Java versions 1.6 - 1.11 +* Designed and tested to use on Java versions 1.8 - 17 The files in this package implement JSON encoders and decoders. The package can also convert between JSON and XML, HTTP headers, Cookies, and CDL. From 3894483560216341ea4c9b58ac6c06ab19f6dc4d Mon Sep 17 00:00:00 2001 From: "John J. Aylward" Date: Mon, 16 Oct 2023 15:30:55 -0400 Subject: [PATCH 6/6] Add build badges to README --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index cd856ab..32b59bb 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,8 @@ JSON in Java [package org.json] =============================== [![Maven Central](https://img.shields.io/maven-central/v/org.json/json.svg)](https://mvnrepository.com/artifact/org.json/json) +[![Java CI with Maven](https://github.com/stleary/JSON-java/actions/workflows/pipeline.yml/badge.svg)](https://github.com/stleary/JSON-java/actions/workflows/pipeline.yml) +[![CodeQL](https://github.com/stleary/JSON-java/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/stleary/JSON-java/actions/workflows/codeql-analysis.yml) **[Click here if you just want the latest release jar file.](https://search.maven.org/remotecontent?filepath=org/json/json/20231013/json-20231013.jar)**