I'm currently preparing to start a new project and wondering about the choice of build management tools (non-exclusive alternatives of Maven and Ant+Ivy).
The general scenario is as follows:
Regarding the envisioned project structure:
And the non-technical considerations:
Currently it looks like the best choice would be to use:
- Maven for the base (and desktop) project,
- Ant+Ivy for the Android project.
On the surface it seems like it will go fine, but my intuition tells me involving so many technologies might end up being painful in practice.
To summarize, my question is:
Given the conditions, is it OK to use the setup described in the blockquote, or should we go pure Maven/Ant+Ivy (and if so, which one and why)?
I would go with pure Maven approach.
The scenario you described is perfectly fit into an Aggregation (or Multi-Module) Project, From my own experience, compare with Ant, Maven provides a more efficient, reasonable and native way for managing multi-module project with inter-module dependencies.
Your project structure:
my-project/
common-lib/ <-- classic Java project, build as a jar library
desktop-app/ <-- classic Java project, build as a jar application
android-app/ <-- Android project, build as a apk application
android-app-test/ <-- Android Test project, build as a apk application
pom.xml
Your root pom.xml:
<modules>
<module>common-lib</module>
<module>desktop-app</module>
<module>android-app</module>
<module>android-app-test</module>
</modules>
By using android-maven-plugin, you can maintain a standard and unified way for release your multi-module project (more precisely, android-maven-plugin is used for building release for Android sub-module project) from command-line cross team.
By using two eclipse plugins: m2e and m2e-android (all available via Eclipse Marketplace), you can maintain a standard and unified way for import/develop/debug your multi-module project in Eclipse cross team.
As Maven is qualified for managing everything, there is no need to use Ant+Ivy.