How to build Otsopack ********************* The official releases of Otsopack can be found `here `_. In this page, we explain how to generate the necessary jars from the code on the repository. Java SE version =============== Otsopack uses `maven `_ . It is divided in several subprojects (otsoAuthentication, otsoCommons, etc.). Each subproject has its own *pom.xml*. Besides, the **root directory** has another **pom.xml** to generate all the modules in the correct order. For those not familiarized with *Maven*, consider using: * *mvn eclipse:eclipse*: to generate `Eclipse IDE`_'s descriptors for each module * *mvn build*: to compile all the subprojects * *mvn clean*: to clean the files and directories generated by a previous build in all the subprojects * *mvn package*: to generate jars for all the subprojects * add *-Dmaven.test.skip=true* to skips the tests * add *-am -pl * to generate just one module and its dependencies (e.g. *-am -pl otsoCommons*) * *mvn install*: to install the jars in your local maven repository * add *-Dmaven.test.skip=true* to skips the tests After the jar generation (i.e. *mvn package*), you may want to check the following directories: * *otsoSE/target* to find Otsopack's **Java SE version** * *otsoSE/target/lib* to find all its (direct or transitive) dependencies Android version =============== The **Android release** is generated using the `ant buildfile `_ located in `otsoDroid/otsoDroid/build.xml `_. *OtsoDroid* depends on *otsoCommons* and its dependencies. The dependencies of *otsoCommons* are copied to *otsoDroid/otsoDroid/libs/* whenever *otsoCommons* is built. *otsoCommons* itself is copied to *libs* folder during the *ant* run. Therefore, prior to the *otsoDroid* build, we need to build *otsoCommons* as explained in the previous section: #. Go to the root of the project. #. Execute: *mvn package -Dmaven.test.skip=true -am -pl otsoCommons* After building *otsoCommons*, we can simply go to *otsoDroid/otsoDroid* and run any of the targets defined in the *ant buildfile*. If it is the first time you use that *buildfile*, copy *local.properties.dist* to *local.properties* and edit it to specify the path of your Android SDK. To generate a *jar* from the source run: * *ant clean*: to clean the files and directories generated by a previous build * *ant release*: to generate a *jar* with *otsoDroid* After the jar generation, you may want to check the following directories: * *otsoDroid/otsoDroid/bin* to find Otsopack's **Android version** * *otsoDroid/otsoDroid/libs* to find all its (direct or transitive) dependencies