You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bh...@apache.org on 2015/06/26 00:00:57 UTC

git commit: updated refs/heads/master to bdd42a4

Repository: cloudstack
Updated Branches:
  refs/heads/master c0bf00c56 -> bdd42a415


Reduce script running time around 80% This resolves the performance penalty introduced by adding the midonet repo

Signed-off-by: Rohit Yadav <ro...@shapeblue.com>

This closes #530


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/bdd42a41
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/bdd42a41
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/bdd42a41

Branch: refs/heads/master
Commit: bdd42a4157a65c2cb02233adfd99f5ebba98c571
Parents: c0bf00c
Author: Rafael da Fonseca <rs...@gmail.com>
Authored: Thu Jun 25 16:57:51 2015 +0200
Committer: Rohit Yadav <ro...@shapeblue.com>
Committed: Fri Jun 26 00:00:13 2015 +0200

----------------------------------------------------------------------
 tools/travis/downloadDeps.sh | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bdd42a41/tools/travis/downloadDeps.sh
----------------------------------------------------------------------
diff --git a/tools/travis/downloadDeps.sh b/tools/travis/downloadDeps.sh
index b4617ec..c05e5f5 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 '<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"><modelVersion>4.0.0</modelVersion><groupId>org.apache.cloudstack</groupId><artifactId>travis-build-deps</artifactId><name>Download Deps for Travis CI</name><version>1</version><repositories><repository><id>mido-maven-public-releases</id><name>mido-maven-public-releases</name><url>http://cs-maven.midokura.com/releases</url></repository><repository><id>juniper-contrail</id><url>http://juniper.github.io/contrail-maven/snapshots</url></repository></repositories><dependencies>' > pom${LASTPOM}.xml
+#Create first pom
+echo '<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"><modelVersion>4.0.0</modelVersion><groupId>org.apache.cloudstack</groupId><artifactId>travis-build-deps</artifactId><name>Download Deps for Travis CI</name><version>1</version><dependencies>' > 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 '<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"><modelVersion>4.0.0</modelVersion><groupId>org.apache.cloudstack</groupId><artifactId>travis-build-deps</artifactId><name>Download Deps for Travis CI</name><version>1</version><repositories><repository><id>mido-maven-public-releases</id><name>mido-maven-public-releases</name><url>http://cs-maven.midokura.com/releases</url></repository><repository><id>juniper-contrail</id><url>http://juniper.github.io/contrail-maven/snapshots</url></repository></repositories><dependencies>' > 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 '<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"><modelVersion>4.0.0</modelVersion><groupId>org.apache.cloudstack</groupId><artifactId>travis-build-deps</artifactId><name>Download Deps for Travis CI</name><version>1</version><repositories><repository><id>mido-maven-public-releases</id><name>mido-maven-public-releases</name><url>http://cs-maven.midokura.com/releases</url></repository><repository><id>juniper-contrail</id><url>http://juniper.github.io/contrail-maven/snapshots</url></repository></repositories><dependencies>' > pom${LASTPOM}.xml
+       echo '<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"><modelVersion>4.0.0</modelVersion><groupId>org.apache.cloudstack</groupId><artifactId>travis-build-deps</artifactId><name>Download Deps for Travis CI</name><version>1</version><dependencies>' > pom${LASTPOM}.xml
     fi
   else
     POMID=0
   fi
   LASTARTIFACT=$2
-  echo "<dependency><groupId>$1</groupId><artifactId>$2</artifactId><version>$3</version></dependency>" >> pom${POMID}.xml
+  if [[ $1 == org.midonet ]] || [[ $1 == net.juniper* ]]; then
+    echo "<dependency><groupId>$1</groupId><artifactId>$2</artifactId><version>$3</version></dependency>" >> pomX.xml
+  else
+    echo "<dependency><groupId>$1</groupId><artifactId>$2</artifactId><version>$3</version></dependency>" >> pom${POMID}.xml
+  fi
 done < cleandeps.out
 
 RETURN_CODE=0
+#Close and resolve all pom files
 for ((i=0;i<=$LASTPOM;i++))
 do
   echo "</dependencies></project>" >> pom${i}.xml
@@ -113,6 +121,9 @@ do
     RETURN_CODE=1
   fi
 done
+#Close and resolve external deps pom file
+echo "</dependencies></project>" >> pomX.xml
+mvn org.apache.maven.plugins:maven-dependency-plugin:resolve -f pomX.xml
 
 #Run a few plugin goals to download some more deps