I'm tasked with getting a development environment set up for a new program at work. The lead has chosen Eclipse as the IDE for its OSGi support and Maven as the build utility.
I've struggled through getting Maven integrated with Eclipse and I'm grudgingly declaring success and moving forward.
My question: is there any sort of guide to getting started with Maven? I've found boatloads of documentation, most all of it very, very detailed and simultaneously unhelpful. I downloaded a 300+ page book that goes into excruciating detail about POMs, but doesn't tell you how to initialize a project from existing source.
Hopefully, this question will result in a pointer to something I missed or a collection of links for those who follow me.
On a mvn install , it frames a dependency tree based on the project configuration pom. xml on all the sub projects under the super pom. xml (the root POM) and downloads/compiles all the needed components in a directory called .
The groupId is a parameter indicating the group or individual that created a project, which is often a reversed company domain name. The artifactId is the base package name used in the project, and we use the standard archetype.
groupId uniquely identifies your project across all projects. A group ID should follow Java's package name rules. This means it starts with a reversed domain name you control. For example, org.apache.maven , org.apache.commons.
Maven 1 included a plugin for working with related of projects—or multiprojects. Maven 2 takes multiproject builds a step further by including a specialized parent descriptor and native multiproject execution support.
If you are new to Maven, I'd still suggest to start with Maven by Example, the "first" book of Sonatype.
This book is an example-driven introduction. If you are new to Maven, read this book first. It will introduce all of the basics and take you all the way up to a multi-module enterprise project.
Maven by Example is really not that big and reading it is definitely worth it. Sure, there are other tutorials around there and you could get started without reading it but the fact is that this book has been written for beginners and will give you the basis to understand how things work. It will just save you some time later.
Later, use Maven: The Complete Reference as... complete reference.
I personally got a lot of value out of "Better Builds with Maven". It is also free, which I like. http://repo.exist.com/dist/maestro/1.7.0/BetterBuildsWithMaven.pdf. The maestrodev site has a bunch of examples as well.
As a basic start i would suggest to take a look at 5 Minutes Guide on the Maven site. If you have an existing project you should take a look in particular the folder structure and check if your's fit with the default folder structure if not change it accordingly. Is your software organized in Modules as Maven expect it? What kind of Project do you have (EAR, WAR, ?). If start you have to write a pom and define the depenencies etc. and try to compile your project via Maven...
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