Author: tchemit Date: 2008-01-19 14:22:32 +0000 (Sat, 19 Jan 2008) New Revision: 213 Added: trunk/simexplorer-is-swing/go.sh Log: script pour d?\195?\169marrer l'application. options possibles : -c (clean) -d (debug) -n (nosuspend) + les options de l'application :) par exemple : ./go.sh --help --config country en --config language GB pour obtenir l'aide en anglais :):) construction jar si n?\195?\169cessaire TODO faire un second script dev.sh pour d?\195?\169marrer ?\195?\160 partir des classes compil?\195?\169es sans faire le jar Un petit goal dans commandline pour construire les options de lancement serait le bien venu (g?\195?\169n?\195?\169rer le script go.sh et dev.sh (.bat ?)) Added: trunk/simexplorer-is-swing/go.sh =================================================================== --- trunk/simexplorer-is-swing/go.sh (rev 0) +++ trunk/simexplorer-is-swing/go.sh 2008-01-19 14:22:32 UTC (rev 213) @@ -0,0 +1,73 @@ +#!/bin/sh + +#JAVA="/opt/repository/jdk1.6.0/bin/java -splash:src/resources/images/splash2.jpg" +#JAVA="java -Djava.library.path=lib -splash:src/resources/images/splash2.jpg" +JAVA=java + +#TEMP=`getopt -o cdna:: --long clean,debug,nosuspend:: \ +# -n 'go.sh' -- "$@"` +#if [ $? != 0 ] ; then +# echo "bag argument" +# exit 1 +#fi +#eval set -- "$TEMP" + +CLEAN="" +while true; do + case "$1" in + -c|--clean) + CLEAN="clean" + shift;; + -d|--debug) + echo "Debug mode" + #DEBUG="-server -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=38000,server=y" + DEBUG="-server -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005" + shift ;; + -n|--nosuspend) + echo "Debug no suspend mode" + DEBUG="$DEBUG,suspend=n" + shift ;; + \-\-) shift ; break ;; + *) break; +# *) echo "Bad argument $1!" ; exit 1 ;; + esac +done + +dir=$(dirname $0) +cd $dir + +VER=$(xmlstarlet sel -N "p=http://maven.apache.org/POM/4.0.0" -t -v "/p:project/p:version" pom.xml) +RELEASE="simexplorer-is-swing-$VER" +MAIN_CLASS="fr.cemagref.simexplorer.is.SimExplorer" + +MX=512M + +rep=`dirname $0` +rep=`cd $rep && pwd` + +cd $rep + +if [ "$CLEAN" = "clean" ]; then + echo "mvn clean" + mvn clean > /dev/null +fi + +if [ ! -f $rep/target/$RELEASE.jar ]; then + echo "mvn jar:jar" + mvn -o compile jar:jar > compile.log +fi + +if [ ! -d $rep/target/dependency ]; then + echo "mvn dependency:copy-dependencies" + mvn -o dependency:copy-dependencies > /dev/null +fi + +# build classpath +CL=$rep/target/$RELEASE.jar +for f in $rep/target/dependency/*.jar; do + CL=$CL:$f +done + +# launch appli +echo "java $RELEASE!$MAIN_CLASS $@" +$JAVA $DEBUG -Xmx$MX -Xms$MX -classpath $CL $LOG $JVM_OPT $MAIN_CLASS $@ \ No newline at end of file Property changes on: trunk/simexplorer-is-swing/go.sh ___________________________________________________________________ Name: svn:executable + *
participants (1)
-
tchemit@users.labs.libre-entreprise.org