Skip to content

Commit 43b147d

Browse files
committed
[Build] Use build stages
By using build stages we can test all jdk versions before deploying the artifacts. This allows all artifacts to be build on jdk8, simplifying the build configuration.
1 parent 2c6c594 commit 43b147d

File tree

2 files changed

+17
-11
lines changed

2 files changed

+17
-11
lines changed

.editorconfig

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ charset = utf-8
88
indent_style = space
99
indent_size = 4
1010

11-
[*.feature]
11+
[*.{feature, yml}]
1212
indent_style = space
1313
indent_size = 2

.travis.yml

+16-10
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
language: java
33

4-
# get us on the new container based builds, we're not using any fancyness
4+
# Use container based builds. They are faster and we do not need sudo.
55
sudo: false
66

77
before_install:
@@ -16,16 +16,22 @@ cache:
1616
directories:
1717
- $HOME/.m2
1818

19-
matrix:
19+
jdk:
20+
- openjdk7
21+
- oraclejdk7
22+
- oraclejdk8
23+
24+
25+
# Stage 0: Test - Builds against all jdks
26+
script: mvn -q install
27+
28+
29+
jobs:
2030
include:
21-
- jdk: openjdk7
22-
script: mvn -q install
23-
- jdk: oraclejdk7
24-
script: mvn -q install
25-
after_success: mvn -q deploy --settings .travis-settings.xml -Dno.gem.deploy=true -DskipTests=true -Dmaven.javadoc.skip=true
26-
- jdk: oraclejdk8
27-
script: mvn -q install -P java8
28-
after_success: mvn -q deploy -P java8 -pl java8 --settings .travis-settings.xml -DskipTests=true -Dmaven.javadoc.skip=true
31+
# Stage 1: Deploy - Builds and deploys all artifacts with java 8.
32+
- stage: deploy
33+
jdk: oraclejdk8
34+
script: mvn -q deploy --settings .travis-settings.xml -Dno.gem.deploy=true -DskipTests=true -Dmaven.javadoc.skip=true
2935

3036
env:
3137
global:

0 commit comments

Comments
 (0)