On 10/29/06, 向秦贤 <[EMAIL PROTECTED]> wrote:
Hi, Thanks hint. Althrough I'm a newbie to maven, I'd to insist on this help option, just like maven scanning. Supposed that a man get a project code, his first work is just to build, and build what, can build what, he thinks, but maven cannot answer. Isn't it?
Qinxian, I fear you might have missed the most important part of Wendy's response to your question:
For the most part, the 'goals' are the lifecycle phases, and they are the same for every project.
In other words, once you learn Maven, you will *not* need to try to understand the individual targets of the build script of some particular project ... it will be just like every other Maven based project. Learn one of them, and you've learned the fundamental structure of all of them. Maven's philosophy about building software is very different from Ant's. To become comfortable with it, you have to learn to accept the fact that Maven is very much about enforcing common standards. You actually can do a lot of "nonstandard" things with Maven, but it is so much extra work that you (as a developer of a project using Maven for builds) are *much* better off going with the standard conventions that Maven encourages. If you are simply trying to build a project that has a build infrastructure based on Maven, then you are a *huge* beneficiary of this. Simply do the following: * Install Maven itself per the instructions on the website. * Check out or download the sources for the project you want to build. * Change your directory to the top level directory of that project * Execute the command "mvn clean install" * And everything should just work. No fussing with downloading your own dependencies. No need to edit "build.properties" files. Personally, I was a long time holdout for using Ant based build environments. But, if you look at the current build infrastructure for the projects I care about (Shale, MyFaces, Struts, (eventually) Jakarta Commons), you'll see a definite migration towards using Maven build environments. Why? Because it is better -- for both the project developers *and* the users who want to build the sources of those projects themselves. So, what should *you* do? The first thing is to change your question. Instead of asking "how does the build process for project XYZ work?", simply ask the question "how does the build process for any Maven-based project work?" Answer that question once, and you will instantly understand the build environment for essentially all Maven based projects. Regards,
Qinxian
Craig McClanahan
