Renamed in build scripts. ./refine build, ./refine, and ./refine dist all work.

git-svn-id: http://google-refine.googlecode.com/svn/trunk@1292 7d457c2a-affb-35e4-300a-418c747d4874
This commit is contained in:
David Huynh 2010-09-22 21:47:35 +00:00
parent fe855c3aae
commit 22cbcddd78
14 changed files with 217 additions and 216 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2010 Metaweb Technologies, Inc. All rights reserved.
* Copyright (c) 2010 Google, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@ -13,11 +13,11 @@
* disclaimer in the documentation and/or other materials provided
* with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY METAWEB TECHNOLOGIES AND CONTRIBUTORS
* THIS SOFTWARE IS PROVIDED BY GOOGLE, INC. AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL METAWEB
* TECHNOLOGIES OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GOOGLE,
* INC. OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER

View File

@ -1,44 +1,45 @@
F r e e b a s e G r i d w o r k s
---------------------------------------
G o o g l e R e f i n e
---------------------------
What is this?
-------------
Freebase Gridworks is a power tool that allows you to load data,
understand it, clean it up, reconcile it internally, and augment it
with data coming from Freebase. All with the comfort and privacy of
Google Refine is a power tool that allows you to load data, understand it,
clean it up, reconcile it internally, and augment it with data coming from
Freebase or other web sources. All with the comfort and privacy of
your own computer.
Where can I get more information on Gridworks?
Where can I get more information on Google Refine?
----------------------------------------------
Look at the Gridworks web site
Look at the Google Refine web site
http://code.google.com/p/freebase-gridworks/
http://code.google.com/p/google-refine/
Licensing and legal issues
--------------------------
Freebase Gridworks is open source software and is licensed under the BSD license
Google Refine is open source software and is licensed under the BSD license
located in the LICENSE.txt. See that file also for information on open source
libraries that Gridworks depends on.
libraries that Google Refine depends on.
Credits
-------
This software was created by Metaweb Technology Inc. and originally written
and conceived by David Huynh <dfhuynh@google.com>.
This software was created by Metaweb Technologies, Inc. and originally written
and conceived by David Huynh <dfhuynh@google.com>. Metaweb Technologies, Inc.
was acquired by Google, Inc. in July 2010.
This is the full list of contributors (in chronological order):
@ -57,5 +58,5 @@
Thank you for your interest.
The Freebase Gridworks Development Team
http://code.google.com/p/freebase-gridworks/
The Google Refine Development Team
http://code.google.com/p/google-refine/

View File

@ -2,11 +2,11 @@
<!--+
|
| Gridworks Build File
| Google Refine Build File
|
+-->
<project name="gridworks" default="build" basedir=".">
<project name="google-refine" default="build" basedir=".">
<property environment="env"/>
@ -30,7 +30,7 @@
<not><isset property="dist.dir"/></not>
</condition>
<condition property="appengine.app_id" value="gridworks-broker">
<condition property="appengine.app_id" value="google-refine-broker">
<not><isset property="appengine.app_id"/></not>
</condition>
@ -42,7 +42,7 @@
<not><isset property="appengine.sdk.dir"/></not>
</condition>
<property name="fullname" value="gridworks-${version}-${revision}" />
<property name="fullname" value="google-refine-${version}-${revision}" />
<property name="main.dir" value="${basedir}/main" />
@ -81,7 +81,7 @@
<property name="mac.dir" value="${build.dir}/mac" />
<property name="windows.dir" value="${build.dir}/windows" />
<property name="linux.name" value="gridworks-${version}" />
<property name="linux.name" value="google-refine-${version}" />
<property name="linux.dir" value="${build.dir}/linux/${linux.name}" />
<!-- ================================================================== -->
@ -246,16 +246,16 @@
<jarbundler
dir="${mac.dir}"
name="Gridworks"
mainclass="com.google.gridworks.Gridworks"
icon="${graphics.dir}/icon/gridworks.icns"
name="Google Refine"
mainclass="com.google.refine.Refine"
icon="${graphics.dir}/icon/google-refine.icns"
version="${version}"
infostring="Gridworks ${version}"
aboutmenuname="Gridworks"
infostring="Google Refine ${version}"
aboutmenuname="Google Refine"
workingdirectory="$APP_PACKAGE/Contents/Resources"
jvmversion="1.6+"
bundleid="com.google.gridworks.Gridworks"
vmoptions="-Xms256M -Xmx1024M -Dgridworks.version=${revision}"
bundleid="com.google.refine.Refine"
vmoptions="-Xms256M -Xmx1024M -Drefine.version=${revision}"
antialiasedgraphics="true"
antialiasedtext="true"
liveresize="true"
@ -282,27 +282,27 @@
<launch4j>
<config
headerType="console"
outfile="${windows.dir}/Gridworks.exe"
outfile="${windows.dir}/google-refine.exe"
jarPath="server/lib/${fullname}-server.jar"
dontWrapJar="true"
icon="${graphics.dir}/icon/gridworks.ico">
<classPath mainClass="com.google.gridworks.Gridworks">
icon="${graphics.dir}/icon/google-refine.ico">
<classPath mainClass="com.google.refine.Refine">
<cp>server/lib/*.jar</cp>
</classPath>
<jre minVersion="1.6.0" jdkPreference="preferJre" initialHeapSize="256" maxHeapSize="1024">
<opt>-Djava.library.path=server/lib/native/windows -Dgridworks.version=${revision}</opt>
<opt>-Djava.library.path=server/lib/native/windows -Drefine.version=${revision}</opt>
</jre>
<versionInfo
fileVersion="${full_version}"
txtFileVersion="${version}"
fileDescription="gridworks"
copyright="Copyright (c) 2010, Metaweb Technologies, Inc."
fileDescription="google-refine"
copyright="Copyright (c) 2010, Google, Inc."
productVersion="${full_version}"
txtProductVersion="${full_version}"
productName="Gridworks"
companyName="Metaweb Technologies, Inc."
internalName="gridworks"
originalFilename="gridworks.exe"
productName="Google Refine"
companyName="Google, Inc."
internalName="google-refine"
originalFilename="google-refine.exe"
/>
</config>
</launch4j>
@ -330,13 +330,13 @@
</fileset>
</copy>
<copy file="${conf.dir}/gridworks.l4j.ini" tofile="${windows.dir}/gridworks.l4j.ini"/>
<copy file="${basedir}/gridworks.bat" tofile="${windows.dir}/gridworks.bat"/>
<copy file="${basedir}/gridworks.ini" tofile="${windows.dir}/gridworks.ini"/>
<copy file="${conf.dir}/google-refine.l4j.ini" tofile="${windows.dir}/google-refine.l4j.ini"/>
<copy file="${basedir}/refine.bat" tofile="${windows.dir}/refine.bat"/>
<copy file="${basedir}/refine.ini" tofile="${windows.dir}/refine.ini"/>
<copy file="${basedir}/README.txt" tofile="${windows.dir}/README.txt"/>
<copy file="${basedir}/LICENSE.txt" tofile="${windows.dir}/LICENSE.txt"/>
<zip destfile="${dist.dir}/gridworks-${version}-${revision}.zip" basedir="${windows.dir}"/>
<zip destfile="${dist.dir}/google-refine-${version}-${revision}.zip" basedir="${windows.dir}"/>
</target>
<target name="linux" depends="jar, prepare_webapp">
@ -361,18 +361,18 @@
<include name="**"/>
</fileset>
</copy>
<copy file="${basedir}/gridworks.ini" tofile="${linux.dir}/gridworks.ini"/>
<copy file="${basedir}/refine.ini" tofile="${linux.dir}/refine.ini"/>
<copy file="${basedir}/LICENSE.txt" tofile="${linux.dir}/LICENSE.txt"/>
<copy file="${basedir}/README.txt" tofile="${linux.dir}/README.txt"/>
<copy file="${basedir}/gridworks" tofile="${linux.dir}/gridworks"/>
<copy file="${basedir}/refine" tofile="${linux.dir}/refine"/>
<tar longfile="gnu" compression="gzip" destfile="${dist.dir}/gridworks-${version}-${revision}.tar.gz">
<tar longfile="gnu" compression="gzip" destfile="${dist.dir}/google-refine-${version}-${revision}.tar.gz">
<tarfileset dir="${linux.dir}/.." filemode="755">
<include name="${linux.name}/gridworks"/>
<include name="${linux.name}/refine"/>
</tarfileset>
<tarfileset dir="${linux.dir}/..">
<include name="${linux.name}/**"/>
<exclude name="${linux.name}/gridworks"/>
<exclude name="${linux.name}/refine"/>
</tarfileset>
</tar>
</target>

View File

@ -1,10 +1,10 @@
<?xml version="1.0"?>
<ruleset name="Gridworks PMD Ruleset"
<ruleset name="Google Refine PMD Ruleset"
xmlns="http://pmd.sf.net/ruleset/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd"
xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd">
<description>Gridworks PMD Ruleset</description>
<description>Google Refine PMD Ruleset</description>
<rule ref="rulesets/basic.xml">
<exclude name="EmptyCatchBlock"/>

View File

Before

Width:  |  Height:  |  Size: 411 B

After

Width:  |  Height:  |  Size: 411 B

View File

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

View File

Before

Width:  |  Height:  |  Size: 55 KiB

After

Width:  |  Height:  |  Size: 55 KiB

View File

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View File

@ -1,6 +0,0 @@
#GRIDWORKS_PORT=3333
#GRIDWORKS_HOST=127.0.0.1
#GRIDWORKS_MEMORY=1024M
#JAVA_HOME=""
#JAVA_OPTIONS="-XX:+UseParallelGC -XX:+UseLargePages"

View File

@ -1,7 +1,7 @@
#!/bin/sh
##########################################################
# Gridworks Control System #
# Google Refine Control System #
##########################################################
# -------------- utility functions ----------------------
@ -31,10 +31,10 @@ where [options] include:
-h print this message and exit
-p <port> the port that gridworks will listen to
-p <port> the port that Google Refine will listen to
default: 3333
-i <interface> the host interface gridworks should bind to
-i <interface> the host interface Google Refine should bind to
default: 127.0.0.1
-w <path> path to the webapp
@ -55,22 +55,22 @@ where [options] include:
and <action> is one of
build ............................... Build Gridworks
run ................................. Run Gridworks [default]
build ............................... Build Google Refine
run ................................. Run Google Refine [default]
test ................................ Run all Gridworks tests
test ................................ Run all Google Refine tests
server_test ......................... Run only the server tests
ui_test ............................. Run only the UI tests
broker .............................. Run Gridworks Broker
broker .............................. Run Google Refine Broker
broker_appengine_run <id> <ver> ..... Run Gridworks Broker for Google App Engine in local server
broker_appengine_upload <id> <ver> .. Upload Gridworks to Google App Engine
broker_appengine_run <id> <ver> ..... Run Google Refine Broker for Google App Engine in local server
broker_appengine_upload <id> <ver> .. Upload Google Refine to Google App Engine
findbugs ............................ Run Findbugs against Gridworks
pmd ................................. Run PMD against Gridworks
cpd ................................. Run Copy/Paste Detection against Gridworks
jslint .............................. Run JSlint against Gridworks
findbugs ............................ Run Findbugs against Google Refine
pmd ................................. Run PMD against Google Refine
cpd ................................. Run Copy/Paste Detection against Google Refine
jslint .............................. Run JSlint against Google Refine
whitespace <extension> .............. Normalize whitespace in files with the given extension
@ -140,7 +140,7 @@ check_pywin32() {
check_running() {
check_downloaders
URL="http://${GRIDWORKS_HOST}:${GRIDWORKS_PORT}/"
URL="http://${REFINE_HOST}:${REFINE_PORT}/"
if [ "$CURL" ] ; then
NOT_RUNNING=`curl -s $URL > /dev/null || echo not_running`
@ -205,7 +205,7 @@ tool_download() {
FILE=$2
DIR=$3
cd $GRIDWORKS_TOOLS_DIR
cd $REFINE_TOOLS_DIR
if [ ! -f "$FILE" ] ; then
download $URL $FILE
fi
@ -224,13 +224,13 @@ tool_download() {
load_data() {
FILE=$1
NAME=$2
URL="http://${GRIDWORKS_HOST}:${GRIDWORKS_PORT}/command/core/create-project-from-upload"
URL="http://${REFINE_HOST}:${REFINE_PORT}/command/core/create-project-from-upload"
CURL="`which curl 2> /dev/null`"
if [ -z "$CURL" ] ; then
error "We need 'curl' present in PATH to upload data to gridworks."
error "We need 'curl' present in PATH to upload data to Google Refine."
else
curl -s -F "project-file=@$FILE" -F "project-name=$NAME" $URL > /dev/null || error "Error while uploading $FILE to Gridworks"
curl -s -F "project-file=@$FILE" -F "project-name=$NAME" $URL > /dev/null || error "Error while uploading $FILE to Google Refine"
echo "Loaded $FILE as $NAME"
fi
}
@ -238,20 +238,20 @@ load_data() {
# ----------------------------------------------------------------------------------------------
build_prepare() {
if [ ! -d $GRIDWORKS_BUILD_DIR ] ; then
mkdir $GRIDWORKS_BUILD_DIR || error "Error while making directory $GRIDWORKS_BUILD_DIR"
if [ ! -d $REFINE_BUILD_DIR ] ; then
mkdir $REFINE_BUILD_DIR || error "Error while making directory $REFINE_BUILD_DIR"
fi
}
dist_prepare() {
if [ ! -d $GRIDWORKS_DIST_DIR ] ; then
mkdir $GRIDWORKS_DIST_DIR || error "Error while making directory $GRIDWORKS_DIST_DIR"
if [ ! -d $REFINE_DIST_DIR ] ; then
mkdir $REFINE_DIST_DIR || error "Error while making directory $REFINE_DIST_DIR"
fi
}
tools_prepare() {
if [ ! -d $GRIDWORKS_TOOLS_DIR ] ; then
mkdir $GRIDWORKS_TOOLS_DIR || error "Error while making directory $GRIDWORKS_TOOLS_DIR"
if [ ! -d $REFINE_TOOLS_DIR ] ; then
mkdir $REFINE_TOOLS_DIR || error "Error while making directory $REFINE_TOOLS_DIR"
fi
}
@ -265,7 +265,7 @@ ant_prepare() {
ANT="`which ant 2> /dev/null`"
if [ -z "$ANT" ] ; then
if [ -z "$ANT_HOME" ] ; then
cd $GRIDWORKS_TOOLS_DIR
cd $REFINE_TOOLS_DIR
if [ ! -f "$ANT_FILE" ] ; then
download $ANT_URL $ANT_FILE
fi
@ -330,13 +330,13 @@ virtualenv_prepare() {
tool_download $VIRTUALENV_URL $VIRTUALENV_FILE $VIRTUALENV_DIR
PYTHON_LOCAL="$GRIDWORKS_TOOLS_DIR/python"
PYTHON_LOCAL="$REFINE_TOOLS_DIR/python"
if [ "$OS" = "windows" ] ; then
PYTHON_LOCAL="${PYTHON_LOCAL}_win"
fi
if [ ! -d "$PYTHON_LOCAL" ] ; then
$PYTHON $GRIDWORKS_TOOLS_DIR/$VIRTUALENV_DIR/virtualenv.py $PYTHON_LOCAL
$PYTHON $REFINE_TOOLS_DIR/$VIRTUALENV_DIR/virtualenv.py $PYTHON_LOCAL
fi
PYTHON_HOME="`pwd`/$PYTHON_LOCAL"
@ -417,16 +417,16 @@ dist() {
windows_dist $1
linux_dist $1
echo "All distributions were built and are located at $GRIDWORKS_DIST_DIR"
echo "All distributions were built and are located at $REFINE_DIST_DIR"
echo
echo "Upload them to the distibution site, then prepend the GridworksReleases array at"
echo "Upload them to the distibution site, then prepend the GoogleRefineReleases array at"
echo
echo " http://code.google.com/p/freebase-gridworks/source/browse/support/releases.js"
echo " http://code.google.com/p/google-refine/source/browse/support/releases2.js"
echo
echo "with"
echo
echo " {"
echo " \"description\": \"Gridworks ${VERSION}\","
echo " \"description\": \"Google Refine ${VERSION}\","
echo " \"version\": \"${VERSION}\","
echo " \"revision\": \"${REVISION}\""
echo " },"
@ -440,7 +440,7 @@ windows_dist() {
launch4j_prepare
ANT_PARAMS="-Dlaunch4j.dir=${GRIDWORKS_TOOLS_DIR}/${LAUNCH4J_DIR}"
ANT_PARAMS="-Dlaunch4j.dir=${REFINE_TOOLS_DIR}/${LAUNCH4J_DIR}"
ant windows
}
@ -460,23 +460,23 @@ mac_dist() {
jarbundler_prepare
ANT_PARAMS="-Djarbundler.dir=${GRIDWORKS_TOOLS_DIR}/${JARBUNDLER_DIR}"
ANT_PARAMS="-Djarbundler.dir=${REFINE_TOOLS_DIR}/${JARBUNDLER_DIR}"
ant mac
mkdir -p "$GRIDWORKS_BUILD_DIR/mac/.background"
cp graphics/dmg_background/dmg_background.png "$GRIDWORKS_BUILD_DIR/mac/.background/dmg_background.png"
mkdir -p "$REFINE_BUILD_DIR/mac/.background"
cp graphics/dmg_background/dmg_background.png "$REFINE_BUILD_DIR/mac/.background/dmg_background.png"
SIZE=60
if [ -f "$GRIDWORKS_BUILD_DIR/temp_gridworks.dmg" ] ; then
rm "$GRIDWORKS_BUILD_DIR/temp_gridworks.dmg"
if [ -f "$REFINE_BUILD_DIR/temp_refine.dmg" ] ; then
rm "$REFINE_BUILD_DIR/temp_refine.dmg"
fi
TITLE="Gridworks $VERSION"
TITLE="Google Refine $VERSION"
echo "Building MacOSX DMG for $TITLE"
hdiutil create -srcfolder "$GRIDWORKS_BUILD_DIR/mac" -volname "$TITLE" -fs HFS+ -fsargs "-c c=64,a=16,e=16" -format UDRW -size ${SIZE}m "$GRIDWORKS_BUILD_DIR/temp_gridworks.dmg" || error "can't create empty DMG"
DEVICE=`hdiutil attach -readwrite -noverify -noautoopen "$GRIDWORKS_BUILD_DIR/temp_gridworks.dmg" | egrep '^/dev/' | sed 1q | awk '{print $1}'`
hdiutil attach "$GRIDWORKS_BUILD_DIR/temp_gridworks.dmg" || error "Can't attach temp DMG"
hdiutil create -srcfolder "$REFINE_BUILD_DIR/mac" -volname "$TITLE" -fs HFS+ -fsargs "-c c=64,a=16,e=16" -format UDRW -size ${SIZE}m "$REFINE_BUILD_DIR/temp_refine.dmg" || error "can't create empty DMG"
DEVICE=`hdiutil attach -readwrite -noverify -noautoopen "$REFINE_BUILD_DIR/temp_refine.dmg" | egrep '^/dev/' | sed 1q | awk '{print $1}'`
hdiutil attach "$REFINE_BUILD_DIR/temp_refine.dmg" || error "Can't attach temp DMG"
echo '
tell application "Finder"
@ -491,7 +491,7 @@ mac_dist() {
set icon size of theViewOptions to 100
set background picture of theViewOptions to file ".background:dmg_background.png"
make new alias file at container window to POSIX file "/Applications" with properties {name:"Applications"}
set position of item "Gridworks" of container window to {170, 175}
set position of item "Google Refine" of container window to {170, 175}
set position of item "Applications" of container window to {380, 175}
close
open
@ -506,14 +506,14 @@ mac_dist() {
sync
hdiutil detach $DEVICE
if [ -f "$GRIDWORKS_DIST_DIR/gridworks-$VERSION-$REVISION.dmg" ] ; then
rm "$GRIDWORKS_DIST_DIR/gridworks-$VERSION-$REVISION.dmg"
if [ -f "$REFINE_DIST_DIR/google-refine-$VERSION-$REVISION.dmg" ] ; then
rm "$REFINE_DIST_DIR/google-refine-$VERSION-$REVISION.dmg"
fi
hdiutil convert "$GRIDWORKS_BUILD_DIR/temp_gridworks.dmg" -format UDZO -imagekey zlib-level=9 -o "$GRIDWORKS_DIST_DIR/gridworks-$VERSION-$REVISION.dmg" || error "Error compressing DMG"
hdiutil internet-enable -yes "$GRIDWORKS_DIST_DIR/gridworks-$VERSION-$REVISION.dmg" || error "Error internet-enabling DMG"
hdiutil convert "$REFINE_BUILD_DIR/temp_refine.dmg" -format UDZO -imagekey zlib-level=9 -o "$REFINE_DIST_DIR/google-refine-$VERSION-$REVISION.dmg" || error "Error compressing DMG"
hdiutil internet-enable -yes "$REFINE_DIST_DIR/google-refine-$VERSION-$REVISION.dmg" || error "Error internet-enabling DMG"
rm -f "$GRIDWORKS_BUILD_DIR/temp_gridworks.dmg"
rm -f "$REFINE_BUILD_DIR/temp_refine.dmg"
}
test() {
@ -526,13 +526,13 @@ ui_test() {
windmill_prepare
GRIDWORKS_DATA_DIR="${TMPDIR}/gridworks-tests"
REFINE_DATA_DIR="${TMPDIR}/google-refine-tests"
add_option "-Dgridworks.headless=true"
add_option "-Drefine.headless=true"
run fork
echo "Waiting for Gridworks to load..."
echo "Waiting for Google Refine to load..."
sleep 5
check_running
if [ ! -z "$NOT_RUNNING" ] ; then
@ -541,37 +541,37 @@ ui_test() {
echo "... proceed with the tests."
echo ""
load_data "$GRIDWORKS_TEST_DIR/data/food.csv" "Food"
load_data "$REFINE_TEST_DIR/data/food.csv" "Food"
sleep 3
echo ""
echo "Starting Windmill..."
if [ -z "$INTERACTIVE" ] ; then
"$WINDMILL" firefox firebug loglevel=WARN http://${GRIDWORKS_HOST}:${GRIDWORKS_PORT}/ jsdir=$GRIDWORKS_TEST_DIR/client/src exit
"$WINDMILL" firefox firebug loglevel=WARN http://${REFINE_HOST}:${REFINE_PORT}/ jsdir=$REFINE_TEST_DIR/client/src exit
else
"$WINDMILL" firefox firebug loglevel=WARN http://${GRIDWORKS_HOST}:${GRIDWORKS_PORT}/
"$WINDMILL" firefox firebug loglevel=WARN http://${REFINE_HOST}:${REFINE_PORT}/
fi
echo ""
echo "Killing Gridworks"
/bin/kill -9 $GRIDWORKS_PID
echo "Killing Google Refine"
/bin/kill -9 $REFINE_PID
echo "Cleaning up"
rm -rf $GRIDWORKS_DATA_DIR
rm -rf $REFINE_DATA_DIR
}
server_test() {
ant build_tests
echo ""
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/*"
CLASSPATH="$REFINE_TEST_DIR/server/classes${SEP}$REFINE_WEBAPP/WEB-INF/classes${SEP}$REFINE_CLASSES_DIR${SEP}$REFINE_TEST_DIR/server/lib/*${SEP}$REFINE_LIB_DIR/*${SEP}$REFINE_WEBAPP/WEB-INF/lib/*"
if [ -z "$1" ] ; then
TESTS="-excludegroups broken $GRIDWORKS_TEST_DIR/server/conf/tests.xml"
TESTS="-excludegroups broken $REFINE_TEST_DIR/server/conf/tests.xml"
else
TESTS="-testclass $1"
fi
RUN_CMD="$JAVA -cp $CLASSPATH $OPTS org.testng.TestNG -d $GRIDWORKS_BUILD_DIR/server_tests -listener org.testng.reporters.DotTestListener $TESTS"
RUN_CMD="$JAVA -cp $CLASSPATH $OPTS org.testng.TestNG -d $REFINE_BUILD_DIR/server_tests -listener org.testng.reporters.DotTestListener $TESTS"
#echo "$RUN_CMD"
#echo ""
@ -585,56 +585,56 @@ run() {
check_running
if [ -z "$NOT_RUNNING" ] ; then
warn "Gridworks is already running."
warn "Google Refine is already running."
fi
if [ ! -d $GRIDWORKS_CLASSES_DIR ] ; then
IS_JAR=`ls $GRIDWORKS_LIB_DIR | grep gridworks`
if [ ! -d $REFINE_CLASSES_DIR ] ; then
IS_JAR=`ls $REFINE_LIB_DIR | grep google-refine`
if [ -z "$IS_JAR" ] ; then
ant build
echo ""
fi
fi
if [ -d $GRIDWORKS_CLASSES_DIR ] ; then
add_option "-Dgridworks.autoreload=true -Dbutterfly.autoreload=true"
if [ -d $REFINE_CLASSES_DIR ] ; then
add_option "-Drefine.autoreload=true -Dbutterfly.autoreload=true"
fi
if [ "$OS" = "macosx" ] ; then
add_option "-Xdock:name=Gridworks -Xdock:icon=graphics/icon/gridworks.icns"
add_option "-Xdock:name=GoogleRefine -Xdock:icon=graphics/icon/google-refine.icns"
fi
if [ "$GRIDWORKS_DATA_DIR" ] ; then
add_option "-Dgridworks.data_dir=$GRIDWORKS_DATA_DIR"
if [ "$REFINE_DATA_DIR" ] ; then
add_option "-Drefine.data_dir=$REFINE_DATA_DIR"
fi
if [ "$GRIDWORKS_WEBAPP" ] ; then
add_option "-Dgridworks.webapp=$GRIDWORKS_WEBAPP"
if [ "$REFINE_WEBAPP" ] ; then
add_option "-Drefine.webapp=$REFINE_WEBAPP"
fi
if [ "$GRIDWORKS_PORT" ] ; then
add_option "-Dgridworks.port=$GRIDWORKS_PORT"
if [ "$REFINE_PORT" ] ; then
add_option "-Drefine.port=$REFINE_PORT"
fi
if [ "$GRIDWORKS_HOST" ] ; then
add_option "-Dgridworks.host=$GRIDWORKS_HOST"
if [ "$REFINE_HOST" ] ; then
add_option "-Drefine.host=$REFINE_HOST"
fi
CLASSPATH="$GRIDWORKS_CLASSES_DIR${SEP}$GRIDWORKS_LIB_DIR/*"
CLASSPATH="$REFINE_CLASSES_DIR${SEP}$REFINE_LIB_DIR/*"
RUN_CMD="$JAVA -cp $CLASSPATH $OPTS com.google.refine.Refine"
#echo "$RUN_CMD"
#echo ""
echo "Starting Gridworks at 'http://${GRIDWORKS_HOST}:${GRIDWORKS_PORT}/'"
echo "Starting Google Refine at 'http://${REFINE_HOST}:${REFINE_PORT}/'"
echo ""
if [ -z "$FORK" ] ; then
exec $RUN_CMD
else
$RUN_CMD &
GRIDWORKS_PID="$!"
REFINE_PID="$!"
fi
}
@ -647,13 +647,13 @@ broker_build() {
broker_run() {
FORK=$1
GRIDWORKS_HOST=127.0.0.1
GRIDWORKS_PORT=3334
REFINE_HOST=127.0.0.1
REFINE_PORT=3334
check_running
if [ -z "$NOT_RUNNING" ] ; then
warn "Gridworks Broker is already running."
warn "Google Refine Broker is already running."
fi
if [ ! -d "broker/core/WEB-INF/lib" ] ; then
@ -661,32 +661,32 @@ broker_run() {
echo ""
fi
if [ -d $GRIDWORKS_CLASSES_DIR ] ; then
add_option "-Dgridworks.autoreload=true -Dbutterfly.autoreload=true"
add_option "-Dgridworks.development=true"
if [ -d $REFINE_CLASSES_DIR ] ; then
add_option "-Drefine.autoreload=true -Dbutterfly.autoreload=true"
add_option "-Drefine.development=true"
fi
add_option "-Dgridworks.webapp=broker/core"
add_option "-Dgridworks.headless=true"
add_option "-Drefine.webapp=broker/core"
add_option "-Drefine.headless=true"
add_option "-Dgridworks.port=$GRIDWORKS_PORT"
add_option "-Dgridworks.host=0.0.0.0"
add_option "-Drefine.port=$REFINE_PORT"
add_option "-Drefine.host=0.0.0.0"
CLASSPATH="$GRIDWORKS_CLASSES_DIR${SEP}$GRIDWORKS_LIB_DIR/*"
CLASSPATH="$REFINE_CLASSES_DIR${SEP}$REFINE_LIB_DIR/*"
RUN_CMD="$JAVA -cp $CLASSPATH $OPTS com.google.refine.Refine"
#echo "$RUN_CMD"
#echo ""
echo "Starting Gridworks Broker at 'http://${GRIDWORKS_HOST}:${GRIDWORKS_PORT}/'"
echo "Starting Google Refine Broker at 'http://${REFINE_HOST}:${REFINE_PORT}/'"
echo ""
if [ -z "$FORK" ] ; then
exec $RUN_CMD
else
$RUN_CMD &
GRIDWORKS_PID="$!"
REFINE_PID="$!"
fi
}
@ -710,48 +710,48 @@ broker_appengine_build() {
broker_appengine_upload() {
broker_appengine_build $1 $2
"$APPENGINE" update "$GRIDWORKS_BUILD_DIR/broker/appengine"
"$APPENGINE" update "$REFINE_BUILD_DIR/broker/appengine"
}
broker_appengine_run() {
broker_appengine_build $1 $2
"$APPENGINE_LOCAL" "$GRIDWORKS_BUILD_DIR/broker/appengine"
"$APPENGINE_LOCAL" "$REFINE_BUILD_DIR/broker/appengine"
}
findbugs() {
findbugs_prepare
ANT_PARAMS="-Dfindbugs.dir=${GRIDWORKS_TOOLS_DIR}/${FINDBUGS_DIR}"
ANT_PARAMS="-Dfindbugs.dir=${REFINE_TOOLS_DIR}/${FINDBUGS_DIR}"
ant findbugs
open "$GRIDWORKS_BUILD_DIR/reports/findbugs.html"
open "$REFINE_BUILD_DIR/reports/findbugs.html"
}
pmd() {
pmd_prepare
ANT_PARAMS="-Dpmd.dir=${GRIDWORKS_TOOLS_DIR}/${PMD_DIR}"
ANT_PARAMS="-Dpmd.dir=${REFINE_TOOLS_DIR}/${PMD_DIR}"
ant pmd
open "$GRIDWORKS_BUILD_DIR/reports/pmd.html"
open "$REFINE_BUILD_DIR/reports/pmd.html"
}
cpd() {
pmd_prepare
ANT_PARAMS="-Dpmd.dir=${GRIDWORKS_TOOLS_DIR}/${PMD_DIR}"
ANT_PARAMS="-Dpmd.dir=${REFINE_TOOLS_DIR}/${PMD_DIR}"
ant cpd
open "$GRIDWORKS_BUILD_DIR/reports/cpd.txt"
open "$REFINE_BUILD_DIR/reports/cpd.txt"
}
jslint() {
jslint_prepare
ANT_PARAMS="-Djslint.dir=${GRIDWORKS_TOOLS_DIR}/${JSLINT_DIR}"
ANT_PARAMS="-Djslint.dir=${REFINE_TOOLS_DIR}/${JSLINT_DIR}"
ant jslint
open "$GRIDWORKS_BUILD_DIR/reports/jslint.txt"
open "$REFINE_BUILD_DIR/reports/jslint.txt"
}
whitespace() {
@ -796,7 +796,7 @@ fi
# ----- Load configurations -------------------------------------
load_configs gridworks.ini
load_configs refine.ini
# ----- Make sure there is an appropriate java environment is available -------------
@ -821,7 +821,7 @@ fi
JAVA_VERSION=`$JAVA -version 2>&1 | grep version | cut -d ' ' -f 3 | egrep ^\"1\.6`
if [ -z "$JAVA_VERSION" ] ; then
error "Gridworks requires Java version 6 or later. If you have multiple versions of Java installed, please set JAVA_HOME to the correct version."
error "Google Refine requires Java version 6 or later. If you have multiple versions of Java installed, please set JAVA_HOME to the correct version."
fi
# ----- Parse the command line args ------------------------------------------
@ -829,12 +829,12 @@ fi
while [ $# -ne 0 ] ; do
case "$1" in
-h) usage;;
-p) shift; GRIDWORKS_PORT="$1"; shift; continue;;
-i) shift; GRIDWORKS_HOST="$1"; shift; continue;;
-w) shift; GRIDWORKS_WEBAPP="$1"; shift; continue;;
-d) shift; GRIDWORKS_DATA_DIR="$1"; shift; continue;;
-m) shift; GRIDWORKS_MEMORY="$1"; shift; continue;;
-v) shift; GRIDWORKS_VERBOSITY="$1"; shift; continue;;
-p) shift; REFINE_PORT="$1"; shift; continue;;
-i) shift; REFINE_HOST="$1"; shift; continue;;
-w) shift; REFINE_WEBAPP="$1"; shift; continue;;
-d) shift; REFINE_DATA_DIR="$1"; shift; continue;;
-m) shift; REFINE_MEMORY="$1"; shift; continue;;
-v) shift; REFINE_VERBOSITY="$1"; shift; 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";;
@ -857,56 +857,56 @@ if [ -z "$JAVA_OPTIONS" ] ; then
fi
add_option "$JAVA_OPTIONS"
if [ -z "$GRIDWORKS_MEMORY" ] ; then
GRIDWORKS_MEMORY="1024M"
if [ -z "$REFINE_MEMORY" ] ; then
REFINE_MEMORY="1024M"
fi
add_option "-Xms256M -Xmx$GRIDWORKS_MEMORY -Dgridworks.memory=$GRIDWORKS_MEMORY -XX:MaxPermSize=256m -XX:+CMSClassUnloadingEnabled"
add_option "-Xms256M -Xmx$REFINE_MEMORY -Drefine.memory=$REFINE_MEMORY -XX:MaxPermSize=256m -XX:+CMSClassUnloadingEnabled"
if [ -z "$GRIDWORKS_PORT" ] ; then
GRIDWORKS_PORT="3333"
if [ -z "$REFINE_PORT" ] ; then
REFINE_PORT="3333"
fi
if [ -z "$GRIDWORKS_HOST" ] ; then
GRIDWORKS_HOST="127.0.0.1"
if [ -z "$REFINE_HOST" ] ; then
REFINE_HOST="127.0.0.1"
fi
if [ -z "$GRIDWORKS_WEBAPP" ] ; then
GRIDWORKS_WEBAPP="main/webapp"
if [ -z "$REFINE_WEBAPP" ] ; then
REFINE_WEBAPP="main/webapp"
fi
if [ -z "$GRIDWORKS_TEST_DIR" ] ; then
GRIDWORKS_TEST_DIR="main/tests"
if [ -z "$REFINE_TEST_DIR" ] ; then
REFINE_TEST_DIR="main/tests"
fi
if [ -z "$GRIDWORKS_CLASSES_DIR" ] ; then
GRIDWORKS_CLASSES_DIR="server/classes"
if [ -z "$REFINE_CLASSES_DIR" ] ; then
REFINE_CLASSES_DIR="server/classes"
fi
if [ -z "$GRIDWORKS_LIB_DIR" ] ; then
GRIDWORKS_LIB_DIR="server/lib"
if [ -z "$REFINE_LIB_DIR" ] ; then
REFINE_LIB_DIR="server/lib"
fi
if [ -z "$GRIDWORKS_BUILD_DIR" ] ; then
GRIDWORKS_BUILD_DIR="build"
if [ -z "$REFINE_BUILD_DIR" ] ; then
REFINE_BUILD_DIR="build"
fi
if [ -z "$GRIDWORKS_TOOLS_DIR" ] ; then
GRIDWORKS_TOOLS_DIR="tools"
if [ -z "$REFINE_TOOLS_DIR" ] ; then
REFINE_TOOLS_DIR="tools"
fi
if [ -z "$GRIDWORKS_DIST_DIR" ] ; then
GRIDWORKS_DIST_DIR="dist"
if [ -z "$REFINE_DIST_DIR" ] ; then
REFINE_DIST_DIR="dist"
fi
if [ -z "$GRIDWORKS_VERBOSITY" ] ; then
GRIDWORKS_VERBOSITY="info"
if [ -z "$REFINE_VERBOSITY" ] ; then
REFINE_VERBOSITY="info"
fi
add_option "-Dgridworks.verbosity=$GRIDWORKS_VERBOSITY"
add_option "-Drefine.verbosity=$REFINE_VERBOSITY"
if [ -z "$JYTHONPATH" ] ; then
JYTHONPATH="$GRIDWORKS_WEBAPP/WEB-INF/lib/jython"
JYTHONPATH="$REFINE_WEBAPP/WEB-INF/lib/jython"
else
JYTHONPATH="$GRIDWORKS_WEBAPP/WEB-INF/lib/jython${SEP}$JYTHONPATH"
JYTHONPATH="$REFINE_WEBAPP/WEB-INF/lib/jython${SEP}$JYTHONPATH"
fi
add_option "-Dpython.path=$JYTHONPATH"

View File

@ -22,10 +22,10 @@ echo where [options] include:
echo.
echo /? print this message and exit
echo.
echo /p <port> the port that Gridworks will listen to
echo /p <port> the port that Google Refine will listen to
echo default: 3333
echo.
echo /i <interface> the host interface gridworks should bind to
echo /i <interface> the host interface Google Refine should bind to
echo default: 127.0.0.1
echo.
echo /w <path> path to the webapp
@ -40,8 +40,8 @@ echo /x enable JMX monitoring (for jconsole and friends)
echo.
echo and <action> is one of
echo.
echo build ..................... Build Gridworks
echo run ....................... Run Gridworks
echo build ..................... Build Google Refine
echo run ....................... Run Google Refine
echo.
echo clean ..................... Clean compiled classes
echo distclean ................. Remove all generated files
@ -49,7 +49,7 @@ echo.
goto end
:fail
echo Type 'gridworks /h' for usage.
echo Type 'refine /h' for usage.
goto end
:endUtils
@ -69,7 +69,7 @@ rem --- Read ini file --------------------------------------------
set OPTS=
for /f "tokens=1,2 delims==" %%a in (gridworks.ini) do (
for /f "tokens=1,2 delims==" %%a in (refine.ini) do (
set %%a=%%b
)
@ -88,19 +88,19 @@ if ""%1"" == ""/x"" goto arg-x
goto endArgumentParsing
:arg-p
set GRIDWORKS_PORT=%2
set REFINE_PORT=%2
goto shift2loop
:arg-i
set GRIDWORKS_HOST=%2
set REFINE_HOST=%2
goto shift2loop
:arg-w
set GRIDWORKS_WEBAPP=%2
set REFINE_WEBAPP=%2
goto shift2loop
:arg-m
set GRIDWORKS_MEMORY=%2
set REFINE_MEMORY=%2
goto shift2loop
:arg-d
@ -125,27 +125,27 @@ set JAVA_OPTIONS=
:gotJavaOptions
set OPTS=%OPTS% %JAVA_OPTIONS%
if not "%GRIDWORKS_MEMORY%" == "" goto gotMemory
set GRIDWORKS_MEMORY=1024M
if not "%REFINE_MEMORY%" == "" goto gotMemory
set REFINE_MEMORY=1024M
:gotMemory
set OPTS=%OPTS% -Xms256M -Xmx%GRIDWORKS_MEMORY% -Dgridworks.memory=%GRIDWORKS_MEMORY%
set OPTS=%OPTS% -Xms256M -Xmx%REFINE_MEMORY% -Drefine.memory=%REFINE_MEMORY%
if not "%GRIDWORKS_PORT%" == "" goto gotPort
set GRIDWORKS_PORT=3333
if not "%REFINE_PORT%" == "" goto gotPort
set REFINE_PORT=3333
:gotPort
set OPTS=%OPTS% -Dgridworks.port=%GRIDWORKS_PORT%
set OPTS=%OPTS% -Drefine.port=%REFINE_PORT%
if not "%GRIDWORKS_HOST%" == "" goto gotHost
set GRIDWORKS_HOST=127.0.0.1
if not "%REFINE_HOST%" == "" goto gotHost
set REFINE_HOST=127.0.0.1
:gotHOST
set OPTS=%OPTS% -Dgridworks.host=%GRIDWORKS_HOST%
set OPTS=%OPTS% -Drefine.host=%REFINE_HOST%
if not "%GRIDWORKS_CLASSES_DIR%" == "" goto gotClassesDir
set GRIDWORKS_CLASSES_DIR=server\classes
if not "%REFINE_CLASSES_DIR%" == "" goto gotClassesDir
set REFINE_CLASSES_DIR=server\classes
:gotClassesDir
if not "%GRIDWORKS_LIB_DIR%" == "" goto gotLibDir
set GRIDWORKS_LIB_DIR=server\lib
if not "%REFINE_LIB_DIR%" == "" goto gotLibDir
set REFINE_LIB_DIR=server\lib
:gotLibDir
rem ----- Respond to the action ----------------------------------------------------------
@ -158,8 +158,8 @@ if ""%ACTION%"" == ""distclean"" goto doAnt
if ""%ACTION%"" == ""run"" goto doRun
:doRun
set CLASSPATH="%GRIDWORKS_CLASSES_DIR%;%GRIDWORKS_LIB_DIR%\*"
"%JAVA_HOME%\bin\java.exe" -cp %CLASSPATH% %OPTS% -Djava.library.path=%GRIDWORKS_LIB_DIR%/native/windows com.google.refine.Refine
set CLASSPATH="%REFINE_CLASSES_DIR%;%REFINE_LIB_DIR%\*"
"%JAVA_HOME%\bin\java.exe" -cp %CLASSPATH% %OPTS% -Djava.library.path=%REFINE_LIB_DIR%/native/windows com.google.refine.Refine
goto end
:doAnt

6
refine.ini Normal file
View File

@ -0,0 +1,6 @@
#REFINES_PORT=3333
#REFINES_HOST=127.0.0.1
#REFINES_MEMORY=1024M
#JAVA_HOME=""
#JAVA_OPTIONS="-XX:+UseParallelGC -XX:+UseLargePages"