Fun with maven configuration articles

       The maven structure itself is very small, only a few megabytes. It  is a software project management tool based on the project object model ( POM ), which can manage the construction, report and documentation of the project through a small piece of description information .
One: After downloading maven, you need to do a two-step configuration

 1. Configure environment variables so that they are effective under CMD
    

Click the new button

  s
 The variable value is worth your maven path

 
Click OK to exit
 After the configuration is complete, enter mvn -v in the CMD (check the maven version)


When the above appears, your first step is configured.

 2. Just configure settings.xml. This configuration file is very important. The configuration file is in the conf directory.
          For starters, we only care about one node inside
           <localRepository>E:/dev/repository</localRepository>
        The localRepository configuration specifies a place to put the jar package, which is the warehouse, and you can ignore the others. All the jars you depend on in the pom.xml file in the project will be here.
         We are coming to the mvn clean command, and the result is Cannot execute mojo: clean. It requires a project with an existing pom.xm, indicating that the maven project has not been created yet
     Two: After the configuration is complete, you need to create a maven project

            Create project engineering
                 

                  Select maven project, click Next-->Next    
                       
                    Enter web in the filter, and click maven-archetype-webapp. This time, it is mainly to create a maven web project. Then click Next,

    There are a few items that need to be filled in. 1. Group Id This is the unique identifier of the group id and 2 artifact id  project, which actually corresponds to the name of the project. Their relationship will be discussed in detail in the later chapters. Now it is just a demo.
     After filling in, click'finish', and the first project file is ok.
       The first maven project was successful, 
       The following chapters about project packaging and pom.xml will be introduced
    



          

  

Guess you like

Origin blog.csdn.net/samz5906/article/details/43235091