From aaf0dd7b0fd7a23eaf0fbbf41a5f6113956c8058 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Tue, 20 Feb 2018 21:12:42 +0000 Subject: [PATCH 1/8] version set to 0.2.0-SNAPSHOT --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 384de1a..91e3902 100644 --- a/pom.xml +++ b/pom.xml @@ -13,7 +13,7 @@ net.kemitix kemitix-pmd-ruleset - 0.1.0 + 0.2.0-SNAPSHOT Kemitix PMD Ruleset Kemitix PMD Ruleset for Java From 6b8ad01865a37ffd3e4874166499476c34e7e5c1 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Wed, 7 Mar 2018 18:56:55 +0000 Subject: [PATCH 2/8] Update iml --- kemitix-pmd-ruleset.iml | 2 -- 1 file changed, 2 deletions(-) diff --git a/kemitix-pmd-ruleset.iml b/kemitix-pmd-ruleset.iml index 8d8ffd9..e20ad44 100644 --- a/kemitix-pmd-ruleset.iml +++ b/kemitix-pmd-ruleset.iml @@ -4,9 +4,7 @@ - - From 76e95080bf94748c975e43ee9f42b5e3f1590de9 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Wed, 7 Mar 2018 18:59:14 +0000 Subject: [PATCH 3/8] jenkins: add jenkinsfile --- Jenkinsfile.groovy | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 Jenkinsfile.groovy diff --git a/Jenkinsfile.groovy b/Jenkinsfile.groovy new file mode 100644 index 0000000..14588d2 --- /dev/null +++ b/Jenkinsfile.groovy @@ -0,0 +1,39 @@ +final String mvn = "mvn --batch-mode --update-snapshots" + +pipeline { + agent any + stages { + stage('no SNAPSHOT in master') { + // checks that the pom version is not a snapshot when the current branch is master + // TODO: also check for SNAPSHOT when is a pull request with master as the target branch + when { + expression { + (env.GIT_BRANCH == 'master') && + (readMavenPom(file: 'pom.xml').version).contains("SNAPSHOT") } + } + steps { + error("Build failed because SNAPSHOT version") + } + } + stage('Build') { + steps { + withMaven(maven: 'maven 3.5.2', jdk: 'JDK 9') { + sh 'mvn clean install' + } + } + } + stage('Archiving') { + steps { + archiveArtifacts '**/classes/**/*.xml' + } + } + stage('Deploy') { + when { expression { (env.GIT_BRANCH == 'master') } } + steps { + withMaven(maven: 'maven 3.5.2', jdk: 'JDK 1.8') { + sh "${mvn} deploy --activate-profiles release -DskipTests=true" + } + } + } + } +} From 027370947c96b374ff7f53aceb22dfb14cdbde06 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Wed, 7 Mar 2018 18:59:53 +0000 Subject: [PATCH 4/8] travis: remove deploy --- .gitmodules | 3 --- .travis-support | 1 - .travis.yml | 7 ------- 3 files changed, 11 deletions(-) delete mode 100644 .gitmodules delete mode 160000 .travis-support diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index c50d110..0000000 --- a/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule ".travis-support"] - path = .travis-support - url = https://github.com/kemitix/kemitix-travis-support.git diff --git a/.travis-support b/.travis-support deleted file mode 160000 index b97def2..0000000 --- a/.travis-support +++ /dev/null @@ -1 +0,0 @@ -Subproject commit b97def251b784ecc8de6d3cc30d2793ac0bd375e diff --git a/.travis.yml b/.travis.yml index 1c099f3..108fbc8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,10 +6,3 @@ cache: - "$HOME/.m2" install: true script: "./mvnw --batch-mode --errors --update-snapshots clean install" -deploy: - provider: script - script: sh .travis-support/deploy.sh - on: - branch: master -env: - global: From 85f6932b35acfea616312c6fff137480e4f9871c Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Wed, 7 Mar 2018 18:14:03 +0000 Subject: [PATCH 5/8] disable CommentSize rule It didn't work with the MIT Licence. --- src/main/resources/net/kemitix/pmd/java.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/net/kemitix/pmd/java.xml b/src/main/resources/net/kemitix/pmd/java.xml index 03f5c25..970503b 100644 --- a/src/main/resources/net/kemitix/pmd/java.xml +++ b/src/main/resources/net/kemitix/pmd/java.xml @@ -202,7 +202,7 @@ http://pmd.sourceforge.net/ruleset/2.0.0 "> - + From 2993cdc950fc8831c7de54a6985adcb6e7346ff6 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Wed, 7 Mar 2018 18:14:48 +0000 Subject: [PATCH 6/8] AvoidDuplicateLiterals.maxDuplicateLiterals: max is the too much value, not the max allowed --- src/main/resources/net/kemitix/pmd/java.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/net/kemitix/pmd/java.xml b/src/main/resources/net/kemitix/pmd/java.xml index 970503b..bc68e99 100644 --- a/src/main/resources/net/kemitix/pmd/java.xml +++ b/src/main/resources/net/kemitix/pmd/java.xml @@ -218,7 +218,7 @@ http://pmd.sourceforge.net/ruleset/2.0.0 "> - + From 6df709894e2ac34978d18df2ef10f3b6767127d9 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Wed, 7 Mar 2018 19:12:47 +0000 Subject: [PATCH 7/8] version: set to 0.2.0 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 91e3902..3ecdd76 100644 --- a/pom.xml +++ b/pom.xml @@ -13,7 +13,7 @@ net.kemitix kemitix-pmd-ruleset - 0.2.0-SNAPSHOT + 0.2.0 Kemitix PMD Ruleset Kemitix PMD Ruleset for Java From 665ca80aa9a7e203c2cf838e4c50a47d36a9a71b Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Wed, 7 Mar 2018 19:15:51 +0000 Subject: [PATCH 8/8] CHANGELOG --- CHANGELOG | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index 4cd599a..a486d43 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,12 @@ CHANGELOG ========= +0.2.0 +----- + +* Disable `CommentSize` - didn't agree with MIT License headers +* Relaxed `AvoidDuplicateLiterals.maxDuplicateLiterals` - value is when to fail, not the max allowed + 0.1.0 -----