This page explains how the HelloWorld project provided on the Cordova homepage can be built with the xcode-maven-plugin.
Within the HelloWorld example provided on the Cordova homepage the CordovaLib project is embedded as source code into the HelloWorld project. The xcode-maven-plugin uses the dependency resolution mechanism provided by maven. With this approach there is no need for including dependent project on the level of the source code. Instead the dependent projects are built in there own cycle and consumed afterwards without there source code based project. This means: first we build the CordovaLib using the xcode-maven-plugin. As the result of that step the headers and the compiles library representing the CordovaLib are exposed in a binary repository. After that we build the HelloWorld project. The HelloWorld project declares a depenency to the CordovaLib on the level of the maven project. Before the HelloWorld project is compiled the headers and the binary representing the CordovaLib are materialized into the HelloWorldProject. In order to get this working we need to adjust the header search path and the library search path accordingly.
Unzip the attached zip file in an arbitrary folder, cd into the bin directory and run ./all.sh ${CORODVA_VERSION} . CORDOVA_VERSION is the latest version of the cordova library.
If you are behind a firewall adjust the HTTP_PROXY in file bin/prepareCordova.sh.
This shell script
After calling the script the
As always: the best documentation is the source code. Please review the shell scripts and the pom files that can be found inside the mavenized projects.