Skip to content

Commit 170b257

Browse files
committed
Merge pull request #82 from hazendaz/master
Reworking builds
2 parents 0f05f5f + 758537a commit 170b257

File tree

5 files changed

+73
-12
lines changed

5 files changed

+73
-12
lines changed

.travis.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
language: java
2+
sudo: false
3+
24
jdk:
35
- oraclejdk8
46
- oraclejdk7
57
- openjdk7
68
- openjdk6
7-
after_success:
8-
- "git clone -b travis `git config --get remote.origin.url` target/travis"
9-
- "mvn deploy --settings target/travis/settings.xml"
109

11-
branches:
12-
except:
13-
- travis
10+
after_success:
11+
- chmod -R 777 ./travis/after_success.sh
12+
- ./travis/after_success.sh
1413

1514
env:
1615
global:

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@ MyBatis Spring Adapter
22
======================
33

44
[![Build Status](https://travis-ci.org/mybatis/spring.svg?branch=master)](https://travis-ci.org/mybatis/spring)
5+
[![Coverage Status](https://coveralls.io/repos/mybatis/spring/badge.svg?branch=master&service=github)](https://coveralls.io/github/mybatis/spring?branch=master)
6+
[![Dependency Status](https://www.versioneye.com/user/projects/5619b698a193340f2f000520/badge.svg?style=flat)](https://www.versioneye.com/user/projects/5619b698a193340f2f000520)
57
[![Maven central](https://maven-badges.herokuapp.com/maven-central/org.mybatis/mybatis-spring/badge.svg)](https://maven-badges.herokuapp.com/maven-central/org.mybatis/mybatis-spring)
8+
[![Apache 2](http://img.shields.io/badge/license-Apache%202-red.svg)](http://www.apache.org/licenses/LICENSE-2.0)
69

710
![mybatis-spring](http://mybatis.github.io/images/mybatis-logo.png)
811

pom.xml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?xml version="1.0" encoding="UTF-8"?>
1+
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
33
Copyright 2010-2015 the original author or authors.
44
@@ -20,7 +20,8 @@
2020
<parent>
2121
<groupId>org.mybatis</groupId>
2222
<artifactId>mybatis-parent</artifactId>
23-
<version>25</version>
23+
<version>26-SNAPSHOT</version>
24+
<relativePath />
2425
</parent>
2526

2627
<artifactId>mybatis-spring</artifactId>
@@ -102,7 +103,7 @@
102103
<gcu.product>Spring</gcu.product>
103104
<osgi.import>org.springframework.batch.*;resolution:=optional,*</osgi.import>
104105
<osgi.dynamicImport>*</osgi.dynamicImport>
105-
<spring.version>3.2.13.RELEASE</spring.version>
106+
<spring.version>3.2.14.RELEASE</spring.version>
106107
</properties>
107108

108109
<dependencies>
@@ -130,7 +131,7 @@
130131
<dependency>
131132
<groupId>org.springframework.batch</groupId>
132133
<artifactId>spring-batch-infrastructure</artifactId>
133-
<version>3.0.4.RELEASE</version>
134+
<version>3.0.5.RELEASE</version>
134135
<scope>provided</scope>
135136
</dependency>
136137

@@ -153,7 +154,7 @@
153154
<dependency>
154155
<groupId>ognl</groupId>
155156
<artifactId>ognl</artifactId>
156-
<version>3.0.11</version>
157+
<version>3.1</version>
157158
<scope>test</scope>
158159
</dependency>
159160

@@ -188,7 +189,7 @@
188189
<dependency>
189190
<groupId>org.hsqldb</groupId>
190191
<artifactId>hsqldb</artifactId>
191-
<version>2.3.2</version>
192+
<version>2.3.3</version>
192193
<scope>test</scope>
193194
</dependency>
194195

travis/after_success.sh

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
#!/bin/bash
2+
3+
# Get Project Repo
4+
mybatis_repo=$(git config --get remote.origin.url 2>&1)
5+
echo "Repo detected: ${mybatis_repo}"
6+
7+
# Get the Java version.
8+
# Java 1.5 will give 15.
9+
# Java 1.6 will give 16.
10+
# Java 1.7 will give 17.
11+
# Java 1.8 will give 18.
12+
VER=`java -version 2>&1 | sed 's/java version "\(.*\)\.\(.*\)\..*"/\1\2/; 1q'`
13+
echo "Java detected: ${VER}"
14+
15+
# We build for several JDKs on Travis.
16+
# Some actions, like analyzing the code (Coveralls) and uploading
17+
# artifacts on a Maven repository, should only be made for one version.
18+
19+
# If the version is 1.6, then perform the following actions.
20+
# 1. Upload artifacts to Sonatype.
21+
# 2. Use -q option to only display Maven errors and warnings.
22+
# 3. Use --settings to force the usage of our "settings.xml" file.
23+
24+
# If the version is 1.7, then perform the following actions.
25+
# 1. Notify Coveralls.
26+
# 2. Deploy site
27+
# 3. Use -q option to only display Maven errors and warnings.
28+
29+
if [ "$mybatis_repo" == "https://github.com/mybatis/spring.git" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_BRANCH" == "master" ]; then
30+
if [ $VER == "16" ]; then
31+
mvn clean deploy -q --settings ./travis/settings.xml
32+
echo -e "Successfully deployed SNAPSHOT artifacts to Sonatype under Travis job ${TRAVIS_JOB_NUMBER}"
33+
elif [ $VER == "17" ]; then
34+
mvn clean test jacoco:report coveralls:report -q
35+
echo -e "Successfully ran coveralls under Travis job ${TRAVIS_JOB_NUMBER}"
36+
# various issues exist currently in building this so comment for now
37+
# mvn site site:deploy -q
38+
# echo -e "Successfully deploy site under Travis job ${TRAVIS_JOB_NUMBER}"
39+
fi
40+
else
41+
echo "Travis build skipped"
42+
fi

travis/settings.xml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.1.0 http://maven.apache.org/xsd/settings-1.1.0.xsd">
4+
<servers>
5+
<server>
6+
<id>ossrh</id>
7+
<username>${env.CI_DEPLOY_USERNAME}</username>
8+
<password>${env.CI_DEPLOY_PASSWORD}</password>
9+
</server>
10+
<server>
11+
<id>gh-pages</id>
12+
<username>git</username>
13+
<password>${env.CI_SITE_PASSWORD}</password>
14+
</server>
15+
</servers>
16+
</settings>

0 commit comments

Comments
 (0)