Backport releasing to sonatype.
Migrate all the various tweaks made to work with Sonatype.
This commit is contained in:
123
Jenkinsfile
vendored
123
Jenkinsfile
vendored
@@ -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,30 @@ 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"
|
||||
|
||||
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"
|
||||
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.")
|
||||
} else {
|
||||
sh "PROFILE=${RELEASE_TYPE} ci/build-and-deploy-to-artifactory.sh"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Promote to Bintray') {
|
||||
stage('Release documentation') {
|
||||
when {
|
||||
branch 'release-2.2'
|
||||
}
|
||||
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 +142,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.2'
|
||||
}
|
||||
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'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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/*
|
||||
11
ci/build-and-deploy-to-artifactory.sh
Executable file
11
ci/build-and-deploy-to-artifactory.sh
Executable 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
|
||||
25
ci/build-and-deploy-to-maven-central.sh
Executable file
25
ci/build-and-deploy-to-maven-central.sh
Executable 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
|
||||
@@ -1,5 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
./mvnw -P${PROFILE} -Dmaven.test.skip=true clean deploy -B
|
||||
@@ -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
|
||||
@@ -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"
|
||||
@@ -1,5 +1,6 @@
|
||||
#!/bin/bash
|
||||
#!/bin/bash -x
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
./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
14
ci/version.sh
Executable 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]}
|
||||
|
||||
506
pom.xml
506
pom.xml
@@ -139,10 +139,128 @@
|
||||
</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/
|
||||
</generated-asciidoc-sources.directory>
|
||||
<generated-docs.directory>${project.build.directory}/generated-docs</generated-docs.directory>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>io.spring.docresources</groupId>
|
||||
<artifactId>spring-doc-resources</artifactId>
|
||||
<version>${docs.resources.version}</version>
|
||||
<type>zip</type>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>unpack-doc-resources</id>
|
||||
<goals>
|
||||
<goal>unpack-dependencies</goal>
|
||||
</goals>
|
||||
<phase>generate-resources</phase>
|
||||
<configuration>
|
||||
<includeGroupIds>io.spring.docresources</includeGroupIds>
|
||||
<includeArtifactIds>spring-doc-resources</includeArtifactIds>
|
||||
<includeTypes>zip</includeTypes>
|
||||
<excludeTransitive>true</excludeTransitive>
|
||||
<outputDirectory>${generated-asciidoc-sources.directory}</outputDirectory>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.asciidoctor</groupId>
|
||||
<artifactId>asciidoctor-maven-plugin</artifactId>
|
||||
<version>2.0.0-RC.1</version>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.jruby</groupId>
|
||||
<artifactId>jruby</artifactId>
|
||||
<version>9.2.6.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.asciidoctor</groupId>
|
||||
<artifactId>asciidoctorj</artifactId>
|
||||
<version>2.0.0-RC.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.asciidoctor</groupId>
|
||||
<artifactId>asciidoctorj-pdf</artifactId>
|
||||
<version>1.5.0-alpha.16</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.asciidoctor</groupId>
|
||||
<artifactId>asciidoctorj-epub3</artifactId>
|
||||
<version>1.5.0-alpha.8.1</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>output-html</id>
|
||||
<phase>compile</phase>
|
||||
<goals>
|
||||
<goal>process-asciidoc</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<sourceDirectory>${generated-asciidoc-sources.directory}</sourceDirectory>
|
||||
<outputDirectory>${generated-docs.directory}</outputDirectory>
|
||||
<backend>html5</backend>
|
||||
<doctype>book</doctype>
|
||||
<sourceHighlighter>highlight.js</sourceHighlighter>
|
||||
<attributes>
|
||||
<highlightjsdir>js/highlight</highlightjsdir>
|
||||
<highlightjs-theme>atom-one-dark-reasonable</highlightjs-theme>
|
||||
<linkcss>true</linkcss>
|
||||
<sectanchors>true</sectanchors>
|
||||
<stylesdir>./css</stylesdir>
|
||||
<stylesheet>spring.css</stylesheet>
|
||||
<toc>left</toc>
|
||||
<github-tag>v${project.version}</github-tag>
|
||||
<code-dir>${basedir}</code-dir>
|
||||
<samples-dir>
|
||||
https://raw.githubusercontent.com/spring-projects/spring-session-data-mongodb-examples/master
|
||||
</samples-dir>
|
||||
<spring-session-version>${spring-session.version}</spring-session-version>
|
||||
</attributes>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<doctype>book</doctype>
|
||||
<attributes>
|
||||
<doctype>book</doctype>
|
||||
<docinfo>shared</docinfo>
|
||||
<icons>font</icons>
|
||||
<sectids>false</sectids>
|
||||
<imagesdir>images</imagesdir>
|
||||
<version>${project.version}</version>
|
||||
<projectName>${project.name}</projectName>
|
||||
<projectVersion>${project.version}</projectVersion>
|
||||
<allow-uri-read>true</allow-uri-read>
|
||||
<toclevels>4</toclevels>
|
||||
<numbered>true</numbered>
|
||||
</attributes>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-source-plugin</artifactId>
|
||||
@@ -163,56 +281,15 @@
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>attach-javadocs</id>
|
||||
<id>aggregate-javadoc</id>
|
||||
<goals>
|
||||
<goal>jar</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
|
||||
<profile>
|
||||
<id>docs</id>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.asciidoctor</groupId>
|
||||
<artifactId>asciidoctor-maven-plugin</artifactId>
|
||||
<version>1.5.3</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>output-html</id>
|
||||
<phase>generate-resources</phase>
|
||||
<goals>
|
||||
<goal>process-asciidoc</goal>
|
||||
<goal>aggregate</goal>
|
||||
</goals>
|
||||
<phase>package</phase>
|
||||
<configuration>
|
||||
<sourceDirectory>${basedir}/src/main/asciidoc</sourceDirectory>
|
||||
<outputDirectory>${project.build.directory}/content/reference/htmlsingle</outputDirectory>
|
||||
<backend>html</backend>
|
||||
<doctype>book</doctype>
|
||||
<attributes>
|
||||
<allow-uri-read>true</allow-uri-read>
|
||||
<docinfo>true</docinfo>
|
||||
<github-tag>v${project.version}</github-tag>
|
||||
<code-dir>${basedir}</code-dir>
|
||||
<samples-dir>https://raw.githubusercontent.com/spring-projects/spring-session-data-mongodb-examples/master</samples-dir>
|
||||
<spring-session-version>${spring-session.version}</spring-session-version>
|
||||
</attributes>
|
||||
<outputDirectory>${project.root}/target/site/apidocs</outputDirectory>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<configuration>
|
||||
<additionalparam>-Xdoclint:none</additionalparam>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>attach-javadocs</id>
|
||||
<goals>
|
||||
@@ -221,71 +298,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}/content"/>
|
||||
</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>
|
||||
@@ -310,13 +490,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>
|
||||
@@ -352,13 +525,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>
|
||||
@@ -375,47 +541,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>
|
||||
|
||||
@@ -686,16 +899,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>
|
||||
@@ -726,12 +945,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>
|
||||
|
||||
@@ -756,9 +981,10 @@
|
||||
</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</developerConnection>
|
||||
<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>
|
||||
|
||||
</project>
|
||||
|
||||
11
settings.xml
11
settings.xml
@@ -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>
|
||||
|
||||
27
src/docs/resources/assemblies/docs.xml
Normal file
27
src/docs/resources/assemblies/docs.xml
Normal 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>
|
||||
Reference in New Issue
Block a user