diff --git a/tools/travis/downloadDeps.sh b/tools/travis/downloadDeps.sh index b4617ec7f1e..c05e5f5bb03 100755 --- a/tools/travis/downloadDeps.sh +++ b/tools/travis/downloadDeps.sh @@ -85,7 +85,10 @@ cat deps.out | LANG=C sort -u > cleandeps.out #Define index of pomfiles, to avoid duplicate deps with different versions in pom.xml, several poms are created in case of more than one version of same artifact LASTPOM=0 -echo '4.0.0org.apache.cloudstacktravis-build-depsDownload Deps for Travis CI1mido-maven-public-releasesmido-maven-public-releaseshttp://cs-maven.midokura.com/releasesjuniper-contrailhttp://juniper.github.io/contrail-maven/snapshots' > pom${LASTPOM}.xml +#Create first pom +echo '4.0.0org.apache.cloudstacktravis-build-depsDownload Deps for Travis CI1' > pom${LASTPOM}.xml +#Create pom for dependencies not on central repo, this is done separately to not adversely impact performance on downloading the majority of deps +echo '4.0.0org.apache.cloudstacktravis-build-depsDownload Deps for Travis CI1mido-maven-public-releasesmido-maven-public-releaseshttp://cs-maven.midokura.com/releasesjuniper-contrailhttp://juniper.github.io/contrail-maven/snapshots' > pomX.xml while read line ; do set -- $line #This relies on correct sorting, and distributes different versions of same dependency througout different pom files @@ -95,16 +98,21 @@ while read line ; do if [[ $POMID -gt $LASTPOM ]]; then LASTPOM=$POMID #This outputs the necessary structure to start a pom and also defines the extra repositories - echo '4.0.0org.apache.cloudstacktravis-build-depsDownload Deps for Travis CI1mido-maven-public-releasesmido-maven-public-releaseshttp://cs-maven.midokura.com/releasesjuniper-contrailhttp://juniper.github.io/contrail-maven/snapshots' > pom${LASTPOM}.xml + echo '4.0.0org.apache.cloudstacktravis-build-depsDownload Deps for Travis CI1' > pom${LASTPOM}.xml fi else POMID=0 fi LASTARTIFACT=$2 - echo "$1$2$3" >> pom${POMID}.xml + if [[ $1 == org.midonet ]] || [[ $1 == net.juniper* ]]; then + echo "$1$2$3" >> pomX.xml + else + echo "$1$2$3" >> pom${POMID}.xml + fi done < cleandeps.out RETURN_CODE=0 +#Close and resolve all pom files for ((i=0;i<=$LASTPOM;i++)) do echo "" >> pom${i}.xml @@ -113,6 +121,9 @@ do RETURN_CODE=1 fi done +#Close and resolve external deps pom file +echo "" >> pomX.xml +mvn org.apache.maven.plugins:maven-dependency-plugin:resolve -f pomX.xml #Run a few plugin goals to download some more deps