[转] Project Management Maven makes things simple

xiaoxiao2021-03-05  25

Add project management features to your next Java build

Charles Chan Senior Software Developers, Finetix Llc July 30, 2003

Although Ant is a factual standard tool for building Java programs, this tool is not a project management task in many ways. Instead, the Ant provides things, Maven (Advanced Project Management Tools from Apache Jakarta Project) is available, and more. Java Developer Charles Chan will introduce Maven's characteristics and step by directively guiding you a complete Maven project settings.

Currently, most developers have a standard build tool for Ant as a Java programming project. Unfortunately, Ant's project management tool (as an alternative tool for Make) cannot meet the needs of most developers. By checking the Ant build file, it is difficult to find the relevant information of the project and other meta information (such as developer / owner, version, or site home page).

In addition to the characteristics of program construction capabilities, MAVEN also provides advanced project management tools lacking Ant. Since Maven's default build rules have high reusability, you can build a simple item with two or three lines of Maven to build a script, and more than dozen lines are required to use Ant. In fact, due to Maven's project-oriented approach, many Apache Jakarta projects are now using Maven, and the proportion of Maven in the company project is continuously increased.

What is the difference between Maven vs Ant, Maven and Ant? Before answering this question, I would like to emphasize that Maven and Ant are two different aspects of building problems. Ant provides cross-platform building tasks for Java technology development projects. Maven itself describes the advanced aspects of the project, which borrows most build tasks from Ant. Therefore, since Maven and Ant represent two differences in tools, I will only explain the difference between the two tools of the equivalent components, as shown in Table 1.

Table 1. Maven vs Ant

Maven Ant Standard Build Document Project.xml and Maven.xmlBuild.xml Feature Processing Order

$ {maven.home} /bin/driver.properties $ {project.home} /pject.properties $ {project.home} /build.properties $ {user.home} /build.properties defines through the -d command line option The last definition of the system characteristics set up.

The system feature defined by the -D command line option is first defined by the task. The first definition is first processed. Building rules build rules more dynamic (similar to programming languages); they are based on Jelly executable XML. Build rules or less static unless you use the