From 0d671b9e54e19a4ed10215983857848052bc7cc6 Mon Sep 17 00:00:00 2001 From: Rafael da Fonseca Date: Sat, 20 Jun 2015 18:19:48 +0200 Subject: [PATCH] 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 --- tools/travis/before_install.sh | 2 +- tools/travis/downloadDeps.sh | 12 +++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/tools/travis/before_install.sh b/tools/travis/before_install.sh index e9bcb3372d2..5f04c79d95b 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; diff --git a/tools/travis/downloadDeps.sh b/tools/travis/downloadDeps.sh index ae53028b1b1..c7d60a26e81 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 '//{:a;n;/<\/ done -#For some reason, travis seems to be using surefire plugin 2.14.2 -echo "org.apache.maven.pluginsmaven-surefire-plugin2.12.4" >> pom.xml -echo "com.google.guavaguava10.0.1" >> 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 "" | sed -e 's/^[[:space:]]*//' | tr -d '\r') + DATA="${GROUP}${ARTIFACT}${VERSION}" + echo $DATA >> pom.xml +done < /tmp/resolvedPlugins #Finish dummy pom echo "" >> pom.xml