make autoreloading transpartent (so that we don't forget to set it and later think it's not working... like I just did ;-)

git-svn-id: http://google-refine.googlecode.com/svn/trunk@379 7d457c2a-affb-35e4-300a-418c747d4874
This commit is contained in:
Stefano Mazzocchi 2010-04-03 01:28:54 +00:00
parent d312a75b2f
commit 7cf4f2e5e4
2 changed files with 13 additions and 19 deletions

View File

@ -45,11 +45,6 @@
</fileset>
</path>
<path id="webapp.class.path">
<pathelement path="${server_classes.dir}"/>
<path refid="class.path"/>
</path>
<path id="tests.class.path">
<path refid="class.path"/>
<fileset dir="${tests.dir}/lib">
@ -57,6 +52,7 @@
</fileset>
</path>
<!-- NOTE(SM): this is needed to support autoreloading, don't remove! -->
<target name="build_server">
<mkdir dir="${server_classes.dir}" />
<javac srcdir="${server.src.dir}" destdir="${server_classes.dir}" debug="true" includeAntRuntime="no">
@ -66,8 +62,10 @@
<target name="build" depends="build_server">
<mkdir dir="${webapp_classes.dir}" />
<javac srcdir="${src.dir}" destdir="${webapp_classes.dir}" debug="true" includeAntRuntime="no">
<classpath refid="webapp.class.path" />
<javac destdir="${webapp_classes.dir}" debug="true" includeAntRuntime="no">
<src path="${server.src.dir}"/>
<src path="${src.dir}"/>
<classpath refid="class.path" />
</javac>
</target>
@ -80,7 +78,6 @@
<target name="jar" depends="build">
<jar destfile="${build.dir}/gridworks.jar" basedir="${webapp_classes.dir}"/>
<jar destfile="${build.dir}/gridworks-server.jar" basedir="${server_classes.dir}"/>
</target>
<target name="prepare_webapp">
@ -130,7 +127,6 @@
<include name="**/*.jar" />
</jarfileset>
<jarfilelist dir="${build.dir}" files="gridworks.jar" />
<jarfilelist dir="${build.dir}" files="gridworks-server.jar" />
<resourcefileset dir="${webapp.dir}/..">
<include name="${webapp.name}/**" />
</resourcefileset>
@ -182,7 +178,6 @@
</fileset>
</copy>
<copy file="${build.dir}/gridworks.jar" tofile="${windows.dir}/lib/gridworks-${version}-${revision}.jar"/>
<copy file="${build.dir}/gridworks-server.jar" tofile="${windows.dir}/lib/gridworks-server-${version}-${revision}.jar"/>
<copy todir="${windows.dir}/webapp">
<fileset dir="${webapp.dir}">
<include name="**"/>
@ -213,7 +208,6 @@
</copy>
<copy file="${build.dir}/gridworks.jar" tofile="${linux.dir}/lib/gridworks-${version}-${revision}.jar"/>
<copy file="${build.dir}/gridworks-server.jar" tofile="${linux.dir}/lib/gridworks-server-${version}-${revision}.jar"/>
<copy todir="${linux.dir}/src/main/webapp">
<fileset dir="${webapp.dir}">

View File

@ -40,10 +40,7 @@ where [options] include:
-m <memory> max memory heap size to use
default: 1024M
-a autoreload if class files change
default: false
--debug enable JVM debugging (on port 8000)
--jmx enable JMX monitoring (for jconsole and jvisualvm)
@ -267,18 +264,22 @@ run() {
echo ""
fi
fi
if [ -d $GRIDWORKS_BUILD_DIR/classes ] ; then
add_option "-Dgridworks.autoreloading=true"
fi
if [ "$SYSTEM" == 'Darwin' ] ; then
OPTS="-Xdock:name=Gridworks -Xdock:icon=src/graphics/icon/gridworks.icns $OPTS"
add_option "-Xdock:name=Gridworks -Xdock:icon=src/graphics/icon/gridworks.icns"
fi
if [ "$GRIDWORKS_DATA_DIR" != "" ] ; then
OPTS="-Dgridworks.data_dir=$GRIDWORKS_DATA_DIR $OPTS"
add_option "-Dgridworks.data_dir=$GRIDWORKS_DATA_DIR"
fi
get_revision
OPTS="-Dgridworks.version=$REVISION $OPTS"
add_option "-Dgridworks.version=$REVISION"
CLASSPATH="$GRIDWORKS_BUILD_DIR/classes:$GRIDWORKS_LIB_DIR/*"
@ -358,7 +359,6 @@ while [ $# -ne 0 ] ; do
-w) shift; GRIDWORKS_WEBAPP="$1"; shift; continue;;
-d) shift; GRIDWORKS_DATA_DIR="$1"; shift; continue;;
-m) shift; GRIDWORKS_MEMORY="$1"; shift; continue;;
-a) shift; add_option '-Dgridworks.autoreloading=true'; continue;;
--debug) shift; add_option '-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n'; continue;;
--jmx) shift; add_option '-Dcom.sun.management.jmxremote'; continue;;
-*) fail "Invalid option: $1";;