Backport releasing to sonatype.

Migrate all the various tweaks made to work with Sonatype.
This commit is contained in:
Greg L. Turnquist
2021-01-05 13:54:29 -06:00
parent dacd3131c6
commit c946d7febb
12 changed files with 386 additions and 408 deletions

122
Jenkinsfile vendored
View File

@@ -10,26 +10,11 @@ pipeline {
}
stages {
stage('Publish OpenJDK 8 + jq docker image') {
when {
changeset "ci/Dockerfile"
}
agent any
steps {
script {
def image = docker.build("springci/spring-session-data-mongodb-openjdk8-with-jq", "ci/")
docker.withRegistry('', 'hub.docker.com-springbuildmaster') {
image.push()
}
}
}
}
stage("Test: baseline (jdk8)") {
agent {
docker {
image 'adoptopenjdk/openjdk8:latest'
args '-v $HOME/.m2:/root/.m2'
args '-v $HOME/.m2:/tmp/jenkins-home/.m2'
}
}
steps {
@@ -42,7 +27,7 @@ pipeline {
agent {
docker {
image 'adoptopenjdk/openjdk8:latest'
args '-v $HOME/.m2:/root/.m2'
args '-v $HOME/.m2:/tmp/jenkins-home/.m2'
}
}
steps {
@@ -53,7 +38,7 @@ pipeline {
agent {
docker {
image 'adoptopenjdk/openjdk11:latest'
args '-v $HOME/.m2:/root/.m2'
args '-v $HOME/.m2:/tmp/jenkins-home/.m2'
}
}
steps {
@@ -64,7 +49,7 @@ pipeline {
agent {
docker {
image 'adoptopenjdk/openjdk11:latest'
args '-v $HOME/.m2:/root/.m2'
args '-v $HOME/.m2:/tmp/jenkins-home/.m2'
}
}
steps {
@@ -75,7 +60,7 @@ pipeline {
agent {
docker {
image 'adoptopenjdk/openjdk13:latest'
args '-v $HOME/.m2:/root/.m2'
args '-v $HOME/.m2:/tmp/jenkins-home/.m2'
}
}
steps {
@@ -86,7 +71,7 @@ pipeline {
agent {
docker {
image 'adoptopenjdk/openjdk13:latest'
args '-v $HOME/.m2:/root/.m2'
args '-v $HOME/.m2:/tmp/jenkins-home/.m2'
}
}
steps {
@@ -95,25 +80,26 @@ pipeline {
}
}
}
stage('Deploy to Artifactory') {
stage('Deploy') {
agent {
docker {
image 'adoptopenjdk/openjdk8:latest'
args '-v $HOME/.m2:/root/.m2'
image 'springci/spring-session-data-mongodb-openjdk8-with-jq:latest'
args '-v $HOME/.m2:/tmp/jenkins-home/.m2'
}
}
options { timeout(time: 20, unit: 'MINUTES') }
environment {
ARTIFACTORY = credentials('02bd1690-b54f-4c9f-819d-a77cb7a9822c')
SONATYPE = credentials('oss-login')
KEYRING = credentials('spring-signing-secring.gpg')
PASSPHRASE = credentials('spring-gpg-passphrase')
}
steps {
script {
// Warm up this plugin quietly before using it.
sh "./mvnw -q org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version"
PROJECT_VERSION = sh(
script: "./mvnw org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version -o | grep -v INFO",
script: "ci/version.sh",
returnStdout: true
).trim()
@@ -125,34 +111,31 @@ pipeline {
RELEASE_TYPE = 'release'
}
OUTPUT = sh(
script: "PROFILE=distribute,docs,${RELEASE_TYPE} ci/build.sh",
returnStdout: true
).trim()
if (RELEASE_TYPE == 'release') {
sh "PROFILE=central USERNAME=${SONATYPE_USR} PASSWORD=${SONATYPE_PSW} ci/build-and-deploy-to-maven-central.sh ${PROJECT_VERSION}"
echo "$OUTPUT"
slackSend(
color: (currentBuild.currentResult == 'SUCCESS') ? 'good' : 'danger',
channel: '#spring-session-bot',
message: "@here Spring Session for MongoDB ${PROJECT_VERSION} is staged on Sonatype awaiting closure and release.")
build_info_path = OUTPUT.split('\n')
.find { it.contains('Artifactory Build Info Recorder') }
.split('Saving Build Info to ')[1]
.trim()[1..-2]
dir(build_info_path + '/..') {
stash name: 'build_info', includes: "*.json"
} else {
sh "PROFILE=${RELEASE_TYPE} ci/build-and-deploy-to-artifactory.sh"
}
}
}
}
stage('Promote to Bintray') {
stage('Release documentation') {
when {
branch 'release-2.3'
}
agent {
docker {
image 'springci/spring-session-data-mongodb-openjdk8-with-jq:latest'
args '-v $HOME/.m2:/root/.m2'
args '-v $HOME/.m2:/tmp/jenkins-home/.m2'
}
}
options { timeout(time: 20, unit: 'MINUTES') }
environment {
ARTIFACTORY = credentials('02bd1690-b54f-4c9f-819d-a77cb7a9822c')
@@ -160,55 +143,12 @@ pipeline {
steps {
script {
// Warm up this plugin quietly before using it.
sh "./mvnw -q org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version"
PROJECT_VERSION = sh(
script: "./mvnw org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version -o | grep -v INFO",
returnStdout: true
).trim()
if (PROJECT_VERSION.endsWith('RELEASE')) {
unstash name: 'build_info'
sh "ci/promote-to-bintray.sh"
} else {
echo "${PROJECT_VERSION} is not a candidate for promotion to Bintray."
}
}
}
}
stage('Sync to Maven Central') {
when {
branch 'release-2.3'
}
agent {
docker {
image 'springci/spring-session-data-mongodb-openjdk8-with-jq:latest'
args '-v $HOME/.m2:/root/.m2'
}
}
environment {
BINTRAY = credentials('Bintray-spring-operator')
SONATYPE = credentials('oss-token')
}
steps {
script {
// Warm up this plugin quietly before using it.
sh "./mvnw -q org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version"
PROJECT_VERSION = sh(
script: "./mvnw org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version -o | grep -v INFO",
returnStdout: true
).trim()
if (PROJECT_VERSION.endsWith('RELEASE')) {
unstash name: 'build_info'
sh "ci/sync-to-maven-central.sh"
} else {
echo "${PROJECT_VERSION} is not a candidate for syncing to Maven Central."
}
sh 'MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw -Pdocs ' +
'-Dartifactory.server=https://repo.spring.io ' +
"-Dartifactory.username=${ARTIFACTORY_USR} " +
"-Dartifactory.password=${ARTIFACTORY_PSW} " +
"-Dartifactory.distribution-repository=temp-private-local " +
'deploy -B'
}
}
}

View File

@@ -1,6 +0,0 @@
FROM adoptopenjdk/openjdk8:latest
RUN apt-get update && apt-get install -y jq
RUN apt-get clean \
&& rm -rf /var/lib/apt/lists/*

View File

@@ -0,0 +1,11 @@
#!/bin/bash -x
set -euo pipefail
#
# Deploy the artifactory
#
echo 'Deploying to Artifactory...'
MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" \
./mvnw -P${PROFILE} -Dmaven.test.skip=true clean deploy -B

View File

@@ -0,0 +1,25 @@
#!/bin/bash -x
set -euo pipefail
PROJECT_VERSION=$1
#
# Stage on Maven Central
#
echo 'Staging on Maven Central...'
GNUPGHOME=/tmp/gpghome
export GNUPGHOME
mkdir $GNUPGHOME
cp $KEYRING $GNUPGHOME
MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw \
-s settings.xml \
-P${PROFILE} \
-Dmaven.test.skip=true \
-Dgpg.passphrase=${PASSPHRASE} \
-Dgpg.secretKeyring=${GNUPGHOME}/secring.gpg \
-DstagingDescription="Releasing Spring Session for MongoDB ${PROJECT_VERSION}" \
clean deploy -B

View File

@@ -1,5 +0,0 @@
#!/bin/bash
set -euo pipefail
MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/spring-session-maven-repository" ./mvnw -P${PROFILE} -Dmaven.test.skip=true clean deploy -B

View File

@@ -1,42 +0,0 @@
#!/bin/bash
set -e -u
buildName=`jq -r '.name' build-info.json`
buildNumber=`jq -r '.number' build-info.json`
groupId=`jq -r '.modules[0].id' build-info.json | sed 's/\(.*\):.*:.*/\1/'`
version=`jq -r '.modules[0].id' build-info.json | sed 's/.*:.*:\(.*\)/\1/'`
echo "Promoting ${buildName}/${buildNumber}/${groupId}/${version} to libs-release-local"
curl \
-s \
--connect-timeout 240 \
--max-time 2700 \
-u ${ARTIFACTORY_USR}:${ARTIFACTORY_PSW} \
-H 'Content-type:application/json' \
-d '{"sourceRepos": ["libs-release-local"], "targetRepo" : "spring-distributions", "async":"true"}' \
-f \
-X \
POST "https://repo.spring.io/api/build/distribute/${buildName}/${buildNumber}" > /dev/null || { echo "Failed to distribute" >&2; exit 1; }
echo "Waiting for artifacts to be published"
ARTIFACTS_PUBLISHED=false
WAIT_TIME=10
COUNTER=0
while [ $ARTIFACTS_PUBLISHED == "false" ] && [ $COUNTER -lt 120 ]; do
result=$( curl -s https://api.bintray.com/packages/spring/jars/"${groupId}" )
versions=$( echo "$result" | jq -r '.versions' )
exists=$( echo "$versions" | grep "$version" -o || true )
if [ "$exists" = "$version" ]; then
ARTIFACTS_PUBLISHED=true
fi
COUNTER=$(( COUNTER + 1 ))
sleep $WAIT_TIME
done

View File

@@ -1,23 +0,0 @@
#!/bin/bash
set -e -u
buildName=`jq -r '.name' build-info.json`
buildNumber=`jq -r '.number' build-info.json`
groupId=`jq -r '.modules[0].id' build-info.json | sed 's/\(.*\):.*:.*/\1/'`
version=`jq -r '.modules[0].id' build-info.json | sed 's/.*:.*:\(.*\)/\1/'`
echo "Synching ${buildName}/${buildNumber}/${groupId}/${version} to Maven Central..."
curl \
-s \
--connect-timeout 240 \
--max-time 2700 \
-u ${BINTRAY_USR}:${BINTRAY_PSW} \
-H 'Content-Type: application/json' \
-d "{ \"username\": \"${SONATYPE_USR}\", \"password\": \"${SONATYPE_PSW}\"}" \
-f \
-X \
POST "https://api.bintray.com/maven_central_sync/spring/jars/${groupId}/versions/${version}" > /dev/null || { echo "Failed to sync" >&2; exit 1; }
echo "Sync complete"

View File

@@ -1,5 +1,6 @@
#!/bin/bash
#!/bin/bash -x
set -euo pipefail
MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/spring-session-maven-repository" ./mvnw -P${PROFILE} clean dependency:list test -Dsort -U -B
MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" \
./mvnw -P${PROFILE} clean dependency:list test -Dsort -U -B

14
ci/version.sh Executable file
View File

@@ -0,0 +1,14 @@
#!/bin/bash
set -euo pipefail
RAW_VERSION=`MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw \
org.apache.maven.plugins:maven-help-plugin:3.2.0:evaluate \
-Dexpression=project.version -q -DforceStdout`
# Split things up
VERSION_PARTS=($RAW_VERSION)
# Grab the last part, which is the actual version number.
echo ${VERSION_PARTS[${#VERSION_PARTS[@]}-1]}

503
pom.xml
View File

@@ -139,9 +139,12 @@
</profile>
<profile>
<id>distribute</id>
<id>docs</id>
<properties>
<maven.test.skip>true</maven.test.skip>
<maven.deploy.skip>true</maven.deploy.skip>
<skipTests>true</skipTests>
<docs.resources.version>0.1.2.RELEASE</docs.resources.version>
<shared.resources>${project.build.directory}/shared-resources</shared.resources>
<generated-asciidoc-sources.directory>${project.build.directory}/generated-asciidoc-sources/source/
@@ -161,6 +164,7 @@
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
@@ -182,138 +186,6 @@
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<additionalparam>-Xdoclint:none</additionalparam>
</configuration>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.8</version>
<executions>
<execution>
<id>copy-documentation-resources</id>
<phase>generate-resources</phase>
<configuration>
<target>
<copy todir="target/site/reference/html/images">
<fileset dir="${basedir}/src/main/asciidoc" erroronmissingdir="false">
<include name="**/*.png"/>
<include name="**/*.gif"/>
<include name="**/*.jpg"/>
</fileset>
<flattenmapper/>
</copy>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
<execution>
<id>create-generated-docs-resources</id>
<phase>process-resources</phase>
<configuration>
<target>
<copy failonerror="false" todir="${generated-asciidoc-sources.directory}/">
<fileset dir="src/main/asciidoc" includes="**/*.adoc"/>
</copy>
<copy failonerror="false"
todir="${generated-asciidoc-sources.directory}/images/">
<fileset dir="src/main/asciidoc/images"/>
</copy>
<copy todir="${generated-docs.directory}">
<fileset dir="${generated-asciidoc-sources.directory}">
<include name="css/**"/>
<include name="js/**"/>
</fileset>
</copy>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
<execution>
<id>rename-reference-docs</id>
<phase>prepare-package</phase>
<configuration>
<target>
<!-- Copy files for the single-file HTML version -->
<copy failonerror="false"
todir="target/site/reference/html/images">
<fileset dir="${generated-docs.directory}/images"/>
</copy>
<!-- Copy shared resources. Spring Data ones first to override the ones shared -->
<copy failonerror="false" todir="target/site/reference/html/">
<fileset dir="${shared.resources}">
<include name="css/**"/>
<include name="js/**"/>
</fileset>
</copy>
<copy failonerror="false" todir="target/site/reference/html/">
<fileset dir="${generated-asciidoc-sources.directory}">
<include name="css/**"/>
<include name="js/**"/>
</fileset>
</copy>
<copy failonerror="false" todir="target/site/reference/html/">
<fileset dir="${generated-docs.directory}" includes="*.html"/>
</copy>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>docs</id>
<build>
<plugins>
<plugin>
<groupId>org.asciidoctor</groupId>
<artifactId>asciidoctor-maven-plugin</artifactId>
@@ -388,12 +260,37 @@
</attributes>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<additionalparam>-Xdoclint:none</additionalparam>
</configuration>
<executions>
<execution>
<id>aggregate-javadoc</id>
<goals>
<goal>aggregate</goal>
</goals>
<phase>package</phase>
<configuration>
<outputDirectory>${project.root}/target/site/apidocs</outputDirectory>
</configuration>
</execution>
<execution>
<id>attach-javadocs</id>
<goals>
@@ -402,75 +299,174 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<dependencies>
<dependency>
<groupId>ant-contrib</groupId>
<artifactId>ant-contrib</artifactId>
<version>1.0b3</version>
<exclusions>
<exclusion>
<groupId>ant</groupId>
<artifactId>ant</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant-nodeps</artifactId>
<version>1.8.1</version>
</dependency>
<dependency>
<groupId>org.tigris.antelope</groupId>
<artifactId>antelopetasks</artifactId>
<version>3.2.10</version>
</dependency>
</dependencies>
<version>1.8</version>
<executions>
<execution>
<id>package-and-attach-docs-zip</id>
<phase>package</phase>
<id>copy-documentation-resources</id>
<phase>generate-resources</phase>
<configuration>
<target>
<copy todir="target/site/reference/html/images">
<fileset dir="${basedir}/src/main/asciidoc" erroronmissingdir="false">
<include name="**/*.png"/>
<include name="**/*.gif"/>
<include name="**/*.jpg"/>
</fileset>
<flattenmapper/>
</copy>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<zip destfile="${project.build.directory}/${project.artifactId}-${project.version}.zip">
<zipfileset
src="${project.build.directory}/${project.artifactId}-${project.version}-javadoc.jar"
prefix="api"/>
<fileset dir="${project.build.directory}/site"/>
</zip>
</tasks>
</configuration>
</execution>
<execution>
<id>create-generated-docs-resources</id>
<phase>process-resources</phase>
<configuration>
<target>
<copy failonerror="false" todir="${generated-asciidoc-sources.directory}/">
<fileset dir="src/main/asciidoc" includes="**/*.adoc"/>
</copy>
<copy failonerror="false"
todir="${generated-asciidoc-sources.directory}/images/">
<fileset dir="src/main/asciidoc/images"/>
</copy>
<copy todir="${generated-docs.directory}">
<fileset dir="${generated-asciidoc-sources.directory}">
<include name="css/**"/>
<include name="js/**"/>
</fileset>
</copy>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
<execution>
<id>rename-reference-docs</id>
<phase>prepare-package</phase>
<configuration>
<target>
<!-- Copy files for the single-file HTML version -->
<copy failonerror="false"
todir="target/site/reference/html/images">
<fileset dir="${generated-docs.directory}/images"/>
</copy>
<!-- Copy shared resources. Spring Data ones first to override the ones shared -->
<copy failonerror="false" todir="target/site/reference/html/">
<fileset dir="${shared.resources}">
<include name="css/**"/>
<include name="js/**"/>
</fileset>
</copy>
<copy failonerror="false" todir="target/site/reference/html/">
<fileset dir="${generated-asciidoc-sources.directory}">
<include name="css/**"/>
<include name="js/**"/>
</fileset>
</copy>
<copy failonerror="false" todir="target/site/reference/html/">
<fileset dir="${generated-docs.directory}" includes="*.html"/>
</copy>
<!-- Copy and rename the Epub file -->
<copy failonerror="false" file="${generated-docs.directory}/index.pdf"
tofile="target/site/reference/pdf/spring-hateoas-reference.pdf"/>
<!-- Copy and rename the PDF file -->
<copy failonerror="false" file="${generated-docs.directory}/index.epub"
tofile="target/site/reference/epub/spring-hateoas-reference.epub"/>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
<!--
Creates two zip files for download as well as API and reference documentation distribution.
-->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.10</version>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<id>attach-zip</id>
<id>docs</id>
<goals>
<goal>attach-artifact</goal>
<goal>single</goal>
</goals>
<phase>package</phase>
<configuration>
<artifacts>
<artifact>
<file>
${project.build.directory}/${project.artifactId}-${project.version}.zip
</file>
<type>zip;zip.type=docs;zip.deployed=false</type>
</artifact>
</artifacts>
<descriptors>
<descriptor>src/docs/resources/assemblies/docs.xml</descriptor>
</descriptors>
<finalName>spring-session-data-mongodb-${project.version}</finalName>
<appendAssemblyId>true</appendAssemblyId>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.jfrog.buildinfo</groupId>
<artifactId>artifactory-maven-plugin</artifactId>
<version>2.6.1</version>
<executions>
<execution>
<id>deploy-docs</id>
<goals>
<goal>publish</goal>
</goals>
<phase>deploy</phase>
<configuration>
<artifactory>
<includeEnvVars>false</includeEnvVars>
</artifactory>
<deployProperties>
<zip.name>spring-session-data-mongodb-docs</zip.name>
<zip.displayname>spring-session-data-mongodb-docs</zip.displayname>
<zip.deployed>false</zip.deployed>
<zip.type>docs</zip.type>
</deployProperties>
<buildInfo>
<!-- Retain only a single build -->
<buildName>Spring Docs spring-session-data-mongodb ${project.version}</buildName>
<buildRetentionCount>1</buildRetentionCount>
</buildInfo>
<publisher>
<contextUrl>{{artifactory.server}}</contextUrl>
<username>{{artifactory.username}}</username>
<password>{{artifactory.password}}</password>
<repoKey>{{artifactory.distribution-repository}}</repoKey>
<snapshotRepoKey>{{artifactory.distribution-repository}}</snapshotRepoKey>
<includePatterns>*-docs.zip</includePatterns>
</publisher>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
@@ -495,13 +491,6 @@
<buildInfo>
<buildUrl>{{BUILD_URL}}</buildUrl>
</buildInfo>
<deployProperties>
<zip.name>spring-session-data-mongodb</zip.name>
<zip.displayname>spring-session-data-mongodb</zip.displayname>
<zip.deployed>false</zip.deployed>
<zip.type>docs</zip.type>
<archives>*:*:*:*@zip</archives>
</deployProperties>
<publisher>
<contextUrl>https://repo.spring.io</contextUrl>
<username>{{ARTIFACTORY_USR}}</username>
@@ -537,13 +526,6 @@
<buildInfo>
<buildUrl>{{BUILD_URL}}</buildUrl>
</buildInfo>
<deployProperties>
<zip.name>spring-session-data-mongodb</zip.name>
<zip.displayname>spring-session-data-mongodb</zip.displayname>
<zip.deployed>false</zip.deployed>
<zip.type>docs</zip.type>
<archives>*:*:*:*@zip</archives>
</deployProperties>
<publisher>
<contextUrl>https://repo.spring.io</contextUrl>
<username>{{ARTIFACTORY_USR}}</username>
@@ -560,47 +542,94 @@
</profile>
<profile>
<id>release</id>
<id>central</id>
<build>
<pluginManagement>
<plugins>
<!-- Sign JARs -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
<configuration>
<gpgArguments>
<arg>--pinentry-mode</arg>
<arg>loopback</arg>
</gpgArguments>
</configuration>
</execution>
</executions>
</plugin>
<!-- Deploy to Sonatype OSS Nexus -->
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.8</version>
<extensions>true</extensions>
<configuration>
<serverId>sonatype</serverId>
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>false</autoReleaseAfterClose>
<keepStagingRepositoryOnFailure>true</keepStagingRepositoryOnFailure>
<skipStagingRepositoryClose>true</skipStagingRepositoryClose>
</configuration>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.jfrog.buildinfo</groupId>
<artifactId>artifactory-maven-plugin</artifactId>
<version>2.6.1</version>
<inherited>false</inherited>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<additionalparam>-Xdoclint:none</additionalparam>
</configuration>
<executions>
<execution>
<id>build-info</id>
<id>attach-javadocs</id>
<goals>
<goal>publish</goal>
<goal>jar</goal>
</goals>
<configuration>
<buildInfo>
<buildUrl>{{BUILD_URL}}</buildUrl>
</buildInfo>
<deployProperties>
<zip.name>spring-session-data-mongodb</zip.name>
<zip.displayname>spring-session-data-mongodb</zip.displayname>
<zip.deployed>false</zip.deployed>
<zip.type>docs</zip.type>
<archives>*:*:*:*@zip</archives>
</deployProperties>
<publisher>
<contextUrl>https://repo.spring.io</contextUrl>
<username>{{ARTIFACTORY_USR}}</username>
<password>{{ARTIFACTORY_PSW}}</password>
<repoKey>libs-release-local</repoKey>
<snapshotRepoKey>libs-release-local</snapshotRepoKey>
</publisher>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
<distributionManagement>
<repository>
<id>sonatype</id>
<url>https://s01.oss.sonatype.org//service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>
</profile>
</profiles>
@@ -865,16 +894,22 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.6</version>
<version>3.0.2</version>
<configuration>
<useDefaultManifestFile>true</useDefaultManifestFile>
<archive>
<manifestEntries>
<Implementation-Title>${project.name}</Implementation-Title>
<Implementation-Version>${project.version}</Implementation-Version>
<Automatic-Module-Name>${java-module-name}</Automatic-Module-Name>
</manifestEntries>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.4</version>
<version>3.0.1</version>
<executions>
<execution>
<id>attach-sources</id>
@@ -905,12 +940,18 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.1</version>
<version>3.0.0-M3</version>
<configuration>
<useSystemClassLoader>false</useSystemClassLoader>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
</plugin>
</plugins>
</build>
@@ -937,9 +978,9 @@
</repositories>
<scm>
<url>https://github.com/spring-projects/spring-session-mongodb</url>
<connection>scm:git:git://github.com/spring-projects/spring-session-mongodb.git</connection>
<developerConnection>scm:git:ssh://git@github.com:spring-projects/spring-session-mongodb.git
<url>https://github.com/spring-projects/spring-session-data-mongodb</url>
<connection>scm:git:git://github.com/spring-projects/spring-session-data-mongodb.git</connection>
<developerConnection>scm:git:ssh://git@github.com:spring-projects/spring-session-data-mongodb.git
</developerConnection>
</scm>

View File

@@ -1,16 +1,11 @@
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
https://maven.apache.org/xsd/settings-1.0.0.xsd">
<servers>
<server>
<id>sonatype-nexus-snapshots</id>
<username>${env.USERNAME}</username>
<password>${env.PASSWORD}</password>
</server>
<server>
<id>sonatype-nexus-staging</id>
<id>sonatype</id>
<username>${env.USERNAME}</username>
<password>${env.PASSWORD}</password>
</server>

View File

@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 https://maven.apache.org/xsd/assembly-1.1.2.xsd">
<id>docs</id>
<formats>
<format>dir</format>
<format>zip</format>
</formats>
<includeBaseDirectory>false</includeBaseDirectory>
<fileSets>
<fileSet>
<!--
Adds reference manual (html and pdf) to the distribution archive
under the 'docs/reference' directory see pom.xml 'maven-javadoc-plugin' declaration.
-->
<directory>target/site/reference</directory>
<outputDirectory>reference</outputDirectory>
</fileSet>
<fileSet>
<!--
Adds javadoc html to the distribution archive under the 'docs/javadoc'
directory see pom.xml 'maven-javadoc-plugin' declaration.
-->
<directory>target/site/apidocs</directory>
<outputDirectory>api</outputDirectory>
</fileSet>
</fileSets>
</assembly>