#769 - Backport Concourse CI support to 0.25.x.
Introduces pipeline that replaces the Bamboo Spring HATEOAS one which builds on master branch and deploys to artifactory. Additionally: * Tests against JDK 8 before doing the final build and deploy. * No JDK 11+ support. * Also handles pull requests.
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -5,4 +5,5 @@ target/
|
|||||||
*.iml
|
*.iml
|
||||||
.idea
|
.idea
|
||||||
*.orig
|
*.orig
|
||||||
.springBeans
|
.springBeans
|
||||||
|
credentials.yml
|
||||||
|
|||||||
BIN
.mvn/wrapper/maven-wrapper.jar
vendored
Normal file
BIN
.mvn/wrapper/maven-wrapper.jar
vendored
Normal file
Binary file not shown.
1
.mvn/wrapper/maven-wrapper.properties
vendored
Normal file
1
.mvn/wrapper/maven-wrapper.properties
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.5.0/apache-maven-3.5.0-bin.zip
|
||||||
21
.travis.yml
21
.travis.yml
@@ -1,21 +0,0 @@
|
|||||||
language: java
|
|
||||||
jdk:
|
|
||||||
- oraclejdk8
|
|
||||||
env:
|
|
||||||
matrix:
|
|
||||||
- PROFILE=non-existant
|
|
||||||
- PROFILE=spring43-next
|
|
||||||
- PROFILE=spring5
|
|
||||||
- PROFILE=spring5-next
|
|
||||||
- PROFILE=spring51
|
|
||||||
- PROFILE=spring51-next
|
|
||||||
addons:
|
|
||||||
apt:
|
|
||||||
packages:
|
|
||||||
- oracle-java8-installer
|
|
||||||
cache:
|
|
||||||
directories:
|
|
||||||
- $HOME/.m2
|
|
||||||
sudo: false
|
|
||||||
install: true
|
|
||||||
script: "mvn clean dependency:list test -P${PROFILE} -Dsort"
|
|
||||||
38
ci/README.adoc
Normal file
38
ci/README.adoc
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
== Spring HATEOAS CI
|
||||||
|
|
||||||
|
Spring HATEOAS uses Concourse as it's CI tool of choice. This provides support for:
|
||||||
|
|
||||||
|
* Pipeline against the `master` branch
|
||||||
|
* Support for pull requests
|
||||||
|
|
||||||
|
=== Creating a pipeline
|
||||||
|
|
||||||
|
Using the `fly` command, you can execute a series of commands to create multiple pipelines to manage everything. But
|
||||||
|
first, some critical credentials are needed.
|
||||||
|
|
||||||
|
Create a `credentials.yml` file like this:
|
||||||
|
|
||||||
|
[source,yml]
|
||||||
|
----
|
||||||
|
github-access-token: <your Personal Access Token from github>
|
||||||
|
docker-email: <your docker hub email address>
|
||||||
|
docker-username: <your docker hub username>
|
||||||
|
docker-password: <your docker hub password>
|
||||||
|
artifactory-username: <your artifactory username>
|
||||||
|
artifactory-password: <your artifactory encoded password>
|
||||||
|
----
|
||||||
|
|
||||||
|
WARNING: Do NOT check this file into source control! If you'll check, `credentials.yml` is listed in `.gitignore` to prevent this.
|
||||||
|
|
||||||
|
With this in place, run the following `fly` commands to create pipelines:
|
||||||
|
|
||||||
|
----
|
||||||
|
% fly -t spring-data sp -p spring-hateoas -c ci/pipeline-template.yml -l credentials.yml -v branch=master
|
||||||
|
----
|
||||||
|
|
||||||
|
With this pipeline in place, you can now activate and expose it:
|
||||||
|
|
||||||
|
----
|
||||||
|
% fly -t spring-data unpause-pipeline -p spring-hateoas
|
||||||
|
% fly -t spring-data expose-pipeline -p spring-hateoas
|
||||||
|
----
|
||||||
14
ci/build.sh
Executable file
14
ci/build.sh
Executable file
@@ -0,0 +1,14 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
[[ -d $PWD/maven && ! -d $HOME/.m2 ]] && ln -s $PWD/maven $HOME/.m2
|
||||||
|
|
||||||
|
spring_hateoas_artifactory=$(pwd)/spring-hateoas-artifactory
|
||||||
|
|
||||||
|
rm -rf $HOME/.m2/repository/org/springframework/hateoas 2> /dev/null || :
|
||||||
|
|
||||||
|
cd spring-hateoas-github
|
||||||
|
|
||||||
|
./mvnw -Pdistribute -Dmaven.test.skip=true clean deploy \
|
||||||
|
-DaltDeploymentRepository=distribution::default::file://${spring_hateoas_artifactory}
|
||||||
20
ci/build.yml
Normal file
20
ci/build.yml
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
---
|
||||||
|
platform: linux
|
||||||
|
|
||||||
|
image_resource:
|
||||||
|
type: docker-image
|
||||||
|
source:
|
||||||
|
repository: openjdk
|
||||||
|
tag: 8-jdk
|
||||||
|
|
||||||
|
inputs:
|
||||||
|
- name: spring-hateoas-github
|
||||||
|
|
||||||
|
outputs:
|
||||||
|
- name: spring-hateoas-artifactory
|
||||||
|
|
||||||
|
caches:
|
||||||
|
- path: maven
|
||||||
|
|
||||||
|
run:
|
||||||
|
path: spring-hateoas-github/ci/build.sh
|
||||||
235
ci/pipeline-template.yml
Normal file
235
ci/pipeline-template.yml
Normal file
@@ -0,0 +1,235 @@
|
|||||||
|
---
|
||||||
|
resource_types:
|
||||||
|
- name: artifactory-resource
|
||||||
|
type: docker-image
|
||||||
|
source:
|
||||||
|
repository: springio/artifactory-resource
|
||||||
|
tag: 0.0.6
|
||||||
|
|
||||||
|
- name: github-status
|
||||||
|
type: docker-image
|
||||||
|
source:
|
||||||
|
repository: dpb587/github-status-resource
|
||||||
|
tag: master
|
||||||
|
|
||||||
|
- name: pull-request
|
||||||
|
type: docker-image
|
||||||
|
source:
|
||||||
|
repository: jtarchie/pr
|
||||||
|
tag: latest
|
||||||
|
|
||||||
|
- name: slack-notification
|
||||||
|
type: docker-image
|
||||||
|
source:
|
||||||
|
repository: nebhale/slack-notification-resource
|
||||||
|
|
||||||
|
resources:
|
||||||
|
- name: openjdk:8-jdk
|
||||||
|
type: docker-image
|
||||||
|
source:
|
||||||
|
repository: openjdk
|
||||||
|
tag: 8-jdk
|
||||||
|
|
||||||
|
- name: spring-hateoas-github
|
||||||
|
type: git
|
||||||
|
source:
|
||||||
|
uri: https://github.com/spring-projects/spring-hateoas.git
|
||||||
|
branch: ((branch))
|
||||||
|
|
||||||
|
- name: spring-hateoas-artifactory
|
||||||
|
type: artifactory-resource
|
||||||
|
source:
|
||||||
|
uri: https://repo.spring.io
|
||||||
|
username: ((artifactory-username))
|
||||||
|
password: ((artifactory-password))
|
||||||
|
build_name: spring-hateoas
|
||||||
|
|
||||||
|
- name: spring-hateoas-pull-requests
|
||||||
|
type: pull-request
|
||||||
|
source:
|
||||||
|
access_token: ((github-access-token))
|
||||||
|
repo: spring-projects/spring-hateoas
|
||||||
|
base: ((branch))
|
||||||
|
|
||||||
|
- name: spring-hateoas-status
|
||||||
|
type: github-status
|
||||||
|
source:
|
||||||
|
access_token: ((github-access-token))
|
||||||
|
repository: spring-projects/spring-hateoas
|
||||||
|
branch: ((branch))
|
||||||
|
|
||||||
|
- name: slack
|
||||||
|
type: slack-notification
|
||||||
|
source:
|
||||||
|
url: ((slack))
|
||||||
|
|
||||||
|
groups:
|
||||||
|
- name: spring-hateoas
|
||||||
|
jobs:
|
||||||
|
- Test - JDK 8
|
||||||
|
- Test - JDK 8 and Spring 5.0 (snapshots)
|
||||||
|
- Test - JDK 8 and Spring 5.1 (snapshots)
|
||||||
|
- Build
|
||||||
|
- name: pull-requests
|
||||||
|
jobs:
|
||||||
|
- spring-hateoas-pull-requests
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
- name: Test - JDK 8
|
||||||
|
serial: true
|
||||||
|
public: true
|
||||||
|
plan:
|
||||||
|
- get: spring-hateoas-github
|
||||||
|
trigger: true
|
||||||
|
- get: openjdk:8-jdk
|
||||||
|
trigger: true
|
||||||
|
- task: test
|
||||||
|
file: spring-hateoas-github/ci/test.yml
|
||||||
|
params: { PROFILE: "non-existent" }
|
||||||
|
<<: *slack-failure
|
||||||
|
|
||||||
|
- name: Test - JDK 8 and Spring 5.0 (snapshots)
|
||||||
|
serial: true
|
||||||
|
public: true
|
||||||
|
plan:
|
||||||
|
- get: spring-hateoas-github
|
||||||
|
trigger: true
|
||||||
|
- get: openjdk:8-jdk
|
||||||
|
trigger: true
|
||||||
|
- task: test
|
||||||
|
file: spring-hateoas-github/ci/test.yml
|
||||||
|
params: { PROFILE: "spring5-next" }
|
||||||
|
<<: *slack-failure
|
||||||
|
|
||||||
|
- name: Test - JDK 8 and Spring 5.1 (snapshots)
|
||||||
|
serial: true
|
||||||
|
public: true
|
||||||
|
plan:
|
||||||
|
- get: spring-hateoas-github
|
||||||
|
trigger: true
|
||||||
|
- get: openjdk:8-jdk
|
||||||
|
trigger: true
|
||||||
|
- task: test
|
||||||
|
file: spring-hateoas-github/ci/test.yml
|
||||||
|
params: { PROFILE: "spring51-next" }
|
||||||
|
<<: *slack-failure
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
serial: true
|
||||||
|
public: true
|
||||||
|
plan:
|
||||||
|
- get: spring-hateoas-github
|
||||||
|
trigger: true
|
||||||
|
passed: [
|
||||||
|
Test - JDK 8,
|
||||||
|
Test - JDK 8 and Spring 5.0 (snapshots),
|
||||||
|
Test - JDK 8 and Spring 5.1 (snapshots)
|
||||||
|
]
|
||||||
|
- put: spring-hateoas-status
|
||||||
|
params:
|
||||||
|
commit: spring-hateoas-github
|
||||||
|
state: pending
|
||||||
|
- task: build
|
||||||
|
file: spring-hateoas-github/ci/build.yml
|
||||||
|
- put: spring-hateoas-artifactory
|
||||||
|
params:
|
||||||
|
build_number: ${BUILD_NAME}
|
||||||
|
build_uri: ${ATC_EXTERNAL_URL}/teams/${BUILD_TEAM_NAME}/pipelines/${BUILD_PIPELINE_NAME}/jobs/${BUILD_JOB_NAME}/builds/${BUILD_NAME}
|
||||||
|
repo: libs-snapshot-local
|
||||||
|
folder: spring-hateoas-artifactory
|
||||||
|
artifact_set:
|
||||||
|
- include:
|
||||||
|
- "/**"
|
||||||
|
properties:
|
||||||
|
archives: '*:*:*:*@zip zip.name:spring-hateoas, zip.displayname:Spring HATEOAS, zip.deployed:false'
|
||||||
|
on_failure:
|
||||||
|
aggregate:
|
||||||
|
- put: spring-hateoas-status
|
||||||
|
params:
|
||||||
|
commit: spring-hateoas-github
|
||||||
|
state: failure
|
||||||
|
- put: slack
|
||||||
|
params:
|
||||||
|
attachments:
|
||||||
|
- color: danger
|
||||||
|
fallback: "$BUILD_PIPELINE_NAME/$BUILD_JOB_NAME #$BUILD_NAME <FAILURE>"
|
||||||
|
text: "Build has failed"
|
||||||
|
title: "$BUILD_PIPELINE_NAME/$BUILD_JOB_NAME #$BUILD_NAME"
|
||||||
|
title_link: $ATC_EXTERNAL_URL/teams/$BUILD_TEAM_NAME/pipelines/$BUILD_PIPELINE_NAME/jobs/$BUILD_JOB_NAME/builds/$BUILD_NAME
|
||||||
|
on_success:
|
||||||
|
aggregate:
|
||||||
|
- put: spring-hateoas-status
|
||||||
|
params:
|
||||||
|
commit: spring-hateoas-github
|
||||||
|
state: success
|
||||||
|
- put: slack
|
||||||
|
params:
|
||||||
|
attachments:
|
||||||
|
- color: good
|
||||||
|
fallback: "$BUILD_PIPELINE_NAME/$BUILD_JOB_NAME #$BUILD_NAME <SUCCESS>"
|
||||||
|
text: "Build has succeeded!"
|
||||||
|
title: "$BUILD_PIPELINE_NAME/$BUILD_JOB_NAME #$BUILD_NAME"
|
||||||
|
title_link: $ATC_EXTERNAL_URL/teams/$BUILD_TEAM_NAME/pipelines/$BUILD_PIPELINE_NAME/jobs/$BUILD_JOB_NAME/builds/$BUILD_NAME
|
||||||
|
|
||||||
|
- name: spring-hateoas-pull-requests
|
||||||
|
public: true
|
||||||
|
plan:
|
||||||
|
- get: spring-hateoas-github
|
||||||
|
resource: spring-hateoas-pull-requests
|
||||||
|
trigger: true
|
||||||
|
version: every
|
||||||
|
- put: spring-hateoas-pull-requests
|
||||||
|
params:
|
||||||
|
path: spring-hateoas-github
|
||||||
|
status: pending
|
||||||
|
- aggregate:
|
||||||
|
- task: test (JDK 8)
|
||||||
|
file: spring-hateoas-github/ci/test.yml
|
||||||
|
params: { PROFILE: "non-existent" }
|
||||||
|
- task: test (JDK 8 and Spring 5.0 snapshots)
|
||||||
|
file: spring-hateoas-github/ci/test.yml
|
||||||
|
params: { PROFILE: "spring5-next" }
|
||||||
|
- task: test (JDK 8 and Spring 5.1 snapshots)
|
||||||
|
file: spring-hateoas-github/ci/test.yml
|
||||||
|
params: { PROFILE: "spring51-next" }
|
||||||
|
on_failure:
|
||||||
|
aggregate:
|
||||||
|
- put: spring-hateoas-pull-requests
|
||||||
|
params:
|
||||||
|
path: spring-hateoas-github
|
||||||
|
status: failure
|
||||||
|
- put: slack
|
||||||
|
params:
|
||||||
|
attachments:
|
||||||
|
- color: danger
|
||||||
|
fallback: "$BUILD_PIPELINE_NAME/$BUILD_JOB_NAME #$BUILD_NAME <FAILURE>"
|
||||||
|
text: "Pull request has failed"
|
||||||
|
title: "$BUILD_PIPELINE_NAME/$BUILD_JOB_NAME #$BUILD_NAME"
|
||||||
|
title_link: $ATC_EXTERNAL_URL/teams/$BUILD_TEAM_NAME/pipelines/$BUILD_PIPELINE_NAME/jobs/$BUILD_JOB_NAME/builds/$BUILD_NAME
|
||||||
|
on_success:
|
||||||
|
aggregate:
|
||||||
|
- put: spring-hateoas-pull-requests
|
||||||
|
params:
|
||||||
|
path: spring-hateoas-github
|
||||||
|
status: success
|
||||||
|
- put: slack
|
||||||
|
params:
|
||||||
|
attachments:
|
||||||
|
- color: good
|
||||||
|
fallback: "$BUILD_PIPELINE_NAME/$BUILD_JOB_NAME #$BUILD_NAME <SUCCESS>"
|
||||||
|
text: "Pull request has succeeded!"
|
||||||
|
title: "$BUILD_PIPELINE_NAME/$BUILD_JOB_NAME #$BUILD_NAME"
|
||||||
|
title_link: $ATC_EXTERNAL_URL/teams/$BUILD_TEAM_NAME/pipelines/$BUILD_PIPELINE_NAME/jobs/$BUILD_JOB_NAME/builds/$BUILD_NAME
|
||||||
|
|
||||||
|
slack-failure: &slack-failure
|
||||||
|
on_failure:
|
||||||
|
put: slack
|
||||||
|
params:
|
||||||
|
attachments:
|
||||||
|
- color: danger
|
||||||
|
fallback: "$BUILD_PIPELINE_NAME/$BUILD_JOB_NAME #$BUILD_NAME <FAILURE>"
|
||||||
|
text: "Test has failed"
|
||||||
|
title: "$BUILD_PIPELINE_NAME/$BUILD_JOB_NAME #$BUILD_NAME"
|
||||||
|
title_link: $ATC_EXTERNAL_URL/teams/$BUILD_TEAM_NAME/pipelines/$BUILD_PIPELINE_NAME/jobs/$BUILD_JOB_NAME/builds/$BUILD_NAME
|
||||||
|
|
||||||
|
|
||||||
11
ci/test.sh
Executable file
11
ci/test.sh
Executable file
@@ -0,0 +1,11 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
[[ -d $PWD/maven && ! -d $HOME/.m2 ]] && ln -s $PWD/maven $HOME/.m2
|
||||||
|
|
||||||
|
rm -rf $HOME/.m2/repository/org/springframework/hateoas 2> /dev/null || :
|
||||||
|
|
||||||
|
cd spring-hateoas-github
|
||||||
|
|
||||||
|
./mvnw clean dependency:list test -P${PROFILE} -Dsort
|
||||||
17
ci/test.yml
Normal file
17
ci/test.yml
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
---
|
||||||
|
platform: linux
|
||||||
|
|
||||||
|
image_resource:
|
||||||
|
type: docker-image
|
||||||
|
source:
|
||||||
|
repository: openjdk
|
||||||
|
tag: 8-jdk
|
||||||
|
|
||||||
|
inputs:
|
||||||
|
- name: spring-hateoas-github
|
||||||
|
|
||||||
|
caches:
|
||||||
|
- path: maven
|
||||||
|
|
||||||
|
run:
|
||||||
|
path: spring-hateoas-github/ci/test.sh
|
||||||
225
mvnw
vendored
Executable file
225
mvnw
vendored
Executable file
@@ -0,0 +1,225 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# ----------------------------------------------------------------------------
|
||||||
|
# Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
# or more contributor license agreements. See the NOTICE file
|
||||||
|
# distributed with this work for additional information
|
||||||
|
# regarding copyright ownership. The ASF licenses this file
|
||||||
|
# to you under the Apache License, Version 2.0 (the
|
||||||
|
# "License"); you may not use this file except in compliance
|
||||||
|
# with the License. You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing,
|
||||||
|
# software distributed under the License is distributed on an
|
||||||
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
# KIND, either express or implied. See the License for the
|
||||||
|
# specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
# ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------------------
|
||||||
|
# Maven2 Start Up Batch script
|
||||||
|
#
|
||||||
|
# Required ENV vars:
|
||||||
|
# ------------------
|
||||||
|
# JAVA_HOME - location of a JDK home dir
|
||||||
|
#
|
||||||
|
# Optional ENV vars
|
||||||
|
# -----------------
|
||||||
|
# M2_HOME - location of maven2's installed home dir
|
||||||
|
# MAVEN_OPTS - parameters passed to the Java VM when running Maven
|
||||||
|
# e.g. to debug Maven itself, use
|
||||||
|
# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
|
||||||
|
# MAVEN_SKIP_RC - flag to disable loading of mavenrc files
|
||||||
|
# ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
if [ -z "$MAVEN_SKIP_RC" ] ; then
|
||||||
|
|
||||||
|
if [ -f /etc/mavenrc ] ; then
|
||||||
|
. /etc/mavenrc
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f "$HOME/.mavenrc" ] ; then
|
||||||
|
. "$HOME/.mavenrc"
|
||||||
|
fi
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
# OS specific support. $var _must_ be set to either true or false.
|
||||||
|
cygwin=false;
|
||||||
|
darwin=false;
|
||||||
|
mingw=false
|
||||||
|
case "`uname`" in
|
||||||
|
CYGWIN*) cygwin=true ;;
|
||||||
|
MINGW*) mingw=true;;
|
||||||
|
Darwin*) darwin=true
|
||||||
|
# Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home
|
||||||
|
# See https://developer.apple.com/library/mac/qa/qa1170/_index.html
|
||||||
|
if [ -z "$JAVA_HOME" ]; then
|
||||||
|
if [ -x "/usr/libexec/java_home" ]; then
|
||||||
|
export JAVA_HOME="`/usr/libexec/java_home`"
|
||||||
|
else
|
||||||
|
export JAVA_HOME="/Library/Java/Home"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
if [ -z "$JAVA_HOME" ] ; then
|
||||||
|
if [ -r /etc/gentoo-release ] ; then
|
||||||
|
JAVA_HOME=`java-config --jre-home`
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$M2_HOME" ] ; then
|
||||||
|
## resolve links - $0 may be a link to maven's home
|
||||||
|
PRG="$0"
|
||||||
|
|
||||||
|
# need this for relative symlinks
|
||||||
|
while [ -h "$PRG" ] ; do
|
||||||
|
ls=`ls -ld "$PRG"`
|
||||||
|
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||||
|
if expr "$link" : '/.*' > /dev/null; then
|
||||||
|
PRG="$link"
|
||||||
|
else
|
||||||
|
PRG="`dirname "$PRG"`/$link"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
saveddir=`pwd`
|
||||||
|
|
||||||
|
M2_HOME=`dirname "$PRG"`/..
|
||||||
|
|
||||||
|
# make it fully qualified
|
||||||
|
M2_HOME=`cd "$M2_HOME" && pwd`
|
||||||
|
|
||||||
|
cd "$saveddir"
|
||||||
|
# echo Using m2 at $M2_HOME
|
||||||
|
fi
|
||||||
|
|
||||||
|
# For Cygwin, ensure paths are in UNIX format before anything is touched
|
||||||
|
if $cygwin ; then
|
||||||
|
[ -n "$M2_HOME" ] &&
|
||||||
|
M2_HOME=`cygpath --unix "$M2_HOME"`
|
||||||
|
[ -n "$JAVA_HOME" ] &&
|
||||||
|
JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
|
||||||
|
[ -n "$CLASSPATH" ] &&
|
||||||
|
CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
|
||||||
|
fi
|
||||||
|
|
||||||
|
# For Migwn, ensure paths are in UNIX format before anything is touched
|
||||||
|
if $mingw ; then
|
||||||
|
[ -n "$M2_HOME" ] &&
|
||||||
|
M2_HOME="`(cd "$M2_HOME"; pwd)`"
|
||||||
|
[ -n "$JAVA_HOME" ] &&
|
||||||
|
JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
|
||||||
|
# TODO classpath?
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$JAVA_HOME" ]; then
|
||||||
|
javaExecutable="`which javac`"
|
||||||
|
if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then
|
||||||
|
# readlink(1) is not available as standard on Solaris 10.
|
||||||
|
readLink=`which readlink`
|
||||||
|
if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then
|
||||||
|
if $darwin ; then
|
||||||
|
javaHome="`dirname \"$javaExecutable\"`"
|
||||||
|
javaExecutable="`cd \"$javaHome\" && pwd -P`/javac"
|
||||||
|
else
|
||||||
|
javaExecutable="`readlink -f \"$javaExecutable\"`"
|
||||||
|
fi
|
||||||
|
javaHome="`dirname \"$javaExecutable\"`"
|
||||||
|
javaHome=`expr "$javaHome" : '\(.*\)/bin'`
|
||||||
|
JAVA_HOME="$javaHome"
|
||||||
|
export JAVA_HOME
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$JAVACMD" ] ; then
|
||||||
|
if [ -n "$JAVA_HOME" ] ; then
|
||||||
|
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||||
|
# IBM's JDK on AIX uses strange locations for the executables
|
||||||
|
JAVACMD="$JAVA_HOME/jre/sh/java"
|
||||||
|
else
|
||||||
|
JAVACMD="$JAVA_HOME/bin/java"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
JAVACMD="`which java`"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -x "$JAVACMD" ] ; then
|
||||||
|
echo "Error: JAVA_HOME is not defined correctly." >&2
|
||||||
|
echo " We cannot execute $JAVACMD" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$JAVA_HOME" ] ; then
|
||||||
|
echo "Warning: JAVA_HOME environment variable is not set."
|
||||||
|
fi
|
||||||
|
|
||||||
|
CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
|
||||||
|
|
||||||
|
# traverses directory structure from process work directory to filesystem root
|
||||||
|
# first directory with .mvn subdirectory is considered project base directory
|
||||||
|
find_maven_basedir() {
|
||||||
|
|
||||||
|
if [ -z "$1" ]
|
||||||
|
then
|
||||||
|
echo "Path not specified to find_maven_basedir"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
basedir="$1"
|
||||||
|
wdir="$1"
|
||||||
|
while [ "$wdir" != '/' ] ; do
|
||||||
|
if [ -d "$wdir"/.mvn ] ; then
|
||||||
|
basedir=$wdir
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
# workaround for JBEAP-8937 (on Solaris 10/Sparc)
|
||||||
|
if [ -d "${wdir}" ]; then
|
||||||
|
wdir=`cd "$wdir/.."; pwd`
|
||||||
|
fi
|
||||||
|
# end of workaround
|
||||||
|
done
|
||||||
|
echo "${basedir}"
|
||||||
|
}
|
||||||
|
|
||||||
|
# concatenates all lines of a file
|
||||||
|
concat_lines() {
|
||||||
|
if [ -f "$1" ]; then
|
||||||
|
echo "$(tr -s '\n' ' ' < "$1")"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
BASE_DIR=`find_maven_basedir "$(pwd)"`
|
||||||
|
if [ -z "$BASE_DIR" ]; then
|
||||||
|
exit 1;
|
||||||
|
fi
|
||||||
|
|
||||||
|
export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}
|
||||||
|
echo $MAVEN_PROJECTBASEDIR
|
||||||
|
MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"
|
||||||
|
|
||||||
|
# For Cygwin, switch paths to Windows format before running java
|
||||||
|
if $cygwin; then
|
||||||
|
[ -n "$M2_HOME" ] &&
|
||||||
|
M2_HOME=`cygpath --path --windows "$M2_HOME"`
|
||||||
|
[ -n "$JAVA_HOME" ] &&
|
||||||
|
JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
|
||||||
|
[ -n "$CLASSPATH" ] &&
|
||||||
|
CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
|
||||||
|
[ -n "$MAVEN_PROJECTBASEDIR" ] &&
|
||||||
|
MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"`
|
||||||
|
fi
|
||||||
|
|
||||||
|
WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
|
||||||
|
|
||||||
|
exec "$JAVACMD" \
|
||||||
|
$MAVEN_OPTS \
|
||||||
|
-classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
|
||||||
|
"-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
|
||||||
|
${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"
|
||||||
143
mvnw.cmd
vendored
Normal file
143
mvnw.cmd
vendored
Normal file
@@ -0,0 +1,143 @@
|
|||||||
|
@REM ----------------------------------------------------------------------------
|
||||||
|
@REM Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
@REM or more contributor license agreements. See the NOTICE file
|
||||||
|
@REM distributed with this work for additional information
|
||||||
|
@REM regarding copyright ownership. The ASF licenses this file
|
||||||
|
@REM to you under the Apache License, Version 2.0 (the
|
||||||
|
@REM "License"); you may not use this file except in compliance
|
||||||
|
@REM with the License. You may obtain a copy of the License at
|
||||||
|
@REM
|
||||||
|
@REM http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
@REM
|
||||||
|
@REM Unless required by applicable law or agreed to in writing,
|
||||||
|
@REM software distributed under the License is distributed on an
|
||||||
|
@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
@REM KIND, either express or implied. See the License for the
|
||||||
|
@REM specific language governing permissions and limitations
|
||||||
|
@REM under the License.
|
||||||
|
@REM ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@REM ----------------------------------------------------------------------------
|
||||||
|
@REM Maven2 Start Up Batch script
|
||||||
|
@REM
|
||||||
|
@REM Required ENV vars:
|
||||||
|
@REM JAVA_HOME - location of a JDK home dir
|
||||||
|
@REM
|
||||||
|
@REM Optional ENV vars
|
||||||
|
@REM M2_HOME - location of maven2's installed home dir
|
||||||
|
@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
|
||||||
|
@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending
|
||||||
|
@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
|
||||||
|
@REM e.g. to debug Maven itself, use
|
||||||
|
@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
|
||||||
|
@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
|
||||||
|
@REM ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
|
||||||
|
@echo off
|
||||||
|
@REM enable echoing my setting MAVEN_BATCH_ECHO to 'on'
|
||||||
|
@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO%
|
||||||
|
|
||||||
|
@REM set %HOME% to equivalent of $HOME
|
||||||
|
if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
|
||||||
|
|
||||||
|
@REM Execute a user defined script before this one
|
||||||
|
if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
|
||||||
|
@REM check for pre script, once with legacy .bat ending and once with .cmd ending
|
||||||
|
if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat"
|
||||||
|
if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd"
|
||||||
|
:skipRcPre
|
||||||
|
|
||||||
|
@setlocal
|
||||||
|
|
||||||
|
set ERROR_CODE=0
|
||||||
|
|
||||||
|
@REM To isolate internal variables from possible post scripts, we use another setlocal
|
||||||
|
@setlocal
|
||||||
|
|
||||||
|
@REM ==== START VALIDATION ====
|
||||||
|
if not "%JAVA_HOME%" == "" goto OkJHome
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo Error: JAVA_HOME not found in your environment. >&2
|
||||||
|
echo Please set the JAVA_HOME variable in your environment to match the >&2
|
||||||
|
echo location of your Java installation. >&2
|
||||||
|
echo.
|
||||||
|
goto error
|
||||||
|
|
||||||
|
:OkJHome
|
||||||
|
if exist "%JAVA_HOME%\bin\java.exe" goto init
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo Error: JAVA_HOME is set to an invalid directory. >&2
|
||||||
|
echo JAVA_HOME = "%JAVA_HOME%" >&2
|
||||||
|
echo Please set the JAVA_HOME variable in your environment to match the >&2
|
||||||
|
echo location of your Java installation. >&2
|
||||||
|
echo.
|
||||||
|
goto error
|
||||||
|
|
||||||
|
@REM ==== END VALIDATION ====
|
||||||
|
|
||||||
|
:init
|
||||||
|
|
||||||
|
@REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
|
||||||
|
@REM Fallback to current working directory if not found.
|
||||||
|
|
||||||
|
set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
|
||||||
|
IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir
|
||||||
|
|
||||||
|
set EXEC_DIR=%CD%
|
||||||
|
set WDIR=%EXEC_DIR%
|
||||||
|
:findBaseDir
|
||||||
|
IF EXIST "%WDIR%"\.mvn goto baseDirFound
|
||||||
|
cd ..
|
||||||
|
IF "%WDIR%"=="%CD%" goto baseDirNotFound
|
||||||
|
set WDIR=%CD%
|
||||||
|
goto findBaseDir
|
||||||
|
|
||||||
|
:baseDirFound
|
||||||
|
set MAVEN_PROJECTBASEDIR=%WDIR%
|
||||||
|
cd "%EXEC_DIR%"
|
||||||
|
goto endDetectBaseDir
|
||||||
|
|
||||||
|
:baseDirNotFound
|
||||||
|
set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
|
||||||
|
cd "%EXEC_DIR%"
|
||||||
|
|
||||||
|
:endDetectBaseDir
|
||||||
|
|
||||||
|
IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig
|
||||||
|
|
||||||
|
@setlocal EnableExtensions EnableDelayedExpansion
|
||||||
|
for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
|
||||||
|
@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%
|
||||||
|
|
||||||
|
:endReadAdditionalConfig
|
||||||
|
|
||||||
|
SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
|
||||||
|
|
||||||
|
set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
|
||||||
|
set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
|
||||||
|
|
||||||
|
%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
|
||||||
|
if ERRORLEVEL 1 goto error
|
||||||
|
goto end
|
||||||
|
|
||||||
|
:error
|
||||||
|
set ERROR_CODE=1
|
||||||
|
|
||||||
|
:end
|
||||||
|
@endlocal & set ERROR_CODE=%ERROR_CODE%
|
||||||
|
|
||||||
|
if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost
|
||||||
|
@REM check for post script, once with legacy .bat ending and once with .cmd ending
|
||||||
|
if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat"
|
||||||
|
if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd"
|
||||||
|
:skipRcPost
|
||||||
|
|
||||||
|
@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
|
||||||
|
if "%MAVEN_BATCH_PAUSE%" == "on" pause
|
||||||
|
|
||||||
|
if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE%
|
||||||
|
|
||||||
|
exit /B %ERROR_CODE%
|
||||||
87
pom.xml
87
pom.xml
@@ -380,10 +380,47 @@
|
|||||||
</goals>
|
</goals>
|
||||||
</execution>
|
</execution>
|
||||||
|
|
||||||
|
<execution>
|
||||||
|
<id>package-and-attach-docs-zip</id>
|
||||||
|
<phase>package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>run</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<tasks>
|
||||||
|
<zip destfile="${project.build.directory}/${project.artifactId}-${project.version}.zip">
|
||||||
|
<fileset dir="${project.build.directory}/site"/>
|
||||||
|
</zip>
|
||||||
|
</tasks>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
|
||||||
</executions>
|
</executions>
|
||||||
|
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
|
<artifactId>build-helper-maven-plugin</artifactId>
|
||||||
|
<version>1.10</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>attach-zip</id>
|
||||||
|
<goals>
|
||||||
|
<goal>attach-artifact</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<artifacts>
|
||||||
|
<artifact>
|
||||||
|
<file>${project.build.directory}/${project.artifactId}-${project.version}.zip</file>
|
||||||
|
<type>zip</type>
|
||||||
|
</artifact>
|
||||||
|
</artifacts>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-assembly-plugin</artifactId>
|
<artifactId>maven-assembly-plugin</artifactId>
|
||||||
@@ -406,32 +443,6 @@
|
|||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.codehaus.mojo</groupId>
|
|
||||||
<artifactId>wagon-maven-plugin</artifactId>
|
|
||||||
<version>1.0</version>
|
|
||||||
<configuration>
|
|
||||||
<fromDir>${project.build.directory}</fromDir>
|
|
||||||
</configuration>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>upload-static-resources</id>
|
|
||||||
<phase>deploy</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>upload</goal>
|
|
||||||
</goals>
|
|
||||||
<configuration>
|
|
||||||
<fromDir>${project.build.directory}/static-resources</fromDir>
|
|
||||||
<includes>**</includes>
|
|
||||||
<serverId>static-dot-s2</serverId>
|
|
||||||
<url>scp://docs.af.pivotal.io</url>
|
|
||||||
<toDir>/var/www/domains/spring.io/www/htdocs/autorepo/docs/${project.artifactId}/${project.version}</toDir>
|
|
||||||
<optimize>true</optimize>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
|
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
</profile>
|
</profile>
|
||||||
@@ -635,7 +646,7 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
<version>3.7.0</version>
|
<version>3.8.0</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<source>${source.level}</source>
|
<source>${source.level}</source>
|
||||||
<target>${source.level}</target>
|
<target>${source.level}</target>
|
||||||
@@ -694,21 +705,35 @@
|
|||||||
<source>${source.level}</source>
|
<source>${source.level}</source>
|
||||||
<quiet>true</quiet>
|
<quiet>true</quiet>
|
||||||
<additionalparam>-Xdoclint:none</additionalparam>
|
<additionalparam>-Xdoclint:none</additionalparam>
|
||||||
<stylesheetfile>${shared.resources}/javadoc/spring-javadoc.css</stylesheetfile>
|
<stylesheetfile>${basedir}/src/main/javadoc/spring-javadoc.css</stylesheetfile>
|
||||||
<links>
|
<links>
|
||||||
<link>http://static.springframework.org/spring/docs/4.3.x/javadoc-api</link>
|
<link>http://static.springframework.org/spring/docs/4.3.x/javadoc-api</link>
|
||||||
<link>http://docs.oracle.com/javase/6/docs/api</link>
|
<link>http://docs.oracle.com/javase/6/docs/api</link>
|
||||||
</links>
|
</links>
|
||||||
</configuration>
|
</configuration>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>attach-javadocs</id>
|
||||||
|
<goals>
|
||||||
|
<goal>jar</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
|
<version>2.19.1</version>
|
||||||
|
<configuration>
|
||||||
|
<useSystemClassLoader>false</useSystemClassLoader>
|
||||||
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-deploy-plugin</artifactId>
|
<artifactId>maven-deploy-plugin</artifactId>
|
||||||
<version>2.8.2</version>
|
<version>2.8.2</version>
|
||||||
<configuration>
|
|
||||||
<skip>true</skip>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
||||||
</plugins>
|
</plugins>
|
||||||
|
|||||||
Reference in New Issue
Block a user