Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pmd 7 pmd7 merge master #489

Open
wants to merge 147 commits into
base: pmd-7-pmd7
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
147 commits
Select commit Hold shift + click to select a range
0e48933
Bump maven-gpg-plugin from 1.6 to 3.0.1
dependabot[bot] Jun 9, 2022
c8c8dc4
Bump maven-enforcer-plugin from 3.0.0-M1 to 3.1.0
dependabot[bot] Jun 13, 2022
6159de2
Update README.md
jborgers Jul 12, 2022
b5c33a8
Bump maven-javadoc-plugin from 3.2.0 to 3.4.1
dependabot[bot] Aug 15, 2022
83d657a
fix xpath error
xyxcxzl Sep 18, 2022
39a1ad4
Bump sonar-orchestrator from 3.37.0.87 to 3.40.0.183
dependabot[bot] Nov 16, 2022
f7f2c2c
Bump junit-jupiter from 5.8.2 to 5.9.2
dependabot[bot] Jan 11, 2023
1cf0bb1
Bump java-frontend from 7.12.0.29739 to 7.16.0.30901
dependabot[bot] Jan 12, 2023
6a5f26e
bump build tool versions
stokpop Jan 13, 2023
7a0d30f
Bump assertj-core from 3.22.0 to 3.24.2
dependabot[bot] Jan 17, 2023
1abaf97
Merge pull request #334
jborgers Jan 25, 2023
4356da3
Merge pull request #339
jborgers Jan 25, 2023
6ee737e
Merge pull request #348
jborgers Jan 25, 2023
b430afd
Merge pull request #363
jborgers Jan 25, 2023
7d67052
Merge pull request #370
jborgers Jan 25, 2023
a845591
Merge pull request #371
jborgers Jan 25, 2023
9d51b68
Merge pull request #373
jborgers Jan 25, 2023
779e52a
Bump mockito-core from 4.5.1 to 5.0.0
dependabot[bot] Jan 25, 2023
6de0049
Merge pull request #372
jborgers Jan 25, 2023
85790ad
new maven wrapper, pmd 6.53, fix integration tests
jborgers Jan 25, 2023
fd704df
Bump maven-javadoc-plugin from 3.4.1 to 3.5.0
dependabot[bot] Feb 16, 2023
d3f02b7
Bump maven-surefire-plugin from 2.22.2 to 3.0.0
dependabot[bot] Mar 15, 2023
31c4ff3
Bump maven-release-plugin from 2.5.3 to 3.0.0
dependabot[bot] Mar 21, 2023
e680d50
Bump sonar-orchestrator from 3.40.0.183 to 3.42.0.312
dependabot[bot] Mar 24, 2023
edc7510
Bump jacoco-maven-plugin from 0.8.8 to 0.8.9
dependabot[bot] Apr 4, 2023
10db802
Update of dependencies, pmd 6.55
jborgers Apr 14, 2023
06ded37
Bump mockito-core from 5.0.0 to 5.3.0
dependabot[bot] Apr 14, 2023
e23ed4b
Merge pull request #378 from jborgers/dependabot/maven/org.apache.mav…
jborgers Apr 14, 2023
4f7e6d8
Merge pull request #383 from jborgers/dependabot/maven/org.apache.mav…
jborgers Apr 14, 2023
1b8ccb2
Bump maven-enforcer-plugin from 3.1.0 to 3.3.0
dependabot[bot] Apr 14, 2023
63d80ce
Merge pull request #386 from jborgers/dependabot/maven/org.apache.mav…
jborgers Apr 14, 2023
352d3ce
Merge pull request #387 from jborgers/dependabot/maven/org.sonarsourc…
jborgers Apr 14, 2023
52c506f
Bump maven-failsafe-plugin from 2.22.2 to 3.0.0
dependabot[bot] Apr 14, 2023
c3ba644
Merge pull request #388 from jborgers/dependabot/maven/org.jacoco-jac…
jborgers Apr 14, 2023
1d26636
Merge pull request #389 from jborgers/dependabot/maven/org.apache.mav…
jborgers Apr 14, 2023
448a3ec
Merge pull request #390 from jborgers/dependabot/maven/org.mockito-mo…
jborgers Apr 14, 2023
9ed89d0
Merge pull request #384 from jborgers/dependabot/maven/org.apache.mav…
jborgers Apr 14, 2023
686bbe2
Bump jacoco-maven-plugin from 0.8.9 to 0.8.10
dependabot[bot] Apr 26, 2023
0db6797
Bump junit-jupiter from 5.9.2 to 5.9.3
dependabot[bot] Apr 27, 2023
afb82f4
Bump maven-gpg-plugin from 3.0.1 to 3.1.0
dependabot[bot] May 8, 2023
14e8958
Bump maven-source-plugin from 3.2.1 to 3.3.0
dependabot[bot] May 22, 2023
0085f74
Bump maven-failsafe-plugin from 3.0.0 to 3.1.2
dependabot[bot] Jun 7, 2023
d270ff1
Replaced deprecated valueOfString method with valueOf
Sep 13, 2023
ad3fef7
Merge pull request #394 from jborgers/dependabot/maven/org.jacoco-jac…
jborgers Feb 8, 2024
b68a94d
Merge pull request #395 from jborgers/dependabot/maven/org.junit.jupi…
jborgers Feb 8, 2024
dd04c02
Merge pull request #398 from jborgers/dependabot/maven/org.apache.mav…
jborgers Feb 8, 2024
3cafed5
Merge pull request #401 from jborgers/dependabot/maven/org.apache.mav…
jborgers Feb 8, 2024
2fb3bf0
Merge pull request #406 from jborgers/dependabot/maven/org.apache.mav…
jborgers Feb 8, 2024
17eb5cf
actions to @4
jborgers Feb 8, 2024
ee1d83b
Bump org.apache.maven.plugins:maven-clean-plugin from 3.2.0 to 3.3.2
dependabot[bot] Feb 9, 2024
380c40b
Bump org.apache.commons:commons-lang3 from 3.12.0 to 3.14.0
dependabot[bot] Feb 9, 2024
f1f94a6
Bump org.apache.maven.plugins:maven-release-plugin from 3.0.0 to 3.0.1
dependabot[bot] Feb 9, 2024
339477e
Bump org.apache.maven.plugins:maven-javadoc-plugin from 3.5.0 to 3.6.3
dependabot[bot] Feb 9, 2024
9e08976
Bump org.jacoco:jacoco-maven-plugin from 0.8.10 to 0.8.11
dependabot[bot] Feb 9, 2024
9347371
Bump org.apache.maven.plugins:maven-surefire-plugin from 3.0.0 to 3.2.5
dependabot[bot] Feb 9, 2024
439a53a
Bump org.sonarsource.orchestrator:sonar-orchestrator
dependabot[bot] Feb 12, 2024
44c6d41
Merge pull request #415 from renewolfert/issue-rulepriority
jborgers Feb 15, 2024
3811206
Merge pull request #433 from jborgers/dependabot/maven/org.sonarsourc…
jborgers Feb 15, 2024
3a3c665
Bump org.mockito:mockito-core from 5.3.0 to 5.11.0
dependabot[bot] Mar 4, 2024
6b5ee31
Bump com.google.guava:guava from 31.1-jre to 33.1.0-jre
dependabot[bot] Mar 14, 2024
1ef5703
* Upgrade to junit4 and sonar orchestrator-junit4, sonar-plugin-api f…
jborgers Mar 14, 2024
dddc8fc
Merge pull request #351 from xyxcxzl/master
jborgers Mar 27, 2024
40d5d9e
Merge pull request #423 from jborgers/dependabot/maven/org.apache.mav…
jborgers Mar 27, 2024
dc3123a
Merge pull request #424 from jborgers/dependabot/maven/org.apache.com…
jborgers Mar 27, 2024
4f10d49
Merge pull request #426 from jborgers/dependabot/maven/org.apache.mav…
jborgers Mar 27, 2024
f54a00f
Merge pull request #427 from jborgers/dependabot/maven/org.apache.mav…
jborgers Mar 27, 2024
8f65822
Merge pull request #428 from jborgers/dependabot/maven/org.jacoco-jac…
jborgers Mar 27, 2024
227fd1b
Merge pull request #431 from jborgers/dependabot/maven/org.apache.mav…
jborgers Mar 27, 2024
a676fc1
Bump org.sonarsource.scanner.maven:sonar-maven-plugin
dependabot[bot] Mar 27, 2024
b4f8b48
Merge pull request #436 from jborgers/dependabot/maven/org.mockito-mo…
jborgers Mar 27, 2024
b85f4a6
Merge pull request #437 from jborgers/dependabot/maven/org.sonarsourc…
jborgers Mar 27, 2024
0af6c9e
Merge pull request #438 from jborgers/dependabot/maven/com.google.gua…
jborgers Mar 27, 2024
030e9d9
dependency java.frontend.version>7.27.1.33504
jborgers Mar 27, 2024
22d0d2f
actions build switch java 11 to 17
jborgers Mar 27, 2024
a287374
updates versions table and sonar version.
jborgers Mar 27, 2024
b2f4e3d
Bump org.assertj:assertj-core from 3.24.2 to 3.25.3
dependabot[bot] Mar 28, 2024
dea5e76
Bump org.apache.maven.plugins:maven-enforcer-plugin from 3.3.0 to 3.4.1
dependabot[bot] Mar 28, 2024
c8d9e5f
Bump org.apache.maven.plugins:maven-failsafe-plugin from 3.1.2 to 3.2.5
dependabot[bot] Mar 28, 2024
785b993
* Upgrade/migrate from jdom 1.1 with security issue to newest jdom2
jborgers Mar 28, 2024
fc72d8d
Merge remote-tracking branch 'origin/master'
jborgers Mar 28, 2024
50a3937
Merge pull request #442 from jborgers/dependabot/maven/org.assertj-as…
jborgers Mar 28, 2024
ff33ac1
* Fixed various deprecations of sonar plugin api and pmd
jborgers Mar 29, 2024
f186292
* Use java 11 everywhere
jborgers Mar 29, 2024
0e773d8
* Fix several deprecations
jborgers Mar 29, 2024
40e0a73
fix, allow external stylesheet
jborgers Mar 29, 2024
16d556f
* revert Scanner package change because of issues
jborgers Mar 29, 2024
f5a911e
* Move from deprecated PMD to PMDAnalysis
jborgers Apr 4, 2024
e4d6b58
adjust sonar api to 9.8, to support sonar 9.8+
jborgers Apr 22, 2024
5bc671a
more clear on support sonar 9.8+
jborgers Apr 22, 2024
ab14ebd
Don't stop on error when java version >= 21, log a warning and use 20…
jborgers Apr 23, 2024
aa90659
clearer warning
jborgers Apr 23, 2024
8380620
clearer warning
jborgers Apr 23, 2024
19f6747
Get GitHub Actions going
jborgers Apr 23, 2024
6dd458f
3.4.1
jborgers Apr 23, 2024
ab30a9f
Release 3.5.0
jborgers Apr 23, 2024
d7a962f
Some fixes and updates
jborgers Apr 23, 2024
380b9e7
Release 3.5.0
jborgers Apr 23, 2024
c2c0caf
build: do a mvn clean before release
PeterPaul-Perfana Apr 24, 2024
629a349
build: do a mvn clean before release - try 2
PeterPaul-Perfana Apr 24, 2024
1c79a6a
Bump org.sonarsource.java:java-frontend
dependabot[bot] Apr 25, 2024
9b44f25
build: upped maven wrapper and nexus-staging-maven-plugin in integrat…
PeterPaul-Perfana Apr 25, 2024
9f4d870
build: upped maven wrapper and nexus-staging-maven-plugin in integrat…
PeterPaul-Perfana Apr 25, 2024
7698c25
build: added description in pom.xml for Maven Central release require…
PeterPaul-Perfana Apr 25, 2024
30b8e43
build: add release to github actions
PeterPaul-Perfana Apr 25, 2024
81dbee9
build: upped versions, organized pom.xml
PeterPaul-Perfana Apr 25, 2024
8334b96
build: upped mvnw, organized pom.xml - part 2
PeterPaul-Perfana Apr 25, 2024
21de3aa
version 3.5.1-SNAPSHOT
PeterPaul-Perfana Apr 25, 2024
37e27bc
Bump sonar-orchestrator.version from 4.7.1.1872 to 4.9.0.1920
dependabot[bot] Apr 25, 2024
bc9dc19
Bump org.apache.maven.plugins:maven-gpg-plugin from 3.1.0 to 3.2.4
dependabot[bot] Apr 25, 2024
2970d40
build: release on tag push
PeterPaul-Perfana Apr 25, 2024
e35f3b9
build: test release with install instead of deploy
PeterPaul-Perfana Apr 25, 2024
8636622
build: not build+test on tag push
PeterPaul-Perfana Apr 25, 2024
9e8c0fb
build: add changelog to gha release
PeterPaul-Perfana Apr 25, 2024
bd5d256
build: tagging will deploy
PeterPaul-Perfana Apr 25, 2024
5a044fb
build(deps): bump org.apache.maven.plugins:maven-source-plugin
dependabot[bot] Apr 26, 2024
596420a
build: new gha release as "draft"
PeterPaul-Perfana Apr 26, 2024
bd699c1
build: remove travis references, update release instructions
PeterPaul-Perfana Apr 26, 2024
7c627b8
build: update release instructions
PeterPaul-Perfana Apr 26, 2024
b120e51
build: skip builds on *.md updates
PeterPaul-Perfana Apr 26, 2024
6ba717a
Merge pull request #458 from jborgers/dependabot/maven/org.apache.mav…
stokpop Apr 26, 2024
bade7f4
Merge pull request #454 from jborgers/dependabot/maven/org.apache.mav…
stokpop Apr 26, 2024
e74d077
Merge pull request #446 from jborgers/dependabot/maven/org.apache.mav…
stokpop Apr 26, 2024
ea337e8
Merge pull request #444 from jborgers/dependabot/maven/org.apache.mav…
stokpop Apr 26, 2024
fbd5a0b
Tested successfully in SQ 10.4, failed in 10.5, updated table.
jborgers Apr 27, 2024
a09f527
Merge pull request #455 from jborgers/dependabot/maven/org.sonarsourc…
jborgers Apr 29, 2024
c80d0f1
Merge pull request #443 from jborgers/dependabot/maven/sonar-orchestr…
jborgers Apr 29, 2024
ef93389
Mention Java 17 needed in release notes
jborgers Apr 29, 2024
c418ffb
Support SQ 9.9.4+
jborgers Apr 30, 2024
9b9f409
Switch back to Java 11
jborgers May 6, 2024
ff0a2ea
java-frontend dependency back to 7.30.0.34429, suspected as the lates…
jborgers May 6, 2024
d48a169
build(deps): bump com.google.guava:guava from 33.1.0-jre to 33.2.0-jre
dependabot[bot] May 6, 2024
b5e721b
Merge pull request #463 from jborgers/dependabot/maven/com.google.gua…
jborgers May 6, 2024
4c32a68
Added release notes for 3.5.1
jborgers May 7, 2024
1940c6f
removed commented-out old settings in pom
jborgers May 7, 2024
b4269e8
build: do not skip close in staging repo (Sonatype)
PeterPaul-Perfana May 7, 2024
528bcef
updated CHANGELOG.md and README.md
jborgers May 7, 2024
846663b
build: git fetch all tag with force to avoid "would clobber existing …
PeterPaul-Perfana May 7, 2024
a39d340
release: git fetch all tag with force to avoid "would clobber existin…
PeterPaul-Perfana May 7, 2024
23abe03
Prepare release 3.5.2-SNAPSHOT
jborgers May 7, 2024
f9ea8c4
Update README.md
stokpop Jun 28, 2024
badae48
build: added flatten pom to resolve all variables, deploy snapshot to…
PeterPaul-Perfana Jul 1, 2024
449057f
Merge remote-tracking branch 'origin/master'
PeterPaul-Perfana Jul 1, 2024
2470dda
build: added skipTests option for manual start, added sonatype creds …
PeterPaul-Perfana Jul 2, 2024
1a258eb
build: make integration tests work locally, upgrade mvn wrapper, upgr…
PeterPaul-Perfana Nov 29, 2024
1ac48a1
merged main into pmd-7-pmd7 branch and fixed unit tests
PeterPaul-Perfana Dec 5, 2024
78c8560
merged main into pmd-7-pmd7 branch and fixed integration tests
PeterPaul-Perfana Dec 6, 2024
59fb124
speedup integration tests by initializing orchestrator sonarqube only…
PeterPaul-Perfana Dec 6, 2024
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
42 changes: 31 additions & 11 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,21 @@
name: Build
name: Build and test

on:
push:
paths-ignore:
- '.github/**'
- '**/*.md'
tags-ignore:
- '**'
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:
inputs:
skipTests:
description: "Skip Tests?"
required: true
default: "no"

defaults:
run:
Expand All @@ -14,33 +24,43 @@ defaults:
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 60
timeout-minutes: 20
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Set Release version env variable
run: |
echo "TAG_NAME=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV

# if no tag exists, this is expected to fail
- name: Switch to git tag for release
# only build SNAPSHOTS, use release for tagged releases
- name: Check if tag contains SNAPSHOT
if: contains(env.TAG_NAME, 'SNAPSHOT') != true
run: |
git fetch --all --tags
git checkout tags/${{ env.TAG_NAME }} -b ${{ env.TAG_NAME }}-tmp-branch
echo "Tag '$TAG_NAME' does not contain 'SNAPSHOT', failing build."
exit 1

- name: Set up JDK 11
uses: actions/setup-java@v2
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 11
server-id: sonatype-nexus
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-passphrase: MAVEN_GPG_PASSPHRASE
gpg-private-key: ${{ secrets.GPG_SIGNING_KEY }}

- name: Build
- name: Deploy SNAPSHOT to maven central
env:
MAVEN_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_SIGNING_PASSWORD }}
SKIP_TESTS: ${{ github.event.inputs.skipTests }}
run: |
./mvnw clean verify
./mvnw --batch-mode $(if [ "$SKIP_TESTS" = "yes" ]; then echo "-DskipTests"; fi) clean deploy

- name: Upload jar
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: sonar-pmd-plugin-${{ env.TAG_NAME }}
path: sonar-pmd-plugin/target/sonar-pmd-plugin-*.jar
30 changes: 22 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Release
name: Release to Maven Central

on:
push:
tags:
- '*'
workflow_dispatch:

defaults:
Expand All @@ -10,23 +13,27 @@ defaults:
jobs:
release:
runs-on: ubuntu-latest
timeout-minutes: 60
timeout-minutes: 20
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- uses: olegtarasov/get-tag@v2.1.3
id: tagName
with:
tagRegex: "(.*)"

- name: Set Release version env variable
run: |
echo "TAG_NAME=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV
echo "TAG_NAME=${{ steps.tagName.outputs.tag }}" >> $GITHUB_ENV

# if no tag exists, this is expected to fail
- name: Switch to git tag for release
if: contains(env.TAG_NAME, 'SNAPSHOT') != true
run: |
git fetch --all --tags
git fetch --all --tags -f
git checkout tags/${{ env.TAG_NAME }} -b ${{ env.TAG_NAME }}-tmp-branch

- name: Set up JDK 11
uses: actions/setup-java@v2
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 11
Expand All @@ -42,4 +49,11 @@ jobs:
MAVEN_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_SIGNING_PASSWORD }}
run: |
./mvnw --batch-mode -P release deploy
./mvnw --batch-mode -Drevision=${{ env.TAG_NAME }} -P release clean deploy

- name: Create GHA release
uses: ncipollo/release-action@v1
with:
draft: true
artifacts: "sonar-pmd-plugin/target/*.jar"
bodyFile: CHANGELOG.md
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,5 @@ Thumbs.db
# Folder config file
Desktop.ini
.java-version

.flattened-pom.xml
Binary file removed .mvn/wrapper/maven-wrapper.jar
Binary file not shown.
9 changes: 5 additions & 4 deletions .mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@
# 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.
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.6/apache-maven-3.8.6-bin.zip
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar
wrapperVersion=3.3.2
distributionType=only-script
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.6/apache-maven-3.9.6-bin.zip
30 changes: 0 additions & 30 deletions .travis.yml

This file was deleted.

35 changes: 32 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,43 @@
# Changelog

## [3.4.1-SNAPSHOT](https://github.com/jborgers/sonar-pmd/tree/master) (tbd)
[Full Changelog](https://github.com/jborgers/sonar-pmd/compare/3.4.0...master)

- nothing yet
## [3.5.2-SNAPSHOT](https://github.com/jborgers/sonar-pmd/tree/3.5.2-SNAPSHOT) (2024-xx-xx)
[Full Changelog](https://github.com/jborgers/sonar-pmd/compare/3.5.1..master)

**Implemented highlights:**


## [3.5.1](https://github.com/jborgers/sonar-pmd/tree/3.5.1) (2024-05-07)
[Full Changelog](https://github.com/jborgers/sonar-pmd/compare/3.5.0..3.5.1)

**Implemented highlights:**
- Supports latest SonarQube [9.9.4 - 10.5+]
- Supports running on Java 11 on analysis side for SQ 9.9.4 - 10.2.x
- Supports running on Java 17 for all supported versions
- Updated Sonar Plugin API+impl for SonarQube 9.9.4+
- Upgraded various dependencies

- ## [3.5.0](https://github.com/jborgers/sonar-pmd/tree/3.5.0) (2024-04-23)
[Full Changelog](https://github.com/jborgers/sonar-pmd/compare/3.4.0...3.5.0)

**Contributors:**
- [jborgers](https://github.com/jborgers)
- [renewolfert](https://github.com/renewolfert)

**Implemented highlights:**
- Updated PMD (6.55.0) (last PMD-6) #422
- Support analyzing up to Java 20-preview (close to 21) #422
- Java 21+ falls back to 20-preview with warning (no error) #422
- Updated Sonar Plugin API+impl (9.8.0.63668) (SonarQube 9.8+)
- Upgraded various dependencies
- Needs Java 17, the class file version is 61

## [3.4.0](https://github.com/jborgers/sonar-pmd/tree/3.4.0) (2022-05-11)
[Full Changelog](https://github.com/jborgers/sonar-pmd/compare/3.3.1...3.4.0)

**Contributors:**
- [jborgers](https://github.com/jborgers)
- [stokpop](https://github.com/stokpop)
- [jensgerdes](https://github.com/jensgerdes) (Many thanks for his great maintenance and decision to transfer)

**Implemented highlights:**
Expand Down
27 changes: 17 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# SonarQube PMD7 Plugin [![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.sonarsource.pmd/sonar-pmd-plugin/badge.svg)](https://maven-badges.herokuapp.com/maven-central/org.sonarsource.pmd/sonar-pmd-plugin) [![Build Status](https://api.travis-ci.org/jborgers/sonar-pmd.svg?branch=master)](https://travis-ci.org/jborgers/sonar-pmd) [![SonarStatus](https://sonarcloud.io/api/project_badges/measure?project=org.sonarsource.pmd%3Asonar-pmd&metric=alert_status)](https://sonarcloud.io/dashboard?id=org.sonarsource.pmd%3Asonar-pmd) [![SonarStatus](https://sonarcloud.io/api/project_badges/measure?project=org.sonarsource.pmd%3Asonar-pmd&metric=coverage)](https://sonarcloud.io/dashboard?id=org.sonarsource.pmd%3Asonar-pmd)

[![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.sonarsource.pmd/sonar-pmd-plugin/badge.svg)](https://maven-badges.herokuapp.com/maven-central/org.sonarsource.pmd/sonar-pmd-plugin)
![Build Status](https://github.com/jborgers/sonar-pmd/actions/workflows/build.yml/badge.svg)

Sonar-PMD is a plugin that provides coding rules from [PMD](https://pmd.github.io/) for use in SonarQube.

Starting April 2022, the project has found a new home. We, [jborgers](https://github.com/jborgers) and [stokpop](https://github.com/stokpop),
Expand All @@ -9,6 +13,7 @@ For a list of all rules and their status, see: [RULES.md](https://github.com/jbo
## Installation
The plugin should be available in the SonarQube marketplace and is preferably installed from within SonarQube (Administration --> Marketplace --> Search _pmd_).

This plugin is available again from the Marketplace with the release of version 3.4.0.
Alternatively, download the [latest JAR file](https://github.com/jborgers/sonar-pmd/releases/latest), put it into the plugin directory (`./extensions/plugins`) and restart SonarQube.

## Usage
Expand All @@ -20,18 +25,20 @@ Usage should be straight forward:
Sonar-PMD analyzes the given source code with the Java source version defined in your Gradle or Maven project.
In case you are not using one of these build tools, or if that does not match the version you are using, set the `sonar.java.source` property to tell PMD which version of Java your source code complies to.

Possible values : 1.4 to 1.8/8 to 18
Possible values : 1.6 to 1.8/8 to 20-preview

## Table of supported versions
| PMD Plugin |2.5|2.6|3.0.0|3.1.x|3.2.x|3.3.x| 3.4.0 |
|-----------------------------|---|---|---|---|---|---|----------------|
| PMD |5.4.0|5.4.2|5.4.2|6.9.0|6.10.0|6.30.0| 6.45.0 |
| Max. supported Java Version | 1.7 | 1.8 | 1.8 | 11 | | 15| 18 |
| Min. SonarQube Version | 4.5.4 | 4.5.4 | 6.6 | | | 6.7| _8.9(*)_ / 9.3 |
| Sonar-PMD Plugin | 3.1.x | 3.3.x | 3.4.0 | 3.5.0 | 3.5.1 | 4.0.0 (planned) |
|------------------------|-------|--------|-----------------|---------------|---------------|-----------------|
| PMD | 6.9.0 | 6.30.0 | 6.45.0 | 6.55.0 | 6.55.0 | 7.2.0 |
| Max. Java Version | 11 | 15 | 18 | 20-preview *2 | 20-preview *2 | 22 |
| Min. SonarQube Version | 6.6 | 6.7 | _8.9(*1)_ / 9.3 | 9.8 | 9.9.4 | 10.0 |
| Max. SonarQube Version | | | 9.9 | 10.4 | 10.5+ | 10.5+ |

(*) Note: Plugin version 3.4.x runs in SonarQube 8.9, however, Java 17+ is only fully supported in SonarQube 9.3+.
(*1) Note: Plugin version 3.4.x runs in SonarQube 8.9, however, Java 17+ is only fully supported in SonarQube 9.3+.
(*2) Note: Supports all tested Java 21 features; on parsing errors, warns instead of breaks

A majority of the PMD rules have been rewritten in the Java plugin. Rewritten rules are marked "Deprecated" in the PMD plugin, but a [concise summary of replaced rules](http://dist.sonarsource.com/reports/coverage/pmd.html) is available.
A majority of the PMD rules have been rewritten in the Sonar Java plugin. Rewritten rules are marked "Deprecated" in the PMD plugin, but a [concise summary of replaced rules](http://dist.sonarsource.com/reports/coverage/pmd.html) is available.

## Rules on test
PMD tool provides some rules that can check the code of JUnit tests. Please note that these rules (and only these rules) will be applied only on the test files of your project.
Expand All @@ -42,7 +49,7 @@ Sonar-PMD is licensed under the [GNU Lesser General Public License, Version 3.0]
Parts of the rule descriptions displayed in SonarQube have been extracted from [PMD](https://pmd.github.io/) and are licensed under a [BSD-style license](https://github.com/pmd/pmd/blob/master/LICENSE).

## Build and test the plugin
To build the plugin and run the integration tests:
To build the plugin and run the integration tests (use java 11):

./mvnw clean verify


39 changes: 23 additions & 16 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,36 @@
To release a build
# Create release

- change all `x.y.z-SNAPSHOT` to `x.y.z` in all poms
- change tag `HEAD` to `x.y.z` in scm tag in parent pom
- finish and update `CHANGELOG.md`, update `..master` to `..x.y.z`
- commit and push with comment "Release x.y.z"
To create a new release, set git tag with new version number and push the tag.
The Github Actions `release.yml` will build and release to Github actions and Maven Central.

Make sure that all commits have been pushed and build
with `build.yml` workflow before setting and pushing the tag.

Steps:
- create release notes in `CHANGELOG.md`, update `..master` to `..x.y.z`; and update `README.md`
- commit both
- `git tag x.y.z`
- `git push --tags`
- use github action `release` to deploy to maven central
- release staging repo in Sonatype ui
- change all `x.y.z` in all poms to `x.y.z+1-SNAPSHOT`
- change tag `x.y.z` in scm tag in parent pom to `HEAD`

The release workflow will be triggered, using the git tag for `-Drevision=<tag>`.

- manually release staging repo in [Sonatype](https://oss.sonatype.org/#welcome) for Maven Central
- manually change Github actions release from draft to final and limit the changelog here: [releases](https://github.com/jborgers/sonar-pmd/releases)

Next prepare for next SNAPSHOT:

- change `revision` property in `x.y.z+1-SNAPSHOT` in parent pom
- prepare `CHANGELOG.md` for `x.y.z+1-SNAPSHOT`
- commit and push with comment "Prepare for release x.y.z+1-SNAPSHOT"
- commit and push with comment "Prepare release x.y.z+1-SNAPSHOT"

When release fails before "release staging in Sonatype ui"
When release fails before "release staging in Sonatype"
- drop staging repo
- `git tag -d x.y.z`
- `git push origin :refs/tags/x.y.z`
- `git tag -d x.y.z` or delete tag in IntelliJ
- `git push origin :refs/tags/x.y.z` or delete tag in context menu, delete remotes
- fix-commit-push and start release again with tagging steps above

In GitHub:

- create release from tag via Actions
- update release notes with `CHANGELOG.md` contents
- download `sonar-pmd-plugin-x.y.z.jar` and upload in release notes
- close milestone `x.y.z`
- create new milestone `x.y.z+1`

Expand Down
16 changes: 13 additions & 3 deletions integration-test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<parent>
<groupId>org.sonarsource.pmd</groupId>
<artifactId>sonar-pmd</artifactId>
<version>3.4.1-SNAPSHOT</version>
<version>${revision}</version>
</parent>

<artifactId>integration-test</artifactId>
Expand All @@ -42,13 +42,19 @@
<groupId>org.sonarsource.orchestrator</groupId>
<artifactId>sonar-orchestrator</artifactId>
</dependency>
<dependency>
<groupId>org.sonarsource.orchestrator</groupId>
<artifactId>sonar-orchestrator-junit4</artifactId>
</dependency>
<dependency>
<groupId>org.codehaus.sonar</groupId>
<artifactId>sonar-ws-client</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.sonarsource.sonarqube</groupId>
<groupId>org.sonarsource.api.plugin</groupId>
<artifactId>sonar-plugin-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>net.sourceforge.pmd</groupId>
Expand All @@ -58,13 +64,17 @@
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.12.0</version>
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.sonarsource.scanner.maven</groupId>
<artifactId>sonar-maven-plugin</artifactId>
<version>${sonar.maven.plugin.version}</version>
</plugin>
<plugin>
<groupId>org.sonarsource.sonar-packaging-maven-plugin</groupId>
<artifactId>sonar-packaging-maven-plugin</artifactId>
Expand Down
Loading