Skip to content

Commit

Permalink
Removed dependence and references to ant build procedure
Browse files Browse the repository at this point in the history
  • Loading branch information
liebke committed Dec 18, 2009
1 parent bf38b48 commit 96d65c1
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 60 deletions.
29 changes: 9 additions & 20 deletions README.textile
Original file line number Diff line number Diff line change
Expand Up @@ -86,32 +86,19 @@ The following documentation covers the Incanter and Clojure APIs and the APIs of

h2. Building Incanter

To build Incanter, test it, and generate the api documentation yourself, run the following commands from the Incanter directory:
To build and test Incanter, you will need to have <a href="http://maven.apache.org/">Maven</a> and <a href="http://git-scm.com/">git</a> installed:

* Clone the Incanter Github repository: @git clone git://github.com/liebke/incanter.git@
* First, clone the Incanter Github repository: @git clone git://github.com/liebke/incanter.git@
* cd into the incanter directory
* Download and uncompress Incanter's dependencies: @ant deps@
* Build target/incanter-1.0-SNAPSHOT.jar: @ant@
* Run unit tests: @bin/runtests.clj@
* Generate API docs: @bin/generate_docs.clj@
* use Maven to build, test, and install Incanter: @mvn install@

(Note: the @bin/clj@ and @*.clj@ scripts won't run on Windows systems as is. Although, the Clojure code contained in the @*.clj@ scripts can be run from the Clojure shell.)


For back-end processing that doesn't require charts or visualizations, an alternative ant target, called @incanter-core@, is available that creates @incanter-core-1.0-SNAPSHOT.jar@, which only includes the 'core' and 'stats' libraries, and only depends on the clojure.jar and Parallel Colt libraries (colt.jar, netlib.jar, arpack-combo.jar).

h2. Building Incanter with Maven

To build and test Incanter with Maven, run:
@mvn package@

This will create a standard Incanter jar file, and an uberjar that includes all of Incanter's dependencies, in the ./target directory.
To start up a Clojure REPL with Incanter and its dependencies in the CLASSPATH, run: @bin/clj@

To start up a Clojure REPL with Incanter and its dependencies in the CLASSPATH, run:
or run:
@mvn clojure:repl@

or run:
@bin/incanter@

(Note: the @bin/clj@ and @*.clj@ scripts won't run on Windows systems as is. Although, the Clojure code contained in the @*.clj@ scripts can be run from the Clojure shell.)



Expand All @@ -131,3 +118,5 @@ See @lib/license.txt@ file for license terms of included libraries.
* "JGraph":http://www.jgraph.com/ (for future development)
* "Clojure-Contrib":http://code.google.com/p/clojure-contrib/ (test-is, gen-html-docs, repl-utils)
* "JLine":http://jline.sourceforge.net/
* "Joda Time":http://joda-time.sourceforge.net/

29 changes: 10 additions & 19 deletions bin/clj
Original file line number Diff line number Diff line change
@@ -1,30 +1,21 @@
#!/bin/bash

##; clj -- script to start Clojure REPL with libraries necessary for Incanter
# For native BLAS/LAPACK support
##; incanter -- script to start Clojure REPL configured with the Incanter libraries

INCANTER_HOME=.
INCANTER_LIB_DIR=$INCANTER_HOME/lib
INCANTER_SRC=$INCANTER_HOME/src/main/clojure
CLASSES_DIR=$INCANTER_HOME/build/
INCANTER_JAR=$INCANTER_HOME/target/incanter-1.0-SNAPSHOT.jar

CLOJURE_JARS=$INCANTER_LIB_DIR/clojure-1.1.0-alpha-SNAPSHOT.jar:$INCANTER_LIB_DIR/clojure-contrib.jar
## This script uses the uberjar file created by maven with the following commands
# $ mvn compile; mvn clojure:compile; mvn package

JLINE_JARS=$INCANTER_LIB_DIR/jline-0.9.94.jar
COLT_JARS=$INCANTER_LIB_DIR/parallelcolt-0.7.2.jar:$INCANTER_LIB_DIR/netlib-java-0.9.1.jar:$INCANTER_LIB_DIR/arpack-combo-0.1.jar
JFREECHART_JARS=$INCANTER_LIB_DIR/jfreechart-1.0.13.jar:$INCANTER_LIB_DIR/jcommon-1.0.16.jar:$INCANTER_LIB_DIR/gnujaxp.jar
OPENCSV_JARS=$INCANTER_LIB_DIR/opencsv-1.8.jar
PROCESSING_JARS=$INCANTER_LIB_DIR/processing/core.jar:$INCANTER_LIB_DIR/processing/
JODA_TIME_JARS=$INCANTER_LIB_DIR/joda-time-1.6.jar
CLJ_JSON_JARS=$INCANTER_LIB_DIR/clojure-json-1.1-SNAPSHOT.jar

TESTS_DIR=$INCANTER_HOME/src/test/clojure
INCANTER_HOME=.
CLASSES_DIR=$INCANTER_HOME/target/
INCANTER_JAR=$INCANTER_HOME/target/incanter-1.0-master-SNAPSHOT-jar-with-dependencies.jar

if [ -z "$1" ]; then
java -server -cp .:..:$INCANTER_JAR:$COLT_JARS:$JLINE_JARS:$CLOJURE_JARS:$JFREECHART_JARS:$OPENCSV_JARS:$PROCESSING_JARS:$JODA_TIME_JARS:$CLJ_JSON_JARS:$TESTS_DIR -Dclojure.compile.path=$CLASSES_DIR -Dincanter.home=$INCANTER_HOME jline.ConsoleRunner clojure.main
#java -server -Dclojure.compile.path=$CLASSES_DIR -Dincanter.home=$INCANTER_HOME -jar $INCANTER_JAR clojure.main
java -server -Dclojure.compile.path=$CLASSES_DIR -Dincanter.home=$INCANTER_HOME -cp .:$INCANTER_JAR jline.ConsoleRunner clojure.main
else
scriptname=$1
java -server -cp .:..:$INCANTER_JAR:$COLT_JARS:$JLINE_JARS:$CLOJURE_JARS:$JFREECHART_JARS:$OPENCSV_JARS:$PROCESSING_JARS:$JODA_TIME_JARS:$CLJ_JSON_JARS:$TESTS_DIR -Dclojure.compile.path=$CLASSES_DIR -Dincanter.home=$INCANTER_HOME clojure.lang.Script $scriptname -- $*
#java -server -Dclojure.compile.path=$CLASSES_DIR -Dincanter.home=$INCANTER_HOME -cp .:$INCANTER_JAR clojure.lang.Script $scriptname -- $*
java -server -Dclojure.compile.path=$CLASSES_DIR -Dincanter.home=$INCANTER_HOME -cp .:$INCANTER_JAR clojure.main $scriptname -- $*
fi

22 changes: 3 additions & 19 deletions bin/clj.bat
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,28 +1,12 @@
@echo off
set INCANTER_HOME=.
set CLOJURE_JAR=%INCANTER_HOME%\clojure-1.0-SNAPSHOT.jar
set INCANTER_LIB_DIR=%INCANTER_HOME%\lib
set INCANTER_SRC=%INCANTER_HOME%\src\main\clojure
set CLASSES_DIR=%INCANTER_HOME%\classes
set INCANTER_JAR=%INCANTER_HOME%\target\incanter-1.0-SNAPSHOT.jar

set CLOJURE_JARS=%INCANTER_LIB_DIR%\clojure.jar;%INCANTER_LIB_DIR%\clojure-contrib.jar

set JLINE_JARS=%INCANTER_LIB_DIR%\jline-0.9.94.jar
set COLT_JARS=%INCANTER_LIB_DIR%\parallelcolt-0.7.2.jar;%INCANTER_LIB_DIR%\netlib-java-0.9.1.jar;%INCANTER_LIB_DIR%\arpack-combo-0.1.jar
set JFREECHART_JARS=%INCANTER_LIB_DIR%\jfreechart-1.0.13.jar;%INCANTER_LIB_DIR%\jcommon-1.0.16.jar;%INCANTER_LIB_DIR%\gnujaxp.jar
set OPENCSV_JARS=%INCANTER_LIB_DIR%\opencsv-1.8.jar
set PROCESSING_JARS=%INCANTER_LIB_DIR%\processing\core.jar;%INCANTER_LIB_DIR%\processing

set JODA_TIME_JARS=%INCANTER_LIB_DIR%\joda-time-1.6.jar
set CLJ_JSON_JARS=%INCANTER_LIB_DIR%\clojure-json-1.1-SNAPSHOT.jar

set TESTS_DIR=%INCANTER_HOME%\src\test\clojure
set INCANTER_JAR=%INCANTER_HOME%\target\incanter-1.0-SNAPSHOT-jar-with-dependencies.jar

IF (%1)==() (
java -cp .;..;%INCANTER_JAR%;%COLT_JARS%;%JLINE_JARS%;%CLOJURE_JARS%;%JFREECHART_JARS%;%OPENCSV_JARS%;%PROCESSING_JARS%;%JODA_TIME_JARS%;%CLJ_JSON_JARS%;%TESTS_DIR% -Dclojure.compile.path=%CLASSES_DIR% -Dincanter.home=%INCANTER_HOME% clojure.main
java -cp %INCANTER_JAR% -Dclojure.compile.path=%CLASSES_DIR% -Dincanter.home=%INCANTER_HOME% clojure.main
) ELSE (
java -cp .;..;%INCANTER_JAR%;%COLT_JARS%;%JLINE_JARS%;%CLOJURE_JARS%;%JFREECHART_JARS%;%OPENCSV_JARS%;%PROCESSING_JARS%;%JODA_TIME_JARS%;%CLJ_JSON_JARS%;%TESTS_DIR% -Dclojure.compile.path=%CLASSES_DIR% -Dincanter.home=%INCANTER_HOME% clojure.lang.Script %1 -- %*
java -cp %INCANTER_JAR% -Dclojure.compile.path=%CLASSES_DIR% -Dincanter.home=%INCANTER_HOME% clojure.main %1 -- %*
)


3 changes: 2 additions & 1 deletion bin/incanter
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ if [ -z "$1" ]; then
java -server -Dclojure.compile.path=$CLASSES_DIR -Dincanter.home=$INCANTER_HOME -cp .:$INCANTER_JAR jline.ConsoleRunner clojure.main
else
scriptname=$1
java -server -Dclojure.compile.path=$CLASSES_DIR -Dincanter.home=$INCANTER_HOME -cp .:$INCANTER_JAR clojure.lang.Script $scriptname -- $*
#java -server -Dclojure.compile.path=$CLASSES_DIR -Dincanter.home=$INCANTER_HOME -cp .:$INCANTER_JAR clojure.lang.Script $scriptname -- $*
java -server -Dclojure.compile.path=$CLASSES_DIR -Dincanter.home=$INCANTER_HOME -cp .:$INCANTER_JAR clojure.main $scriptname -- $*
fi

2 changes: 1 addition & 1 deletion bin/incanter.bat
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
IF (%1)==() (
java -cp %INCANTER_JAR% -Dclojure.compile.path=%CLASSES_DIR% -Dincanter.home=%INCANTER_HOME% clojure.main
) ELSE (
java -cp %INCANTER_JAR% -Dclojure.compile.path=%CLASSES_DIR% -Dincanter.home=%INCANTER_HOME% clojure.lang.Script %1 -- %*
java -cp %INCANTER_JAR% -Dclojure.compile.path=%CLASSES_DIR% -Dincanter.home=%INCANTER_HOME% clojure.main %1 -- %*
)


0 comments on commit 96d65c1

Please sign in to comment.