Use the nexus staging plugin for release

This commit is contained in:
Endolf 2018-05-25 19:50:59 +01:00
parent 12496a9fbb
commit 544e00cd5c
2 changed files with 6 additions and 18 deletions

8
Jenkinsfile vendored
View file

@ -130,8 +130,12 @@ pipeline {
globalMavenSettingsConfig: 'global-maven-settings-ossrh',
mavenOpts: '-Djavax.net.ssl.trustStore=/etc/ssl/certs/java/cacerts' //Work around for JDK9 missing cacerts
) {
sh "mvn -P windows,linux,osx,wintab versions:set -DremoveSnapshot"
sh "mvn -P windows,linux,osx,wintab versions:set -DnextSnapshot"
sh "mvn -P windows,linux,osx,wintab,release versions:set -DremoveSnapshot"
VERSION_TAG = sh(script: "mvn -Dexpression=project.version help:evaluate | grep -e '^[[:digit:]]'", returnStdout: true).trim()
sh "git tag -a ${VERSION_TAG} -m 'Release tag ${VERSION_TAG}'"
sh "mvn -P windows,linux,osx,wintab -Dmaven.antrun.skip -Dmaven.test.skip -DskipTests -DskipITs deploy"
sh "mvn -P windows,linux,osx,wintab,release versions:set -DnextSnapshot"
sh "git commit -m 'Next development release' ."
}
}
}

16
pom.xml
View file

@ -139,18 +139,6 @@
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.5.3</version>
<configuration>
<autoVersionSubmodules>true</autoVersionSubmodules>
<useReleaseProfile>false</useReleaseProfile>
<releaseProfiles>release</releaseProfiles>
<goals>deploy</goals>
<tagNameFormat>@{project.version}</tagNameFormat>
</configuration>
</plugin>
</plugins>
</pluginManagement>
<plugins>
@ -186,10 +174,6 @@
<autoReleaseAfterClose>false</autoReleaseAfterClose>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
</plugin>
</plugins>
</build>
</profile>