Skip to content

Commit

Permalink
NIFI-1657 - Configure travis-ci to run mvn verify in ja_JP, fr_FR, an…
Browse files Browse the repository at this point in the history
…d pt_BR

This closes apache#1480.
  • Loading branch information
trixpan authored and pvillard31 committed Feb 11, 2017
1 parent 5cfba6a commit 1e5570d
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 2 deletions.
28 changes: 28 additions & 0 deletions .travis.sh
Original file line number Diff line number Diff line change
@@ -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|<maven\.surefire\.arguments/>|<maven\.surefire\.arguments>-Duser.language=${USER_LANGUAGE} -Duser.region=${USER_REGION}</maven\.surefire\.arguments>|" pom.xml
diff pom.xml pom.xml.bak
rm pom.xml.bak
fi
14 changes: 13 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
3 changes: 2 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ language governing permissions and limitations under the License. -->
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.min-version>3.1.0</maven.min-version>
<maven.surefire.arguments/>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<inceptionYear>2014</inceptionYear>
Expand Down Expand Up @@ -1503,7 +1504,7 @@ language governing permissions and limitations under the License. -->
<include>**/*Spec.class</include>
</includes>
<redirectTestOutputToFile>true</redirectTestOutputToFile>
<argLine combine.children="append">-Xmx1G -Djava.net.preferIPv4Stack=true</argLine>
<argLine combine.children="append">-Xmx1G -Djava.net.preferIPv4Stack=true ${maven.surefire.arguments}</argLine>
</configuration>
<dependencies>
<dependency>
Expand Down

0 comments on commit 1e5570d

Please sign in to comment.