Building Celeste
Of course you will need a copy of the Celeste sources. (see HOWTO Check Out Celete from the Repository)
Required Environment and Tools
- Java 1.6 http://java.sun.com/javase/downloads/index.jsp
Obtain and install the Java 1.6 (or later) Java development environment. Note that you may need to make special arrangements on your operating environment to ensure that you use Java 1.6 to build Celeste if you have several different Java versions installed.
- Ant http://ant.apache.org
Apache Ant version 1.7.0 or later is necessary to build Celeste. Ant is often already available on contemporary operating environments. If so, make sure that it is up-to-date and is in your command path. Use {{ant -version}.
- classdepandjar https://classdepandjar.dev.java.net
The Java jar file classdepandjar.jar is an ant plugin that analyzes class dependencies in Java class files and emits a minimal list of .class files needed to create a self-contained jar file with a given entry point.
Download the file classdepandjar.jar file and place it in the lib/ directory of your Celeste source tree.
Build targets
The file build.xml, in the topmost Celeste source directory, contains the definitions for various build targets for {{ant}.
| Target Name | Description |
|---|---|
| all | Rebuild all of Celeste, including javadocs. |
| clean | Remove build artifacts, excepting javadocs. |
| clobber | Remove build artifacts, including javadocs. |
| compile | Rebuild .class files (but don't disturb existing jar files). Useful when making changes while Celeste is still running, as it avoids disrupting class loading. |
| doc | Rebuild the javadoc files. |
| jars | Build all the jar files. This is the default target. It produces everything needed to run Celeste. |
| celeste-client | Build the client-side interface jar file. |
| binary-dist | Build all the jar files and produce a compressed tar file containing a complete run-time system. |
A useful (and recommended) build command builds the entire Celeste system producing all of the jar files, and a compressed tar file containing a complete installation. In a terminal window, run the following line:
$ ant clobber all binary-dist Buildfile: build.xml $
Fedora Notes
Install the openjdk and openjdk developer packages:
$ sudo yum install java-1.6.0-openjdk java-1.6.0-openjdk-devel
Mac OSX Notes
- Create a shell script that sets the JAVA_HOME environment variable before invoking ant:
ant script
#!/bin/sh - java_framework=/System/Library/Frameworks/JavaVM.framework export JAVA_HOME=${java_framework}/Versions/1.6.0/Home exec /usr/bin/ant "$@"
When building the system, invoke this shell script explicitly, or install the script as ant in a directory that precedes /usr/bin in your shell path.
Comments (1)
Jun 01
ank201 says:
I tried to build the Celeste using the mentioned commands but I got a BUILD FAIL...I tried to build the Celeste using the mentioned commands but I got a BUILD FAILED error: "Too many files open." This build error shows up during the classdepandjar archivinig. I searched online for this error and it appears that it has nothing to do with Celeste specifically, but I just I wanted to make sure.
Note: I need to modify the source file in order to satisfy the need for our project, so I have to be able to build it first.
Any help will be appreciated.