From 1e5570d9b09d80a47eab45a4901eca8c092a21a5 Mon Sep 17 00:00:00 2001 From: Andre F de Miranda Date: Wed, 8 Feb 2017 01:00:44 +1100 Subject: [PATCH] NIFI-1657 - Configure travis-ci to run mvn verify in ja_JP, fr_FR, and pt_BR This closes #1480. --- .travis.sh | 28 ++++++++++++++++++++++++++++ .travis.yml | 14 +++++++++++++- pom.xml | 3 ++- 3 files changed, 43 insertions(+), 2 deletions(-) create mode 100755 .travis.sh diff --git a/.travis.sh b/.travis.sh new file mode 100755 index 0000000000..adeae676d8 --- /dev/null +++ b/.travis.sh @@ -0,0 +1,28 @@ +#!/bin/bash +# +# 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. +# + + +# Replace variables seems to be the only option to pass proper values to surefire +# Note: The reason the sed is done as part of script is to ensure the pom hack +# won't affect the 'clean install' above +set -x +if [ "$USER_LANGUAGE" != "default" ]; then + sed -i.bak -e "s||-Duser.language=${USER_LANGUAGE} -Duser.region=${USER_REGION}|" pom.xml + diff pom.xml pom.xml.bak + rm pom.xml.bak +fi diff --git a/.travis.yml b/.travis.yml index 9399fd5544..16985b75dd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,6 +15,13 @@ language: java +env: + - USER_LANGUAGE=en USER_REGION=US' + - USER_LANGUAGE=fr USER_REGION=FR' + - USER_LANGUAGE=ja USER_REGION=JP' + - USER_LANGUAGE=pt USER_REGION=BR' + - USER_LANGUAGE=default USER_REGION=default + os: - linux @@ -35,10 +42,15 @@ before_install: - sed -e "s/^\\(127\\.0\\.0\\.1.*\\)/\\1 $(hostname | cut -c1-63)/" /etc/hosts | sudo tee /etc/hosts - sed -i.bak -e 's|https://nexus.codehaus.org/snapshots/|https://oss.sonatype.org/content/repositories/codehaus-snapshots/|g' ~/.m2/settings.xml - echo "MAVEN_OPTS='-Xmx2g -XX:+UseG1GC'" > ~/.mavenrc - - mvn apache-rat:check + - cat ~/.mavenrc + - mvn -q apache-rat:check install: - mvn -q -T 2C -DskipTests=true -Pdir-only clean install script: + # Replace variables seems to be the only option to pass proper values to surefire + # Note: The reason the sed is done as part of script is to ensure the pom hack + # won't affect the 'clean install' above + - bash .travis.sh - mvn -Pcontrib-check verify diff --git a/pom.xml b/pom.xml index 0fb3d1bac3..8a5a53f1e4 100644 --- a/pom.xml +++ b/pom.xml @@ -87,6 +87,7 @@ language governing permissions and limitations under the License. --> 1.8 1.8 3.1.0 + UTF-8 UTF-8 2014 @@ -1503,7 +1504,7 @@ language governing permissions and limitations under the License. --> **/*Spec.class true - -Xmx1G -Djava.net.preferIPv4Stack=true + -Xmx1G -Djava.net.preferIPv4Stack=true ${maven.surefire.arguments}