From d696df54d9d35ea854c1a80d16d6180a49040cc3 Mon Sep 17 00:00:00 2001 From: Jason van Zyl Date: Mon, 8 Mar 2004 17:21:09 +0000 Subject: [PATCH] o only download snapshots when the files already exist in the local repository. git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@162579 13f79535-47bb-0310-9956-ffa450edef68 --- maven-mboot/src/bash/maven.functions | 7 +++++-- maven-mboot/src/bash/modello | 11 ++++++++++- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/maven-mboot/src/bash/maven.functions b/maven-mboot/src/bash/maven.functions index b82a788868..7f041ff6fa 100755 --- a/maven-mboot/src/bash/maven.functions +++ b/maven-mboot/src/bash/maven.functions @@ -11,10 +11,13 @@ downloadMBootDependencies() for i in `cat ${MBOOT_HOME}/deps` do - if [ ! -f $repoLocal/$i ] + echo $i | grep SNAPSHOT > /dev/null 2>&1 + snapshot=$? + + if [ "$snapshot" = "0" ] || [ ! -f $repoLocal/$i ] then mkdir -p `dirname $repoLocal/$i` > /dev/null 2>&1 - wget http://www.ibiblio.org/maven/$i -O $repoLocal/$i + wget http://www.ibiblio.org/maven/$i -O $repoLocal/$i fi done } diff --git a/maven-mboot/src/bash/modello b/maven-mboot/src/bash/modello index 3d9700579d..6cbc683180 100755 --- a/maven-mboot/src/bash/modello +++ b/maven-mboot/src/bash/modello @@ -12,6 +12,7 @@ usage () dir="target/src/java" model="model.mdo" +mode="java" leaveBootFiles="0" install="0" @@ -43,6 +44,14 @@ while [ $# -gt 0 ]; do shift fi ;; + --mode*) + if echo $1 | grep -q '=' ; then + mode=`echo $1 | sed 's/^--mode=//'` + else + mode=$2 + shift + fi + ;; esac shift @@ -60,4 +69,4 @@ findAndSetMavenRepoLocal CP=$repoLocal/modello/jars/modello-1.0-SNAPSHOT.jar:$repoLocal/xstream/jars/xstream-1.0-SNAPSHOT.jar:$repoLocal/xpp3/jars/xpp3-1.1.3.3.jar -java -classpath $CP org.codehaus.modello.Modello $model $dir +java -classpath $CP org.codehaus.modello.Modello $model $mode $dir