From 301dd4deb30ee184241fb30ce5a9dfdaae874011 Mon Sep 17 00:00:00 2001 From: Stefano Mazzocchi Date: Sun, 30 May 2010 17:13:37 +0000 Subject: [PATCH] adding eclipse project files and changing the build system git-svn-id: http://google-refine.googlecode.com/svn/branches/split-refactor@912 7d457c2a-affb-35e4-300a-418c747d4874 --- .classpath | 42 ---- build.xml | 181 ++++++++++-------- gridworks | 55 ++---- gridworks.bat | 8 +- main/.classpath | 38 ++++ .project => main/.project | 0 .../org.eclipse.core.resources.prefs | 0 .../.settings}/org.eclipse.jdt.core.prefs | 0 server/.classpath | 13 ++ server/.project | 12 ++ 10 files changed, 193 insertions(+), 156 deletions(-) delete mode 100644 .classpath create mode 100644 main/.classpath rename .project => main/.project (100%) rename {.settings => main/.settings}/org.eclipse.core.resources.prefs (100%) rename {.settings => main/.settings}/org.eclipse.jdt.core.prefs (100%) create mode 100644 server/.classpath create mode 100644 server/.project diff --git a/.classpath b/.classpath deleted file mode 100644 index f451f1089..000000000 --- a/.classpath +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/build.xml b/build.xml index a7295d50a..82097d3ea 100644 --- a/build.xml +++ b/build.xml @@ -29,6 +29,10 @@ + + + + @@ -37,82 +41,118 @@ - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - + + + + - - + + - - + + + + + + + + + + + - - + + - - - - + + + - + - - - - - - + + + + + - - - - + + + - - - + + + + + + + + - - + + + + - - + + + - + + + @@ -144,16 +184,13 @@ liveresize="true" growboxintrudes="true" screenmenu="true"> - + + - - - - - - + + @@ -169,7 +206,7 @@ @@ -192,29 +229,25 @@ /> + - + - + - - - - - - + - + @@ -232,19 +265,14 @@ - + - + - - - - - - + @@ -281,9 +309,9 @@ classpath="${findbugs.dir}/lib/findbugs-ant.jar" /> - - - + + + @@ -301,10 +329,10 @@ - + - + @@ -323,7 +351,7 @@ - + @@ -340,17 +368,18 @@ /> - + - - - - + + + + + diff --git a/gridworks b/gridworks index a038b742b..8f2b58114 100755 --- a/gridworks +++ b/gridworks @@ -369,7 +369,7 @@ ant() { #export ANT_OPTS="-Xmx1024M" - "$ANT" -f build.xml $ANT_PARAMS -Dbuild.dir="$GRIDWORKS_BUILD_DIR" -Ddist.dir="$GRIDWORKS_DIST_DIR" -Dversion="$VERSION" -Dnum_version="$NUM_VERSION" -Dfull_version="$FULL_VERSION" -Drevision="$REVISION" $1 || error "Error while running ant task '$1'" + "$ANT" -f build.xml $ANT_PARAMS -Dversion="$VERSION" -Dnum_version="$NUM_VERSION" -Dfull_version="$FULL_VERSION" -Drevision="$REVISION" $1 || error "Error while running ant task '$1'" } # ---------------------------------------------------------------------------------------------- @@ -383,7 +383,7 @@ dist() { echo echo "Upload them to the distibution site, then prepend the GridworksReleases array at" echo - echo " http://acre.freebase.com/#app=/user/dfhuynh/labs-site&file=gridworks.js" + echo " http://code.google.com/p/freebase-gridworks/source/browse/support/releases.js" echo echo "with" echo @@ -427,7 +427,7 @@ mac_dist() { ant mac mkdir -p "$GRIDWORKS_BUILD_DIR/mac/.background" - cp src/graphics/dmg_background/dmg_background.png "$GRIDWORKS_BUILD_DIR/mac/.background/dmg_background.png" + cp graphics/dmg_background/dmg_background.png "$GRIDWORKS_BUILD_DIR/mac/.background/dmg_background.png" SIZE=60 @@ -526,10 +526,10 @@ server_test() { ant build_tests echo "" - CLASSPATH="$GRIDWORKS_TEST_DIR/java/classes${SEP}$GRIDWORKS_WEBAPP/WEB-INF/classes${SEP}$GRIDWORKS_BUILD_DIR/classes${SEP}$GRIDWORKS_TEST_DIR/java/lib/*${SEP}$GRIDWORKS_LIB_DIR/*${SEP}$GRIDWORKS_WEBAPP/WEB-INF/lib/*" + CLASSPATH="$GRIDWORKS_TEST_DIR/server/classes${SEP}$GRIDWORKS_WEBAPP/WEB-INF/classes${SEP}$GRIDWORKS_CLASSES_DIR${SEP}$GRIDWORKS_TEST_DIR/server/lib/*${SEP}$GRIDWORKS_LIB_DIR/*${SEP}$GRIDWORKS_WEBAPP/WEB-INF/lib/*" if [ -z "$1" ]; then - TESTS="-excludegroups broken $GRIDWORKS_TEST_DIR/java/conf/tests.xml" + TESTS="-excludegroups broken $GRIDWORKS_TEST_DIR/server/conf/tests.xml" else TESTS="-testclass $1" fi @@ -545,7 +545,7 @@ server_test() { run() { FORK=$1 - if [ ! -d $GRIDWORKS_BUILD_DIR/classes ]; then + if [ ! -d $GRIDWORKS_CLASSES_DIR ]; then IS_JAR=`ls $GRIDWORKS_LIB_DIR | grep gridworks` if [ -z "$IS_JAR" ]; then ant build @@ -559,19 +559,19 @@ run() { warn "Gridworks is already running." fi - if [ -d $GRIDWORKS_BUILD_DIR/classes ]; then + if [ -d $GRIDWORKS_CLASSES_DIR ]; then add_option "-Dgridworks.autoreloading=true" fi if $DARWIN ; then - add_option "-Xdock:name=Gridworks -Xdock:icon=src/graphics/icon/gridworks.icns" + add_option "-Xdock:name=Gridworks -Xdock:icon=graphics/icon/gridworks.icns" fi if [ "$GRIDWORKS_DATA_DIR" ]; then add_option "-Dgridworks.data_dir=$GRIDWORKS_DATA_DIR" fi - CLASSPATH="$GRIDWORKS_BUILD_DIR/classes${SEP}$GRIDWORKS_LIB_DIR/*" + CLASSPATH="$GRIDWORKS_CLASSES_DIR${SEP}$GRIDWORKS_LIB_DIR/*" RUN_CMD="$JAVA -cp $CLASSPATH $OPTS com.metaweb.gridworks.Gridworks" @@ -588,22 +588,6 @@ run() { GRIDWORKS_PID="$!" fi } - -execute() { - if [ ! -d $GRIDWORKS_BUILD_DIR/classes ]; then - ant build - echo "" - fi - - CLASSPATH="$GRIDWORKS_BUILD_DIR/classes${SEP}$GRIDWORKS_LIB_DIR/*" - - RUN_CMD="$JAVA -cp $CLASSPATH $OPTS $*" - - #echo "$RUN_CMD" - #echo "" - - exec $RUN_CMD $* -} findbugs() { findbugs_prepare @@ -761,22 +745,26 @@ fi add_option "-Dgridworks.host=$GRIDWORKS_HOST" if [ -z "$GRIDWORKS_WEBAPP" ]; then - GRIDWORKS_WEBAPP="src/main/webapp" + GRIDWORKS_WEBAPP="main/webapp" fi add_option "-Dgridworks.webapp=$GRIDWORKS_WEBAPP" if [ -z "$GRIDWORKS_TEST_DIR" ]; then - GRIDWORKS_TEST_DIR="tests" + GRIDWORKS_TEST_DIR="main/tests" +fi + +if [ -z "$GRIDWORKS_CLASSES_DIR" ]; then + GRIDWORKS_CLASSES_DIR="server/classes" +fi + +if [ -z "$GRIDWORKS_LIB_DIR" ]; then + GRIDWORKS_LIB_DIR="server/lib" fi if [ -z "$GRIDWORKS_BUILD_DIR" ]; then GRIDWORKS_BUILD_DIR="build" fi -if [ -z "$GRIDWORKS_LIB_DIR" ]; then - GRIDWORKS_LIB_DIR="lib" -fi - if [ -z "$GRIDWORKS_TOOLS_DIR" ]; then GRIDWORKS_TOOLS_DIR="tools" fi @@ -791,9 +779,9 @@ fi add_option "-Dgridworks.verbosity=$GRIDWORKS_VERBOSITY" if [ -z "$JYTHONPATH" ]; then - JYTHONPATH="$GRIDWORKS_LIB_DIR/jython" + JYTHONPATH="$GRIDWORKS_WEBAPP/WEB-INF/lib/jython" else - JYTHONPATH="$GRIDWORKS_LIB_DIR/jython/${SEP}$JYTHONPATH" + JYTHONPATH="$GRIDWORKS_WEBAPP/WEB-INF/lib/jython${SEP}$JYTHONPATH" fi add_option "-Dpython.path=$JYTHONPATH" @@ -815,7 +803,6 @@ case "$ACTION" in cpd) cpd;; jslint) jslint;; run) run;; - execute) execute $*;; mac_dist) mac_dist $1;; windows_dist) windows_dist $1;; linux_dist) linux_dist $1;; diff --git a/gridworks.bat b/gridworks.bat index 71ba3f9ac..d0d6aede2 100644 --- a/gridworks.bat +++ b/gridworks.bat @@ -141,16 +141,16 @@ set GRIDWORKS_HOST=127.0.0.1 set OPTS=%OPTS% -Dgridworks.host=%GRIDWORKS_HOST% if not "%GRIDWORKS_WEBAPP%" == "" goto gotHost -set GRIDWORKS_WEBAPP=src\main\webapp +set GRIDWORKS_WEBAPP=main\webapp :gotHOST set OPTS=%OPTS% -Dgridworks.webapp=%GRIDWORKS_WEBAPP% if not "%GRIDWORKS_BUILD_DIR%" == "" goto gotBuildDir -set GRIDWORKS_BUILD_DIR=build +set GRIDWORKS_BUILD_DIR=server\build :gotBuildDir if not "%GRIDWORKS_LIB_DIR%" == "" goto gotLibDir -set GRIDWORKS_LIB_DIR=lib +set GRIDWORKS_LIB_DIR=server\lib :gotLibDir rem ----- Respond to the action ---------------------------------------------------------- @@ -164,7 +164,7 @@ if ""%ACTION%"" == ""run"" goto doRun :doRun set CLASSPATH="%GRIDWORKS_BUILD_DIR%\classes;%GRIDWORKS_LIB_DIR%\*" -"%JAVA_HOME%\bin\java.exe" -cp %CLASSPATH% %OPTS% -Djava.library.path=lib/native/windows com.metaweb.gridworks.Gridworks +"%JAVA_HOME%\bin\java.exe" -cp %CLASSPATH% %OPTS% -Djava.library.path=%GRIDWORKS_LIB_DIR%/native/windows com.metaweb.gridworks.Gridworks goto end :doAnt diff --git a/main/.classpath b/main/.classpath new file mode 100644 index 000000000..bb9fde417 --- /dev/null +++ b/main/.classpath @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.project b/main/.project similarity index 100% rename from .project rename to main/.project diff --git a/.settings/org.eclipse.core.resources.prefs b/main/.settings/org.eclipse.core.resources.prefs similarity index 100% rename from .settings/org.eclipse.core.resources.prefs rename to main/.settings/org.eclipse.core.resources.prefs diff --git a/.settings/org.eclipse.jdt.core.prefs b/main/.settings/org.eclipse.jdt.core.prefs similarity index 100% rename from .settings/org.eclipse.jdt.core.prefs rename to main/.settings/org.eclipse.jdt.core.prefs diff --git a/server/.classpath b/server/.classpath new file mode 100644 index 000000000..a521b9fad --- /dev/null +++ b/server/.classpath @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/server/.project b/server/.project new file mode 100644 index 000000000..be4b2f9d5 --- /dev/null +++ b/server/.project @@ -0,0 +1,12 @@ + + gridworks server + + + + org.eclipse.jdt.core.javabuilder + + + + org.eclipse.jdt.core.javanature + + \ No newline at end of file