May 26, 2021 Maven
Maven is a project management and integration tool. M aven provides developers with a complete framework for building lifecycles. The development team was able to automate the underlying build configuration of the project in little time, as Maven used a standard directory structure and a default build lifecycle.
With multiple development team environments, Maven was able to make every job perform according to standards in a very short time. Because most engineering configurations are simple and re-usable, Maven makes it easier for developers to create reports, check, build, and test automated configurations.
Maven can help developers do the following:
In general, Maven simplifies and standardizes the construction process of the project. I t seamlessly connects compilation, publishing, document generation, teamwork, and other tasks. Maven improves re-use and is responsible for most of the build-related tasks.
Maven was originally designed in the Jakarta Turbine project to simplify the build process. T here are several sub-projects in the project, each containing slightly different ANT files. JAR files are managed using CVS.
The Apache team then developed Maven to build multiple projects at the same time, publish engineering information, deploy projects, share JAR files in several projects, and assist teams.
Maven's primary purpose is to provide it to developers
Maven engineering structures and content are defined in an xml file - pom.xml, short for Project Object Model (POM), which is the underlying component of the entire Maven system. For more information, please refer to the Maven POM section.
Maven uses conventions instead of configurations, which means that developers no longer need to create their own build processes.
Developers no longer need to care about every configuration detail. M aven provides reasonable default behavior for the project. W hen you create a Maven project, Maven creates the default engineering structure. Developers only need to place files properly, and no .xml in pom-based files.
For example, the table below shows the default configuration of the project source file, the resource file, and some other configurations.
Suppose
${basedir}
the engineering catalog:
The configuration item | The default |
---|---|
source code | ${basedir}/src/main/java |
resources | ${basedir}/src/main/resources |
Tests | ${basedir}/src/test |
Complied byte code | ${basedir}/target |
distributable JAR | ${basedir}/target/classes |
To build the project, Maven gives developers the option to configure lifecycle goals and engineering dependencies that depend on Maven's plug-in extensions and default conventions. Most of the engineering and build-related tasks are done by maven plug-ins.
Developers don't need to know how each plug-in works to be able to build any given Maven project. For more information, please refer to the Maven plug-in section.