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.
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<http://www.eclipse.org/>`_‘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 <module-name> 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
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