====== OpenBEAT Developer guide ====== ===== Building from subversion ===== OpenBEAT uses multimodule projects as proposed by the [[http://maven.apache.org|Apache Maven]] project. We use Maven to build our project and create distributable binaries. To be able to build the code from subversion it should suffice to follow the direction on this page. However, we recommend that you get aquinted with Maven by reading up on the project on its website as well as the online book [[http://www.sonatype.com/books/maven-book/reference/|Maven: The Definitive Guide]]. ==== Getting OpenBEAT ==== When you are building OpenBEAT you should check out the current development branch on trunk. As of May 19 2009 there additional folders in trunk, not directly related to the source code of the project. Hence, we recommend you only checkout the //openbeat// folder in trunk with the following command: ''svn co http://cadia.ru.is/svn/repos/OpenBEAT/trunk/openbeat'' This will give you a directory structure like this: * openbeat/ * openbeat/pom.xml * openbeat/openbeat-behavior * openbeat/openbeat-bml * openbeat/openbeat-bmlrealizer * openbeat/openbeat-core * openbeat/openbeat-discourse * openbeat/openbeat-dist * openbeat/... We will focus on working in the top level directory which enforces default settings for all submodules, e.g. plugin settings and versioning of 3rd party dependencies. There is however a one special submodule, //openbeat-dist// which is the distribution module. From that location we have to invoke a special assembly command ''mvn assembly:assembly'' which creates a zip bundle with all dependencies and runnable scripts to launch OpenBEAT. ==== Building from command line ==== The current development release of OpenBEAT expects at least JDK 1.6 to be present on the development machine. Building OpenBEAT is as easy as executing ''mvn clean install'' which will compile, test, package and install the OpenBEAT modules into your local Maven repository, including source packages. Following commands are very useful: ^ Command ^ Description ^ | ''mvn clean'' | to remove all build artifacts | | ''mvn compile'' | to compile sources | | ''mvn test'' | to run all tests | | ''mvn install'' | to install artifacts into local repository | ==== Developing with IntelliJ ==== The team used [[http://www.jetbrains.com/idea/|IntelliJ IDEA]] while developing OpenBEAT. IntelliJ integrates nicely with Maven and can generate IntelliJ projects based on the maven projects. Let's assume we have checked out the source as described above and have IntelliJ running. Let's create an IntelliJ project to build and develop further on OpenBEAT. === Create IntellIJ project from OpenBEAT sources === Select File -> New Project {{:openbeat:file_new_2.jpg?100x200}} Select Import project from external model {{:openbeat:import_project_2.jpg?410x400}} Select Maven {{:openbeat:select_maven_2.jpg?410x400}} Select root directory {{:openbeat:select_directory_2.jpg?410x400}} Press next until finish {{:openbeat:finish_2.jpg?410x400}} You're now able to hack on the OpenBEAT code yourself. Note: If all you wanted was to add new sources (NLP, generators, filters, speech/timing) you're not required to have a running development instance of OpenBEAT itself. Since the entire system is packaged and shipped with Maven, you're able to create a Maven project, entirely outside of OpenBEAT and set OpenBEAT as a dependency for your own project. Then you can create a jar from your project and add it to the executable described in the [[openbeat:userguide|user guide]].