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:18 UTC
[22/24] git commit: updated refs/heads/master to 6fd49e4
Some of the plugin dependencies were'nt being properly resolved on the dependency:resolve-plugins mojo This adds a couple more dark magic sprinkles to make sure no dependencies will be downloaded at build time
Signed-off-by: Daan Hoogland <da...@onecht.net>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/0d671b9e
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/0d671b9e
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/0d671b9e
Branch: refs/heads/master
Commit: 0d671b9e54e19a4ed10215983857848052bc7cc6
Parents: 358157f
Author: Rafael da Fonseca <rs...@gmail.com>
Authored: Sat Jun 20 18:19:48 2015 +0200
Committer: Daan Hoogland <da...@onecht.net>
Committed: Sun Jun 21 15:13:27 2015 +0200
----------------------------------------------------------------------
tools/travis/before_install.sh | 2 +-
tools/travis/downloadDeps.sh | 12 +++++++++---
2 files changed, 10 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0d671b9e/tools/travis/before_install.sh
----------------------------------------------------------------------
diff --git a/tools/travis/before_install.sh b/tools/travis/before_install.sh
index e9bcb33..5f04c79 100755
--- a/tools/travis/before_install.sh
+++ b/tools/travis/before_install.sh
@@ -97,7 +97,7 @@ done
echo -e "\nDownloading Plugin dependencies"
for ((i=0;i<$RETRY_COUNT;i++))
do
- mvn org.apache.maven.plugins:maven-dependency-plugin:resolve-plugins > /dev/null
+ 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"
break;
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0d671b9e/tools/travis/downloadDeps.sh
----------------------------------------------------------------------
diff --git a/tools/travis/downloadDeps.sh b/tools/travis/downloadDeps.sh
index ae53028..c7d60a2 100755
--- a/tools/travis/downloadDeps.sh
+++ b/tools/travis/downloadDeps.sh
@@ -42,9 +42,15 @@ for line in $(find ../../ -name pom.xml -exec sed -n '/<dependencies>/{:a;n;/<\/
done
-#For some reason, travis seems to be using surefire plugin 2.14.2
-echo "<dependency><groupId>org.apache.maven.plugins</groupId><artifactId>maven-surefire-plugin</artifactId><version>2.12.4</version></dependency>" >> pom.xml
-echo "<dependency><groupId>com.google.guava</groupId><artifactId>guava</artifactId><version>10.0.1</version></dependency>" >> pom.xml
+#Add the resolved plugins to properly download their dependencies
+while read line ; do
+ NAME=$(echo $line | sed -e 's/.jar$//')
+ VERSION=${NAME##*-}
+ ARTIFACT=${NAME%-*}
+ GROUP=$(find ~/.m2/repository -name ${NAME}.pom -exec sed -n "1,/${ARTIFACT}/p" {} \; | tac | grep -m 1 -e "<groupId>" | sed -e 's/^[[:space:]]*//' | tr -d '\r')
+ DATA="<dependency>${GROUP}<artifactId>${ARTIFACT}</artifactId><version>${VERSION}</version></dependency>"
+ echo $DATA >> pom.xml
+done < /tmp/resolvedPlugins
#Finish dummy pom
echo "</dependencies></project>" >> pom.xml