Maven learning (1)

What is Maven and why should I use Maven?
The word Maven can be translated as "accumulation of knowledge" or as "expert" or "expert".
(Build = write source code + compile source code + unit test + generate documentation + package War + deployment)
Maven mainly serves the project construction, dependency management and project information management based on the Java platform.
Maven is suitable for traditional waterfall development (in waterfall model development, the project goes through the stages of requirement development, analysis, design, coding, testing and integration release.), popular agile model development, small open source class library projects, largeenterprise application
Maven is to serve the build, it is an extremely powerful build tool that can help us automate the build process, from cleaning, compiling, testing to generating reports, to packaging and deployment.
Advantages of Maven:
Maven is cross-platform, which means that the same commands can be used whether on Windows, Linux or Mac.
Maven maximizes the elimination of build duplication, abstracts the build life cycle, and provides implemented plugins for most build tasks. We no longer need to define processes, or even implement some tasks in these processes. . The simplest example is testing. We don't need to tell Maven to test, let alone tell Maven how to run tests. We just need to follow Maven's conventions to write test cases, and when we run the build, these tests will run automatically.
Maven can help us standardize the build process and release projects quickly.

(Summary):

Maven is not only an excellent and popular build tool, but also a dependency management tool and project information management tool; it provides a central repository, can help us automatically download components, can help us automate builds, and can abstract the build process and provide build Task implementation, it is cross-platform and provides a consistent operation interface to the outside world;

Maven has established rules for project directory structure, test case naming, etc. As long as these mature rules are followed, users will avoid additional learning costs when switching between projects. It can be said that convention is better than configuration ( Convention Over Configuration);

Maven can help us manage project information originally scattered in every corner of the project, including project description, developer list, version control system address, license, defect management system address, etc. These small changes may seem trivial and inconspicuous, but unknowingly save us a lot of time searching for information. In addition to the direct project information, we can also easily obtain valuable project information such as project documents, test reports, static analysis reports, source code version log reports, etc. through automatically generated sites by Maven and some existing plug-ins;

Maven also provides a free central repository for Java developers all over the world, in which almost any popular open source class library can be found. Through some Maven derivatives (such as Nexus), we can also quickly search for it. As long as the coordinates are located, Maven can automatically download it for us, saving manual labor.

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325097066&siteId=291194637