Maven learning

newbaby2012 2022-02-13 08:17:22 阅读数:176

maven learning

Maven yes java Written

Warehouse classification

There are two kinds of warehouses :

Local and remote , There are three types of remote : The central warehouse , The mirror image of the central warehouse ( For example, there is one on each of the five continents ), Private clothes ( Inside the company , LAN usage )

Check the local warehouse first -> Check the private server again -> Recheck the image -> Then check the central warehouse , No matter what kind of , There will be the last local one

POM file

Project Object Model Project object model ,

modelVersion Can only be 4.0.0

groupId  The reverse of the company's domain name , such as com.baidu

packaging Project packaging type , such as jar,war,rar,ear,pom, The default is jar  

 maven Plug in for , There are two at compile time

resource-plugin Used to handle src Of resource The file is compiled to ,target/classes Below directory

compiler-plugin Used to handle main/java The file of , Also compiled into bytecode , And copy to classes Below directory

idea Of pom Red explosion , You can choose to specify pom Refresh

If you need to put main/java Middle Africa java Compile to target file target in , Then you have to use resources plug-in unit

 maven When executing an order , Will execute all the commands in front of it , Such as execution mvn test, Will put the front compile,test-compile Do it all once

 

Can pass package, become involved war Packages or jar package , Just packing src/main Documents in , It doesn't contain test Catalog

install Is to install the project into mvn In the local warehouse

plug-in unit

 

 

copyright:author[newbaby2012],Please bring the original link to reprint, thank you. https://en.javamana.com/2022/02/202202130817206377.html