From f5a38373d4e774aa8d5a5ec81c270935c1ecaa68 Mon Sep 17 00:00:00 2001 From: devezhao Date: Thu, 31 Jan 2019 17:43:10 +0800 Subject: [PATCH] CI --- .travis.yml | 22 +++++++++++-------- pom.xml | 6 ++--- .../java/com/rebuild/server/Application.java | 2 +- .../java/com/rebuild/server/TestSupport.java | 1 + 4 files changed, 18 insertions(+), 13 deletions(-) diff --git a/.travis.yml b/.travis.yml index 536ac93ea..e5e3a92ec 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,18 +1,22 @@ -language: java sudo: false -script: mvn clean install -DskipTests=false -B -V +language: java +jdk: + - oraclejdk8 +script: mvn cobertura:cobertura -DskipTests=false services: - mysql -# - redis + - redis -before_install: +#branches: +# only: +# - master + +before_script: - mysql -e "CREATE DATABASE rebuild10 DEFAULT CHARSET utf8 COLLATE utf8_general_ci;" - mysql -e "CREATE USER 'rebuild'@'127.0.0.1' IDENTIFIED BY 'rebuild'; GRANT ALL PRIVILEGES ON rebuild10.* TO 'rebuild'@'127.0.0.1'; FLUSH PRIVILEGES;" - mysql -D rebuild10 < .setup/mysql-init.sql -#script: "mvn cobertura:cobertura" -#after_success: -# - bash <(curl -s https://codecov.io/bash) - -# IN RESEARCH ... +# codecov +after_success: + - bash <(curl -s https://codecov.io/bash) diff --git a/pom.xml b/pom.xml index d04633788..748078860 100644 --- a/pom.xml +++ b/pom.xml @@ -2,7 +2,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> 4.0.0 - + com.rebuild rebuild war @@ -10,7 +10,7 @@ rebuild Building your system free! https://getrebuild.com/ - + GitHub https://github.com/getrebuild/rebuild/issues @@ -22,7 +22,7 @@ true 4.3.21.RELEASE - + rebuild diff --git a/src/main/java/com/rebuild/server/Application.java b/src/main/java/com/rebuild/server/Application.java index 10151350c..bd183ca4f 100644 --- a/src/main/java/com/rebuild/server/Application.java +++ b/src/main/java/com/rebuild/server/Application.java @@ -129,8 +129,8 @@ public final class Application { * @return */ public static ApplicationContext debug() { - debugMode = true; if (APPLICATION_CTX == null) { + debugMode = true; LOG.info("Rebuild Booting in DEBUG mode ..."); long at = System.currentTimeMillis(); ApplicationContext ctx = new ClassPathXmlApplicationContext(new String[] { "application-ctx.xml" }); diff --git a/src/test/java/com/rebuild/server/TestSupport.java b/src/test/java/com/rebuild/server/TestSupport.java index 1735f3090..d32560469 100644 --- a/src/test/java/com/rebuild/server/TestSupport.java +++ b/src/test/java/com/rebuild/server/TestSupport.java @@ -39,6 +39,7 @@ import cn.devezhao.persist4j.Entity; public class TestSupport { static { + // See log4j.properties System.setProperty("catalina.home", System.getProperty("java.io.tmpdir")); }