Lifecycle

  1. Clean: The project is cleaned
  2. Default: indicates the default construction
  3. Site: project construction site

Some of the more important steps are as follows

  1. clean

    Used to clear all files generated by the previous build, including the Target directory

    Note: All files generated by Install were removed

  2. validate

    Use to verify that the project is correct and that the necessary information is available

  3. compile

    Compile the source code of the project, mainly Java files

    SRC /main/ Java and SRC /test/ Java

    Generate the target file and put the configuration file and the.class file in it

  4. test

    Test the code compiled with the appropriate framework

    Note: Test often fails, so we can ignore tests

  5. packaging

    Get the compiled files and package them, including JAR, POM, and WAR

  6. vertify

    This step is used to verify that test meets the criteria

  7. install

    Install the package to your local repository and make sure it is available for other local projects

  8. deploy

    Copy the final package to the remote repository

    Share it with other developers and projects

plugin

dependency

To help projects analyze dependencies, you generally don’t need to write them yourself

resources

Reduce static file filtering

jetty

Fast deployment on the Web

Debugging is convenient and saves time

build

Can be divided into

Project Build Global configuration: globally valid

Profile Build configuration: Configures different profiles

packaging

The package can be war, POM, and JAR

JAR can be used for small projects. It can be used for small projects. JAR can be used for small projects, but it can be used for small projects

WAR is suitable for projects that need to be deployed

scope

The scope of application is mainly divided into test and PROVIDED

Test is valid for the test scope

The Provided is valid for both the compile and test process