Maven Quick-start Guide [closed]

陌路散爱 提交于 2021-02-18 10:20:15

问题


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.


回答1:


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.




回答2:


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.




回答3:


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...




回答4:


One book I really like it´s "Better Builds with Maven" (http://www.maestrodev.com/support/) - a little dated but still contains good tutorials to get you started



来源:https://stackoverflow.com/questions/2692029/maven-quick-start-guide

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!