diff --git a/.travis.settings.xml b/.travis.settings.xml
new file mode 100644
index 0000000000..dffe7fbfe1
--- /dev/null
+++ b/.travis.settings.xml
@@ -0,0 +1,10 @@
+
+
+
+
+ alfresco-public
+ ${env.MAVEN_USERNAME}
+ ${env.MAVEN_PASSWORD}
+
+
+
diff --git a/.travis.yml b/.travis.yml
index 84acc903ee..4bf0d36dd4 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -15,9 +15,14 @@ branches:
install: travis_retry mvn install -DskipTests=true -B -V
-matrix:
+stages:
+ - test
+ - release
+
+jobs:
include:
- - name: "Build and test"
+ - stage: test
+ name: "Build and test"
script: travis_retry mvn test
- name: "WhiteSource scan"
# only on support branches or master and if it is not a PR
@@ -26,4 +31,14 @@ matrix:
# Download the latest version of WhiteSource Unified Agent
- curl -LJO https://github.com/whitesource/unified-agent-distribution/raw/master/standAlone/wss-unified-agent.jar
# Run WhiteSource Unified Agent
- - java -jar wss-unified-agent.jar -apiKey ${WHITESOURCE_API_KEY} -c .wss-unified-agent.config
\ No newline at end of file
+ - java -jar wss-unified-agent.jar -apiKey ${WHITESOURCE_API_KEY} -c .wss-unified-agent.config
+ - stage: release
+ name: "Push to Nexus"
+ if: fork = false AND branch = master AND type != pull_request AND commit_message !~ /\[no-release\]/
+ before_install:
+ - "cp .travis.settings.xml $HOME/.m2/settings.xml"
+ script:
+ # Use full history for release
+ - git checkout -B "${TRAVIS_BRANCH}"
+ # Skip building of release commits
+ - mvn --batch-mode -q -DscmCommentPrefix="[maven-release-plugin][skip ci] " -Dusername="${GIT_USERNAME}" -Dpassword="${GIT_PASSWORD}" -DskipTests -Darguments=-DskipTests release:clean release:prepare release:perform
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index 77c08c699b..a512910dac 100644
--- a/pom.xml
+++ b/pom.xml
@@ -20,18 +20,15 @@
- alfresco-internal
+ alfresco-public
https://artifacts.alfresco.com/nexus/content/repositories/releases
-
- alfresco-internal-snapshots
- https://artifacts.alfresco.com/nexus/content/repositories/snapshots
-
5.0.4.RELEASE
6.8
+ 11