mirror of https://github.com/apache/maven.git
o adding a script for modello which is now used to generate the maven model
sources from a modello model file. git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@162573 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
1385a661a6
commit
323b3bdaab
|
@ -13,8 +13,8 @@ downloadMBootDependencies()
|
|||
do
|
||||
if [ ! -f $repoLocal/$i ]
|
||||
then
|
||||
mkdir -p $repoLocal/$i > /dev/null 2>&1
|
||||
wget http://www.ibiblio.org/maven/$i $repoLocal/$i > /dev/null 2>&1
|
||||
mkdir -p `dirname $repoLocal/$i` > /dev/null 2>&1
|
||||
wget http://www.ibiblio.org/maven/$i -O $repoLocal/$i
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
|
|
@ -0,0 +1,63 @@
|
|||
#!/bin/sh
|
||||
|
||||
VERSION=1.0
|
||||
|
||||
usage ()
|
||||
{
|
||||
echo "usage: `basename $0` --model=<model> --dir=<dir>" >&2
|
||||
echo "" >&2
|
||||
echo " (ex: `basename $0` --model=model.mdo --dir=target/src)" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
dir="target/src/java"
|
||||
model="model.mdo"
|
||||
leaveBootFiles="0"
|
||||
install="0"
|
||||
|
||||
while [ $# -gt 0 ]; do
|
||||
case $1 in
|
||||
--help)
|
||||
usage
|
||||
;;
|
||||
--version)
|
||||
echo "mboot: version $VERSION"
|
||||
exit 0
|
||||
;;
|
||||
-v)
|
||||
verbose=-v
|
||||
;;
|
||||
--dir*)
|
||||
if echo $1 | grep -q '=' ; then
|
||||
dir=`echo $1 | sed 's/^--dir=//'`
|
||||
else
|
||||
dir=$2
|
||||
shift
|
||||
fi
|
||||
;;
|
||||
--model*)
|
||||
if echo $1 | grep -q '=' ; then
|
||||
model=`echo $1 | sed 's/^--model=//'`
|
||||
else
|
||||
model=$2
|
||||
shift
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
shift
|
||||
done
|
||||
|
||||
export MBOOT_HOME=`dirname $0`
|
||||
|
||||
. ${MBOOT_HOME}/maven.functions
|
||||
|
||||
[ ! -f $model ] && echo "Specified model doesn't exist!" && exit
|
||||
|
||||
[ ! -d $dir ] && mkdir -p $dir
|
||||
|
||||
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
|
Loading…
Reference in New Issue