Skip to content

Commit 6ebc23b

Browse files
committed
Merge pull request #487 from hazendaz/master
Reworking builds
2 parents f35e2db + 004a94e commit 6ebc23b

File tree

6 files changed

+71
-12
lines changed

6 files changed

+71
-12
lines changed

.travis.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,15 @@
11
language: java
22
sudo: false
3+
34
jdk:
45
- oraclejdk8
56
- oraclejdk7
67
- openjdk7
78
- openjdk6
8-
after_success:
9-
- "mvn clean"
10-
- "git clone -b travis `git config --get remote.origin.url` target/travis"
11-
- "mvn deploy -Dmaven.test.skip=true --settings target/travis/settings.xml"
129

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

1714
env:
1815
global:

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ MYBATIS Data Mapper Framework
22
=============================
33

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

pom.xml

Lines changed: 6 additions & 4 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 2009-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</artifactId>
@@ -137,7 +138,7 @@
137138
<dependency>
138139
<groupId>ognl</groupId>
139140
<artifactId>ognl</artifactId>
140-
<version>3.0.11</version>
141+
<version>3.1</version>
141142
<scope>compile</scope>
142143
<optional>true</optional>
143144
<exclusions>
@@ -172,6 +173,7 @@
172173
<version>1.2.17</version>
173174
<optional>true</optional>
174175
</dependency>
176+
<!-- Don't upgrade to 2.4+ until mybatis switches to java 7 -->
175177
<dependency>
176178
<groupId>org.apache.logging.log4j</groupId>
177179
<artifactId>log4j-core</artifactId>
@@ -201,7 +203,7 @@
201203
<dependency>
202204
<groupId>org.hsqldb</groupId>
203205
<artifactId>hsqldb</artifactId>
204-
<version>2.3.2</version>
206+
<version>2.3.3</version>
205207
<scope>test</scope>
206208
</dependency>
207209
<dependency>

src/test/java/org/apache/ibatis/type/JdbcTypeTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2015 the original author or authors.
2+
* Copyright 2009-2015 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

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/mybatis-3.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)