You are viewing a plain text version of this content. The canonical link for it is here.
Posted to m2-dev@maven.apache.org by br...@apache.org on 2004/07/18 03:22:49 UTC
cvs commit: maven-components/maven-model build.sh
brett 2004/07/17 18:22:49
Modified: . ci.sh
maven-core m2-bootstrap-all.sh m2-bootstrap.sh
maven-core/src/bin m2
maven-mboot/src/bash maven.functions mboot modello
maven-model build.sh
Log:
make most scripts exit on error
tested only on cygwin - if it causes issues on linux, feel free to rollback
Revision Changes Path
1.26 +1 -1 maven-components/ci.sh
Index: ci.sh
===================================================================
RCS file: /home/cvs/maven-components/ci.sh,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- ci.sh 28 Jun 2004 04:38:37 -0000 1.25
+++ ci.sh 18 Jul 2004 01:22:48 -0000 1.26
@@ -24,7 +24,7 @@
CMD=$1
-[ "$1" = "" ] && echo && echo "You must specify a checkout or update!" && echo && exit
+[ "$1" = "" ] && echo && echo "You must specify a checkout or update!" && echo && exit 1
HOME_DIR=`pwd`
DATE=`date`
1.3 +23 -8 maven-components/maven-core/m2-bootstrap-all.sh
Index: m2-bootstrap-all.sh
===================================================================
RCS file: /home/cvs/maven-components/maven-core/m2-bootstrap-all.sh,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- m2-bootstrap-all.sh 17 Jun 2004 19:54:16 -0000 1.2
+++ m2-bootstrap-all.sh 18 Jul 2004 01:22:48 -0000 1.3
@@ -1,7 +1,7 @@
#!/bin/sh
# Check to make sure MBOOT_HOME is set
-[ -z $MBOOT_HOME ] && echo && echo 'You must set $MBOOT_HOME to use mboot!' && echo && exit
+[ -z $MBOOT_HOME ] && echo && echo 'You must set $MBOOT_HOME to use mboot!' && echo && exit 1
# Build and install mboot
(
@@ -11,28 +11,36 @@
cd ../maven-mboot
./build
+ ret=$?; if [ $ret != 0 ]; then exit $ret; fi
cd target
./mboot-install.sh
+ ret=$?; if [ $ret != 0 ]; then exit $ret; fi
)
+ret=$?; if [ $ret != 0 ]; then exit $ret; fi
(
- echo "-----------------------------------------------------------------------"
- echo " Install the parent pom for all maven-component artifacts ... "
- echo "-----------------------------------------------------------------------"
+ echo "-----------------------------------------------------------------------"
+ echo " Install the parent pom for all maven-component artifacts ... "
+ echo "-----------------------------------------------------------------------"
- cd ..
- mboot --pom-install
+ cd ..
+ mboot --pom-install
+ ret=$?; if [ $ret != 0 ]; then exit $ret; fi
)
+ret=$?; if [ $ret != 0 ]; then exit $ret; fi
# Build and install maven-model.
+
(
echo "-----------------------------------------------------------------------"
echo " Building maven-model ... "
echo "-----------------------------------------------------------------------"
- cd ../maven-model
- ./build.sh
+ cd ../maven-model
+ ./build.sh
+ ret=$?; if [ $ret != 0 ]; then exit $ret; fi
)
+ret=$?; if [ $ret != 0 ]; then exit $ret; fi
# Build and install maven-project.
(
@@ -42,7 +50,9 @@
cd ../maven-artifact
mboot --install
+ ret=$?; if [ $ret != 0 ]; then exit $ret; fi
)
+ret=$?; if [ $ret != 0 ]; then exit $ret; fi
# Build and install maven-plugin.
(
@@ -52,10 +62,15 @@
cd ../maven-plugin
mboot --install
+ ret=$?; if [ $ret != 0 ]; then exit $ret; fi
)
+ret=$?; if [ $ret != 0 ]; then exit $ret; fi
+
# Bootstrap the maven-core component which will give you a small distribution.
echo "-----------------------------------------------------------------------"
echo " Building maven-core ... "
echo "-----------------------------------------------------------------------"
./m2-bootstrap.sh
+ret=$?; if [ $ret != 0 ]; then exit $ret; fi
+
1.4 +2 -2 maven-components/maven-core/m2-bootstrap.sh
Index: m2-bootstrap.sh
===================================================================
RCS file: /home/cvs/maven-components/maven-core/m2-bootstrap.sh,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- m2-bootstrap.sh 24 Jun 2004 00:10:18 -0000 1.3
+++ m2-bootstrap.sh 18 Jul 2004 01:22:48 -0000 1.4
@@ -1,12 +1,12 @@
#!/bin/sh
# Check to make sure MBOOT_HOME is set
-[ -z $MBOOT_HOME ] && echo && echo 'You must set $MBOOT_HOME to use mboot!' && echo && exit
+[ -z $MBOOT_HOME ] && echo && echo 'You must set $MBOOT_HOME to use mboot!' && echo && exit 1
# Check to make sure mboot is in the path
which mboot > /dev/null 2>&1
-[ $? = "1" ] && echo && echo "You must mboot in your PATH!" && echo && exit
+[ $? = "1" ] && echo && echo "You must mboot in your PATH!" && echo && exit 1
rm -rf target
1.2 +1 -1 maven-components/maven-core/src/bin/m2
Index: m2
===================================================================
RCS file: /home/cvs/maven-components/maven-core/src/bin/m2,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- m2 11 Jun 2004 15:11:52 -0000 1.1
+++ m2 18 Jul 2004 01:22:48 -0000 1.2
@@ -43,7 +43,7 @@
if [ ! -x "$JAVACMD" ] ; then
echo "Error: JAVA_HOME is not defined correctly."
echo " We cannot execute $JAVACMD"
- exit
+ exit 1
fi
if [ -z "$JAVA_HOME" ] ; then
1.43 +2 -2 maven-components/maven-mboot/src/bash/maven.functions
Index: maven.functions
===================================================================
RCS file: /home/cvs/maven-components/maven-mboot/src/bash/maven.functions,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -r1.42 -r1.43
--- maven.functions 27 Jun 2004 13:24:13 -0000 1.42
+++ maven.functions 18 Jul 2004 01:22:48 -0000 1.43
@@ -44,7 +44,7 @@
{
if [ -f $HOME/build.properties ]
then
- repoLocal=`cat $HOME/build.properties | grep "maven.repo.local" | sed 's/^.*= *//'`
+ repoLocal=`cat $HOME/build.properties | egrep "^maven.repo.local" | sed 's/^.*= *//'`
else
repoLocal=$HOME/.maven/repository
fi
@@ -504,7 +504,7 @@
if [ ! -x "$JAVACMD" ] ; then
echo "Error: JAVA_HOME is not defined correctly."
echo " We cannot execute $JAVACMD"
- exit
+ exit 1
fi
# For Cygwin, switch to Windows format before running java
1.9 +2 -2 maven-components/maven-mboot/src/bash/mboot
Index: mboot
===================================================================
RCS file: /home/cvs/maven-components/maven-mboot/src/bash/mboot,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- mboot 9 Jun 2004 03:10:50 -0000 1.8
+++ mboot 18 Jul 2004 01:22:48 -0000 1.9
@@ -64,8 +64,8 @@
. ${MBOOT_HOME}/maven.functions
-[ ! -d $dir ] && echo "Specified directory doesn't exist!" && exit
+[ ! -d $dir ] && echo "Specified directory doesn't exist!" && exit 1
-[ ! -f $dir/${POM} ] && echo "No ${POM} in specified directory!" && exit
+[ ! -f $dir/${POM} ] && echo "No ${POM} in specified directory!" && exit 1
buildMavenProject $dir $jar $install $pomInstall $leaveBootFiles
1.8 +1 -1 maven-components/maven-mboot/src/bash/modello
Index: modello
===================================================================
RCS file: /home/cvs/maven-components/maven-mboot/src/bash/modello,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- modello 6 Jun 2004 18:36:26 -0000 1.7
+++ modello 18 Jul 2004 01:22:48 -0000 1.8
@@ -68,7 +68,7 @@
. ${MBOOT_HOME}/maven.functions
-[ ! -f $model ] && echo "Specified model doesn't exist!" && exit
+[ ! -f $model ] && echo "Specified model doesn't exist!" && exit 1
[ ! -d $dir ] && mkdir -p $dir
1.9 +7 -0 maven-components/maven-model/build.sh
Index: build.sh
===================================================================
RCS file: /home/cvs/maven-components/maven-model/build.sh,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- build.sh 6 Jun 2004 05:52:30 -0000 1.8
+++ build.sh 18 Jul 2004 01:22:49 -0000 1.9
@@ -4,21 +4,28 @@
# Generate the sources from the model
modello --model=maven.mdo --version=4.0.0 --mode=java --dir=target/generated-sources
+ret=$?; if [ $ret != 0 ]; then exit $ret; fi
# Generate the source for the xpp3 marshaller and unmarshaller
modello --model=maven.mdo --version=4.0.0 --mode=xpp3 --dir=target/generated-sources
+ret=$?; if [ $ret != 0 ]; then exit $ret; fi
# Generate the 3.0.0 source from the model
modello --model=maven.mdo --version=3.0.0 --mode=java --dir=target/generated-sources --package-with-version
+ret=$?; if [ $ret != 0 ]; then exit $ret; fi
# Generate the 3.0.0 source for the xpp3 marshaller and unmarshaller
modello --model=maven.mdo --version=3.0.0 --mode=xpp3 --dir=target/generated-sources --package-with-version
+ret=$?; if [ $ret != 0 ]; then exit $ret; fi
# Generate XML Schema
modello --model=maven.mdo --version=4.0.0 --mode=xsd --dir=.
+ret=$?; if [ $ret != 0 ]; then exit $ret; fi
# Generate XDoc
modello --model=maven.mdo --version=4.0.0 --mode=xdoc --dir=target/generated-xdocs
+ret=$?; if [ $ret != 0 ]; then exit $ret; fi
# Build the sources
mboot --install
+ret=$?; if [ $ret != 0 ]; then exit $ret; fi