3

I'm trying to understand what the purpose of Maven is. Maven's site says that it is used for building projects. But if I can already build Java projects in Eclipse, why do I need Maven? What does Maven offer that Eclipse doesn't already have built in? The reason why I migrated away from development under Microsoft technologies because it became bloatware. I really have no intention on adding more complexity to my Java/Eclipse development cycle than what is necessary. Those days should be long over. As critical as I am of Microsoft's technologies, their RAD is second to none. Still, I'd be interested in knowing whether pursuing Maven can be justified. I'd rather invest my precious time learning new APIs or stuff that contributes to the actual product than wasting time with something that only slows down the process.

3 Answers 3

2

When you are developing in a industrial environment it's really import to manage your project dependencies. Every member of the team should use the same set of libraries and the same versions of the dependency libraries otherwise it will cause some unpredicted errors in the project.

This is one of the main advantage in using Maven.

IF you are using Continuous Integration Tools like Hudson,Jenkin etc You can configure automatic builds in your projects.

When doing Maven build we can define several build goals this will give you more flexibility.

Sign up to request clarification or add additional context in comments.

Comments

1

Maven is no just a "build tool", it's a build platform which takes care of building, organizing projects from a technical point of view and dependency management. It follows the priciple "Convention over Configuration". That means that your projects are some kind of "standardized", so it's guaranteed that everybody who checks out the project, has the same libraries, same structure, and so on. Maven does all its work by plugins. There are lots of plugins for the different kinds of work.

Another advantage is the version management. If you build projects in Eclipse, you can't create different versions of projects which is essential for professional development. How would you supply a version of a project without a version management? What happens when you or your customer needs a fallback version of your projects. With a build platform like Maven you can handle all this. I can't imagine how you can work professionally without a build platform.

Probably one of the best advantage is the dependency management. You don't have to copy libraries manually anymore. Maven takes care about all this. You just have to configure your dependencies on pom.xml ("Project Object Model")

On Android Maven can handle all steps, deploying, starting on device, packaging, zipaligning, and so on. None of if needs to do manually anymore.

Maven is so extensive that you can't explain it in few words. Maybe you should read on the of open books of Sonatype.

2 Comments

So what you're saying is that it's primarily used for team-oriented projects.
In team orientated projects a build platform is a must have. I would absolutely propose to use Maven in single projects too because it allows developing projects in a clean way and you don't have to take care about cumbersome dependency management issues. Once I created a multi module Android project which consists of a base lib and lite and pro version by Maven. It's probably not that easy to understand for people who don't know Maven, but it's a good example of the possibility of Maven, look here: devgems.net/?p=547
0

One of the features of Maven that I find very useful is its ability to add library dependencies from a centralized repository. If I wanted to use Spring, in Eclipse without Maven I would need to find all of the necessary jar files, determine their dependencies download them and place them on my classpath.

With Maven, I simple query the central repository, select the artifact I would like and then watch as it pulls in the artifacts dependencies.

2 Comments

I guess that would be the equivalent of Microsoft's NuNet. But even though NuGet is clean and easy to use, I notice it adds bloatware to my code. So does Maven end up doing that too? Adding unnecessary libraries?
What do you mean by bloatware? So your project needs Framework A, and Maven pulls down libraries C,D,E as dependencies of Framework A, but in reality Framework A only requires C?

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.