您的位置:首页 > 编程语言 > Java开发

Maven by Example 1.3. A Common Interface

2014-12-22 09:31 246 查看
Before Maven provided a common interface for building software, every single project had someone dedicated to managing a fully customized build system. Developers had to take time away from developing software to learn about the idiosyncrasies(个性,[心理] 特异品质)
of each new project they wanted to contribute to. In 2001, you’d have a completely different approach to building a project like

Turbine than you would to building aproject like
Tomcat. If a new source code analysis tool came out that would perform static analysis on sourcecode, or if someone developed a new unit testing framework, everybody would have to drop what they were doing and figure out how to fit it into each project’s
custom build environment. How do you run unit tests? There were a thousand different answers. This environment was characterized by a thousand endless arguments about tools and build procedures. The age before Maven was an age of inefficiency, the ageof the
"Build Engineer".

Today, most open source developers have used or are currently using Maven to manage new software projects. This transition is less about developers moving from one build tool to another and more about developers starting to adopt a common interface for project
builds. As software systems have become more modular, build systems have becomemore complex, and the number of projects has sky-rocketed. Before Maven, when you wanted to check out a project like

Apache ActiveMQ or
Apache ServiceMix from Subversion and build it from source, you really had to set aside about an hour to figure out the build system for each particular project. What does the project need to build? What libraries do I need to download? Where doI put them?
What goals can I execute in the build? In the best case,it took a few minutes to figure out a new project’s build, and in the worst cases (like the old Servlet API implementation in the Jakarta Project), a project’s build was so difficult it would take multiple
hours just to get to the point where a new contributor could edit source and compile the project. These days, you check it out from source, and you run
mvn install
.

While Maven provides an array of benefits including dependency management and reuse of common build logic through plugins, the core reason why it has succeeded is that it has defined a common interface for building software. When you see that a project like
Apache ActiveMQ uses Maven, you can assume that you’ll be able to check it out from source and build it with
mvn install
without much hassle. You know where the ignition(点火,点燃;着火,燃烧;点火开关,点火装置) keys goes,you know that the gas pedal is on the right-side, and the brake is onthe left.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  java maven maven java