From fee9eb4fc320faa2b64f629be989a15d45cace25 Mon Sep 17 00:00:00 2001 From: Ruslan Ibragimov Date: Fri, 2 Dec 2016 19:59:27 +0300 Subject: [PATCH 1/6] Disable logs in all modules. Provide property for passing log level in tests. --- .travis.yml | 6 +++--- cayenne-server/src/test/resources/simplelogger.properties | 7 ------- pom.xml | 6 ++++++ 3 files changed, 9 insertions(+), 10 deletions(-) delete mode 100644 cayenne-server/src/test/resources/simplelogger.properties diff --git a/.travis.yml b/.travis.yml index 7a0a05a598..306b2173e0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,4 @@ -# Since 4GB not enought for build, we use 'sudo' environment with 7.5GB RAM +# Since 4GB not enough for build, we use 'sudo' environment with 7.5GB RAM # Downside: It's starts a little bit slower # How to fix: Change build setting or fix code. # https://docs.travis-ci.com/user/ci-environment/#Virtualization-environments @@ -15,9 +15,9 @@ jdk: - oraclejdk7 script: - - mvn verify -q -DcayenneTestConnection=$DB_PROFILE + - mvn verify -q -DcayenneTestConnection=$DB_PROFILE -DcayenneLogLevel=ERROR -# prevent Travis from uneeded "mvn install" run +# prevent Travis from unneeded "mvn install" run install: /bin/true cache: diff --git a/cayenne-server/src/test/resources/simplelogger.properties b/cayenne-server/src/test/resources/simplelogger.properties deleted file mode 100644 index 5c5a4a8c0e..0000000000 --- a/cayenne-server/src/test/resources/simplelogger.properties +++ /dev/null @@ -1,7 +0,0 @@ -# SLF4J's SimpleLogger configuration file -# Simple implementation of Logger that sends all enabled log messages, for all defined loggers, to System.err. - -# Default logging detail level for all instances of SimpleLogger. -# Must be one of ("trace", "debug", "info", "warn", or "error"). -# If not specified, defaults to "info". -org.slf4j.simpleLogger.defaultLogLevel=error diff --git a/pom.xml b/pom.xml index dd7b689086..1577a37778 100644 --- a/pom.xml +++ b/pom.xml @@ -890,12 +890,18 @@ cayenneJdbcDriver ${cayenneJdbcDriver} + ${cayenneLogLevel} org.apache.maven.plugins maven-failsafe-plugin + + + ${cayenneLogLevel} + + maven-resources-plugin From 3c3c95c735a5dea09073ecc7cb71f88883a71941 Mon Sep 17 00:00:00 2001 From: Ruslan Ibragimov Date: Tue, 6 Dec 2016 16:41:39 +0300 Subject: [PATCH 2/6] Add licence. --- .travis.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.travis.yml b/.travis.yml index 306b2173e0..b7490100b4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,18 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + # Since 4GB not enough for build, we use 'sudo' environment with 7.5GB RAM # Downside: It's starts a little bit slower # How to fix: Change build setting or fix code. From 4b5fcb29428d08dd166ca3f66a0230783dce07d2 Mon Sep 17 00:00:00 2001 From: Ruslan Ibragimov Date: Tue, 6 Dec 2016 17:47:11 +0300 Subject: [PATCH 3/6] Consistent names of profiles. Enable docker builds on CI. --- .travis.yml | 2 ++ pom.xml | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index b7490100b4..4908e8803d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,6 +24,8 @@ env: - DB_PROFILE=hsql - DB_PROFILE=h2 - DB_PROFILE=derby + - DB_PROFILE=mysql-docker + - DB_PROFILE=postgres-docker jdk: - oraclejdk8 diff --git a/pom.xml b/pom.xml index 1577a37778..d73ba4fda4 100644 --- a/pom.xml +++ b/pom.xml @@ -1428,7 +1428,7 @@ cayenneTestConnection - postgresdocker + postgres-docker From d5fa54288406c82d856900c4b86b830ce025ae7a Mon Sep 17 00:00:00 2001 From: Ruslan Ibragimov Date: Tue, 6 Dec 2016 17:49:12 +0300 Subject: [PATCH 4/6] Enable docker on travis. --- .travis.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.travis.yml b/.travis.yml index 4908e8803d..fcea25fbf3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,6 +18,10 @@ # How to fix: Change build setting or fix code. # https://docs.travis-ci.com/user/ci-environment/#Virtualization-environments sudo: required + +services: + - docker + language: java env: From 4d1d721c44bd7c68ec2da4bf1afef363e6a2af1a Mon Sep 17 00:00:00 2001 From: Ruslan Ibragimov Date: Tue, 6 Dec 2016 17:53:22 +0300 Subject: [PATCH 5/6] Consistent names of profiles. --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d73ba4fda4..a77c5f9063 100644 --- a/pom.xml +++ b/pom.xml @@ -1424,7 +1424,7 @@ - postgresdocker + postgres-docker cayenneTestConnection From 9e20c550ca9873fd54af7068009fbaa9048b79b9 Mon Sep 17 00:00:00 2001 From: Ruslan Ibragimov Date: Tue, 6 Dec 2016 19:34:45 +0300 Subject: [PATCH 6/6] Connection properties for mysql in docker. --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index a77c5f9063..ae73ef6839 100644 --- a/pom.xml +++ b/pom.xml @@ -1352,7 +1352,7 @@ org.apache.cayenne.dba.mysql.MySQLAdapter root - jdbc:mysql://${db.host}:${db.port}/cayenne + jdbc:mysql://${db.host}:${db.port}/cayenne?useUnicode=true&characterEncoding=UTF-8&generateSimpleParameterMetadata=true com.mysql.jdbc.Driver