commit
5203756f90
8 changed files with 48 additions and 16 deletions
3
.gitmodules
vendored
3
.gitmodules
vendored
|
@ -1,3 +0,0 @@
|
|||
[submodule ".travis-support"]
|
||||
path = .travis-support
|
||||
url = https://github.com/kemitix/kemitix-travis-support.git
|
|
@ -1 +0,0 @@
|
|||
Subproject commit b97def251b784ecc8de6d3cc30d2793ac0bd375e
|
|
@ -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:
|
||||
|
|
|
@ -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
|
||||
-----
|
||||
|
||||
|
|
39
Jenkinsfile.groovy
Normal file
39
Jenkinsfile.groovy
Normal file
|
@ -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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -4,9 +4,7 @@
|
|||
<output url="file://$MODULE_DIR$/target/classes" />
|
||||
<output-test url="file://$MODULE_DIR$/target/test-classes" />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/target" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
|
|
2
pom.xml
2
pom.xml
|
@ -13,7 +13,7 @@
|
|||
|
||||
<groupId>net.kemitix</groupId>
|
||||
<artifactId>kemitix-pmd-ruleset</artifactId>
|
||||
<version>0.1.0</version>
|
||||
<version>0.2.0</version>
|
||||
|
||||
<name>Kemitix PMD Ruleset</name>
|
||||
<description>Kemitix PMD Ruleset for Java</description>
|
||||
|
|
|
@ -202,7 +202,7 @@ http://pmd.sourceforge.net/ruleset/2.0.0 ">
|
|||
<!-- only public and protected methods are required -->
|
||||
</properties>
|
||||
</rule>
|
||||
<rule ref="category/java/documentation.xml/CommentSize"/>
|
||||
<!--<rule ref="category/java/documentation.xml/CommentSize"/> - doesn't ignore headers, e.g. MIT License -->
|
||||
<rule ref="category/java/documentation.xml/UncommentedEmptyConstructor"/>
|
||||
<rule ref="category/java/documentation.xml/UncommentedEmptyMethodBody"/>
|
||||
|
||||
|
@ -218,7 +218,7 @@ http://pmd.sourceforge.net/ruleset/2.0.0 ">
|
|||
<rule ref="category/java/errorprone.xml/AvoidDecimalLiteralsInBigDecimalConstructor"/>
|
||||
<rule ref="category/java/errorprone.xml/AvoidDuplicateLiterals">
|
||||
<properties>
|
||||
<property name="maxDuplicateLiterals" value="1"/>
|
||||
<property name="maxDuplicateLiterals" value="2"/>
|
||||
</properties>
|
||||
</rule>
|
||||
<rule ref="category/java/errorprone.xml/AvoidEnumAsIdentifier"/>
|
||||
|
|
Loading…
Reference in a new issue