Compiling Svarog
Svarog isn't yet really distributed as a compiled package, so it is best to use the source from the repository and compile and run.
Contents |
[edit] How to download the development version
It's best to download the sources using git.
git clone git://escher.fuw.edu.pl/git/svarog
This will create directory svarog populated with the latest version.
If you can't/don't want to use git, you can go to http://escher.fuw.edu.pl/git/svarog and download one of the .tar.bz2 or .zip archives using the links on the right hand side.
[edit] How to compile
You will need maven.
Change into the directory svarog and execute
mvn compile
This will download the necessary maven plugins
and also some libraries needed by Svarog which are distributed separately.
Downloaded files go by default into ~/.m2/repository.
[edit] How to run
In the svarog directory execute
mvn exec:java
[edit] Accessing and generating documentation
Code is documented through java-docs, which can be accessed online http://signalml.org/svarog/apidocs/index.html.
This documentation can be also generated from the source tree:
mvn javadoc:javadoc
The generated documents are in the directory target/site/apidocs under the source tree.
[edit] Creating a jar with Svarog
Maven can generate a jar file with compiled Svarog classes:
mvn package -Dmaven.test.skip=true
The mavne.test.skip flag must be set because some tests are currently failing and maven refuses to continue.
The created package is target/svarog-0.5.0-SNAPSHOT.jar and contains all compiled classes and resources, but without dependencies.
The same command also creates a package of Svarog complete with dependencies in one file (target/svarog-0.5.0-SNAPSHOT.one-jar.jar).
[edit] Troubleshooting
On Ubuntu 10.4:
[INFO] Unable to find resource 'flanagan:flanagan:pom:1.0.3' in repository central (http://repo1.maven.org/maven2)
[INFO] [compiler:compile {execution: default-compile}]
[INFO] Compiling 1078 source files to /home/adam/svarog/svarog/target/classes
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Compilation failure
Unable to locate the Javac Compiler in:
/usr/lib/jvm/java-6-openjdk/jre/../lib/tools.jar
Please ensure you are using JDK 1.4 or above and
not a JRE (the com.sun.tools.javac.Main class is required).
In most cases you can change the location of your Java
installation by setting the JAVA_HOME environment variable.
Instaling openjdk-6-jdk (sudo apt-get install openjdk-6-jdk) helps.