Since v0.1.2, Maven 2.0. is used to manage JFresnel (build, test, deployment). Older releases (up to 0.1.1) were using Ant.
Download and Install Maven
Download the latest release of Maven. Installation instructions and guides can be found in the documentation section.
Getting JFresnel's Source Code
JFresnel's source code can be checked out anonymously from the JFresnel SVN repository with the following command:
svn checkout svn://scm.gforge.inria.fr/svn/jfresnel
This will create a jfresnel directory containing the following hierarchy:
- examples/
- fsl-core/ (FSL public API)
- pom.xml
- src/
- fsl-jena/ (FSL query engine for Jena)
- pom.xml
- src/
- fsl-sesame/ (FSL query engine for Sesame)
- pom.xml
- src/
- jfresnel-core/ (JFresnel public API)
- pom.xml
- src/
- jfresnel-jena/ (JFresnel for Jena)
- pom.xml
- src/
- jfresnel-sesame/ (JFresnel for Sesame)
- pom.xml
- src/
- pom.xml
Each directory is a sub-project which can be built, tested and installed on its own. There is also a pom.xml file in the main directory to build, test and install all modules.
JFresnel is already compiled, available as JAR files which can be downloaded through the following Maven repository:
Dependencies
JFresnel currently consists of six modules with some dependencies. Every module is characterized by a pom.xml file in its directory.
JFresnel depends also on the following libraries: Jena, Sesame 2, ANTLR, JUnit. However these dependencies will be taken care of by Maven for you. You don't have to look for JAR files for these libraries, Maven will get them from on-line repositories declared in the pom.xml files.
For example, the jfresnel-jena module depends on the jfresnel-core module and the fsl-jena module, as well as on junit. The pom.xml file thus contains the following items:
Building and Testing JFresnel
Maven 2.0 is based around the central concept of a build lifecycle. You only need to learn a small set of commands to build a Maven project.
Some useful commands follow:
- compile : compile the source code of the project
For example, if you want to compile the fsl-jena module, go to directory fsl-jena and type mvn compile.
~/jfresnel/fsl-jena$ mvn compile
This command will compile the java files in ~jfresnel/fsl-jena/src/main/ and put the resulting class files in ~/jfresnel/fsl-jena/target/classes/
- test : run the unit tests
~/jfresnel/fsl-jena$ mvn test
- package : build the JAR files produced by this module
~/jfresnel/fsl-jena$ mvn package
- install : install the JAR files of this module into the local repository, for use as a dependency in other projects locally
~/jfresnel/fsl-jena$ mvn install