.codingstyle.5.2.0.source-code.Jenkinsfile.coverage Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of codingstyle Show documentation
Show all versions of codingstyle Show documentation
Provides all necessary resources for a Java project to enforce the coding style that I am using
in my lectures about software development at Munich University of Applied Sciences and in all of my
open source projects. It configures several static analysis tools for Maven and IntelliJ. Moreover,
it provides some sample classes that already use this style guide. This classes can be used as such but are not
required in this project. These classes also use some additional libraries that are included using the Maven
dependency mechanism. If the sample classes are deleted then the dependencies can be safely deleted, too.
The newest version!
node('java11-agent') {
stage ('Checkout') {
checkout scm
}
stage ('Git mining') {
discoverGitReferenceBuild()
mineRepository()
}
stage ('Build, Test, and Static Analysis') {
withMaven(mavenLocalRepo: '/var/data/m2repository', mavenOpts: '-Xmx768m -Xms512m') {
sh 'mvn -V -e clean verify -Dmaven.test.failure.ignore -Dgpg.skip'
}
recordIssues tools: [java(), javaDoc()], aggregatingResults: 'true', id: 'java', name: 'Java'
recordIssues tool: errorProne(), healthy: 1, unhealthy: 20
junit testResults: '**/target/*-reports/TEST-*.xml'
recordCoverage tools: [[parser: 'JACOCO']], sourceCodeRetention: 'EVERY_BUILD'
recordIssues tools: [checkStyle(pattern: 'target/checkstyle-result.xml'),
spotBugs(pattern: 'target/spotbugsXml.xml'),
pmdParser(pattern: 'target/pmd.xml'),
cpd(pattern: 'target/cpd.xml'),
taskScanner(highTags:'FIXME', normalTags:'TODO', includePattern: '**/*.java', excludePattern: 'target/**/*')],
qualityGates: [[threshold: 1, type: 'TOTAL', unstable: true]]
}
stage ('Collect Maven Warnings') {
recordIssues tool: mavenConsole()
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy