I've recently been trying to setup maven for building my android projects, using the maven-android-plugin.
Whilst this is a good exercise, I'm not convinced that the benefits will outweigh the frustration in getting it working.
Can anyone give me some pros/cons on using Maven for android? I'm not looking for subjective answers, but the facts on whether its worth the effort.
Regards
Better dependency management - Maven is superior to Ant when it comes to dependency management. For example: With Maven, you don't have to worry about transitive dependencies. If your project depends on library A, you just add a direct dependency on A and let A worry about its own dependencies.
Advantages of using Maven:One can easily build their project to jar,war etc. as per their requirements using Maven. Maven makes easy to start project in different environments and one doesn't needs to handle the dependencies injection, builds, processing, etc. Adding a new dependency is very easy.
Maven will do the rest for you when you build (download to local cache if not already existing, fetch dependencies, javadoc etc). Even if you were to copy your project to another PC without the JAR's, delete the JAR's etc, if Maven is present it will re-download them automatically when you build.
Well maven is worth it if you are developing a j2ee application to save you from the jar hell when using external apis
So if you are not going to use the maven repositories its not worth it.
I hate maven because of the problems you already mentioned. But it saves a lot time if you need xy jars. Im currently developing a eclipse plugin which can download required jars and dependencies form maven without the maven compiler or pom files. But its far from ready
You can also create a separate maven project and include it in the android project im not sure if it works with android but you can do it in standart jdk
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With