Skip to content

Commit

Permalink
fix clean maven builds in Jenkinsfile
Browse files Browse the repository at this point in the history
  • Loading branch information
joker234 committed Mar 19, 2021
1 parent 61161ab commit 884f0ae
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ pipeline {
}

// warnings plugin
rtMaven.run pom: 'pom.xml', goals: '--batch-mode -V -e compile checkstyle:checkstyle pmd:pmd pmd:cpd com.github.spotbugs:spotbugs-maven-plugin:3.1.7:spotbugs -Dmaven.repo.local=.m2'
rtMaven.run pom: 'pom.xml', goals: '--batch-mode -V -e clean compile checkstyle:checkstyle pmd:pmd pmd:cpd com.github.spotbugs:spotbugs-maven-plugin:3.1.7:spotbugs -Dmaven.repo.local=.m2'

recordIssues enabledForFailure: true, tools: [mavenConsole(), java(), javaDoc()]
recordIssues enabledForFailure: true, tool: checkStyle()
Expand All @@ -109,7 +109,7 @@ pipeline {
steps {
script {
withCredentials([string(credentialsId: 'gpg-signing-key-passphrase', variable: 'PASSPHRASE')]) {
buildInfo = rtMaven.run pom: 'pom.xml', goals: 'clean javadoc:jar source:jar package -P sign,git -Dmaven.repo.local=.m2 -Dgpg.passphrase=$PASSPHRASE -DskipTests=true'
buildInfo = rtMaven.run pom: 'pom.xml', goals: 'clean compile javadoc:jar source:jar install -P sign,git -Dmaven.repo.local=.m2 -Dgpg.passphrase=$PASSPHRASE -DskipTests=true'
}
rtMaven.deployer.deployArtifacts buildInfo
server.publishBuildInfo buildInfo
Expand All @@ -132,7 +132,7 @@ pipeline {
steps {
script {
withCredentials([string(credentialsId: 'gpg-signing-key-passphrase', variable: 'PASSPHRASE')]) {
buildInfo = rtMaven.run pom: 'pom.xml', goals: 'clean javadoc:jar source:jar package -P sign,git -Dmaven.repo.local=.m2 -Dgpg.passphrase=$PASSPHRASE -DskipTests=true'
buildInfo = rtMaven.run pom: 'pom.xml', goals: 'clean compile javadoc:jar source:jar install -P sign,git -Dmaven.repo.local=.m2 -Dgpg.passphrase=$PASSPHRASE -DskipTests=true'
}
rtMaven.deployer.deployArtifacts buildInfo
server.publishBuildInfo buildInfo
Expand All @@ -142,7 +142,7 @@ pipeline {
file(credentialsId: 'ossrh-settings', variable: 'settingsFile'),
string(credentialsId: 'gpg-signing-key-passphrase', variable: 'PASSPHRASE')
]) {
sh 'mvn clean -s $settingsFile javadoc:jar source:jar deploy -P sign,git,deploy-central -Dmaven.repo.local=.m2 -Dgpg.passphrase=$PASSPHRASE -DskipTests=true'
sh 'mvn clean compile -s $settingsFile javadoc:jar source:jar deploy -P sign,git,deploy-central -Dmaven.repo.local=.m2 -Dgpg.passphrase=$PASSPHRASE -DskipTests=true'
}
}
post {
Expand Down Expand Up @@ -259,7 +259,7 @@ pipeline {
echo date_pre.format( 'yyyyMMdd' )
date_now = new Date(currentBuild.rawBuild.getStartTimeInMillis()).clearTime()
echo date_now.format( 'yyyyMMdd' )
return date_pre.numberAwareCompareTo(date_now)<0
return date_pre.numberAwareCompareTo(date_now) < 0
}
return false
}
Expand Down

0 comments on commit 884f0ae

Please sign in to comment.