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: 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 ----- 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" + } + } + } + } +} 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 @@ - - diff --git a/pom.xml b/pom.xml index 384de1a..3ecdd76 100644 --- a/pom.xml +++ b/pom.xml @@ -13,7 +13,7 @@ net.kemitix kemitix-pmd-ruleset - 0.1.0 + 0.2.0 Kemitix PMD Ruleset Kemitix PMD Ruleset for Java diff --git a/src/main/resources/net/kemitix/pmd/java.xml b/src/main/resources/net/kemitix/pmd/java.xml index 03f5c25..bc68e99 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 "> - + @@ -218,7 +218,7 @@ http://pmd.sourceforge.net/ruleset/2.0.0 "> - +