Java Eclipse Maven – Advantages of Maven for Single Man Educational Projects

eclipsejavamaven

I've spend a few hours playing around with Maven + reading some stuff on the apache official site and also a few random googled articles. By this I mean that I really tried to find the answers myself – both by reading and by doing things on my own. Also maybe worth to mention that I installed the m2e plugin so most of the time I've tried things out from Eclipse and not using the command line too much.

However aside from the generated project that for example prevent me from using the default package I didn't see that much of a difference with the standard way I've created my projects before try Maven. In fact I've almost decided to skip Maven for now and move on to the other technology I wanted to learn more in-depth – Hibernate, but when I start with opening the official page the first thing I've read was the recommendation to use Hibernate with Maven.

That get me confused and made me taking a step back and trying once more to find what I'm obviously missing right now.

As it's said in the maven.apache.. site, the true strength of Maven is shown when you work on large projects with other people, but I lack the option to see how Maven is really used in this scenario, still i think that there are maybe advantages even when it comes to working with small projects alone, but I really have difficulties to point them out.

So what do you think are the advantages of Maven when it's used for small projects writing from a single person. What are the things that I should be aware of and try to exploit (I mean features offered by Maven) that can come in handy in this situations?

Best Answer

I find the management of dependencies a big win even for solo projects. Adding some XML to the pom.xml and letting Maven worry about downloading the JAR, and putting it in the right place is really convenient.

Using the command line for building and deploying is usually much quicker. Once you have some commands in the history, six keystrokes can build, run all tests, and deploy to Tomcat. Building with Eclipse and deploying through the Tomcat Manager is about 12 careful clicks.

Even if your project stays solo, you may want to use a different machine at some point. With Maven, there is no need to have JARs in version control, just clone your GitHub repo, and mvn package will get everything you need.

Finally, you wouldn't learn Hibernate if you didn't plan on working on big projects. These days, most of those big products are built with Maven, so your time won't be wasted.

One tip: Make sure to install the Eclipse m2 plugin, otherwise Eclipse won't understand your code.