You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by da...@apache.org on 2015/06/21 15:14:17 UTC
[21/24] git commit: updated refs/heads/master to 6fd49e4
Add apache license header to script
Signed-off-by: Daan Hoogland <da...@onecht.net>
This closes #482
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/6fd49e49
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/6fd49e49
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/6fd49e49
Branch: refs/heads/master
Commit: 6fd49e49a3c70c57355eeeb8af2656528da596e1
Parents: 4f098a1
Author: Rafael da Fonseca <rs...@gmail.com>
Authored: Sun Jun 21 04:35:14 2015 +0200
Committer: Daan Hoogland <da...@onecht.net>
Committed: Sun Jun 21 15:13:27 2015 +0200
----------------------------------------------------------------------
tools/travis/before_install.sh | 3 +++
tools/travis/downloadDeps.sh | 27 +++++++++++++++++++++++++--
2 files changed, 28 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6fd49e49/tools/travis/before_install.sh
----------------------------------------------------------------------
diff --git a/tools/travis/before_install.sh b/tools/travis/before_install.sh
index 69646a7..b0d33a1 100755
--- a/tools/travis/before_install.sh
+++ b/tools/travis/before_install.sh
@@ -97,6 +97,7 @@ done
echo -e "\nDownloading Plugin dependencies"
for ((i=0;i<$RETRY_COUNT;i++))
do
+ #The output file is used on the next phase by the downloadDeps.sh script
mvn org.apache.maven.plugins:maven-dependency-plugin:resolve-plugins | grep "Plugin Resolved:" | sort -u | awk '{print $4}' | tee /tmp/resolvedPlugins
if [[ $? -eq 0 ]]; then
echo -e "\nPlugin dependencies downloaded successfully"
@@ -120,9 +121,11 @@ do
break;
fi
echo -e "\nDependency download failed"
+ #Print out errors from failed run
cat /tmp/phase2 | grep -i -e "fail" -e "error" -e "exception"
#Test DNS record
getent hosts repo1.maven.org
while ! nc -vzw 5 repo1.maven.org 80; do echo -e "\nFailed to connect to repo1.maven.org:80 will retry in 10 seconds"; sleep 10; done
+ echo -e "\nRetrying download"
done
cd ../..
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6fd49e49/tools/travis/downloadDeps.sh
----------------------------------------------------------------------
diff --git a/tools/travis/downloadDeps.sh b/tools/travis/downloadDeps.sh
index 5d9a033..b4617ec 100755
--- a/tools/travis/downloadDeps.sh
+++ b/tools/travis/downloadDeps.sh
@@ -1,4 +1,26 @@
#!/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.
+#
+# This script should be used to install additional dependencies
+# This includes: installing ubuntu packages, custom services
+# or internet downloads.
+
+# Authored by Rafael da Fonseca <rs...@gmail.com>
#Get all dependency blocks from all pom.xml files in the project
for line in $(find ../../ -name pom.xml -exec sed -n '/<dependencies>/{:a;n;/<\/dependencies>/b;p;ba}' {} \; | grep -e "artifactId" -e "groupId" -e "version" -e "dependency\>" -e "exclusion\>" -e "exclusions\>"| sed -e 's/\^M//'); do
@@ -7,7 +29,6 @@ for line in $(find ../../ -name pom.xml -exec sed -n '/<dependencies>/{:a;n;/<\/
set -- $(echo $line | awk -v FS="(>|<)" '{print $2, $3}')
#Start processing data
-
if [[ $1 == "dependency" ]]; then
#Create new artifact dep
unset ARTIFACT
@@ -18,10 +39,12 @@ for line in $(find ../../ -name pom.xml -exec sed -n '/<dependencies>/{:a;n;/<\/
if [[ $GROUP != *org.apache.cloudstack* ]] && [[ $GROUP != *com.cloud* ]] && [[ $ARTIFACT != cloudstack-service-console-proxy-rdpclient ]]; then
if [[ -z $VERSION ]] ; then
VERSION=LATEST
+ #These dependencies don't support the LATEST keywork for some reason, and would cause mvn runs to file on dummy poms
if [[ $GROUP == jstl ]] || [[ $ARTIFACT == mysql-connector-java ]] || [[ $GROUP == org.apache.axis ]]; then
continue
fi
fi
+ #Output resolved dependency to a file, to be picked up later
echo "$GROUP $ARTIFACT $VERSION" >> deps.out
fi
elif [[ $1 == "version" ]]; then
@@ -89,7 +112,6 @@ do
if [[ $? -ne 0 ]]; then
RETURN_CODE=1
fi
-
done
#Run a few plugin goals to download some more deps
@@ -113,6 +135,7 @@ do
done < <(grep $PLUGIN cleandeps.out)
done
echo "Running $JOBS"
+#Call all the constructed plugin goals
mvn $JOBS -f pom0.xml
if [[ $? -ne 0 ]]; then
RETURN_CODE=1