Maven tutorial (5) - Maven directory structure commonly used commands and instructions

Original Address: https://blog.csdn.net/liupeifeng3514/article/details/79543159

1, Maven directory structure

Maven overall directory structure as shown below:

 

 

bin directory: This directory contains the mvn run scripts to configure the java command, ready classpath and related Java system properties, and then execute Java command.

boot directory: This directory contains only one file to maven3.5.2 example, the file is plexus-classworlds-2.5.2.jar. plexus-classworlds is a class loader frame, relative to the default java class loader, which provides a richer syntax to make configuration easier, Maven own load frame using the library. For more information on classworlds please refer http://classworlds.codehaus.org/ . Maven for the average user, the file does not have to be concerned about.

conf directory: This directory contains a very important document settings.xml, core Maven configuration file.

lib: This directory contains all the required Maven runtime Java class libraries, sub-module Maven itself is developed, so the user can see such as mavn-core-3.2.2.jar, maven-model-3.2.2.jar such documents, in addition Maven used herein also includes some third party, such as dependence commons-cli-1.2.jar, commons-lang-2.6.jar like.

2, Maven Common Command Description

  • mvn clean: represent running the cleanup operation (default data clean up the target folder);
  • mvn clean compile: represent running the compiler after first run the cleanup, the code will be compiled into the target folder;
  • mvn clean test: run the cleanup and testing;
  • mvn clean package: run the cleanup and packaging;
  • mvn clean install: Run clean-up and installation, will lay the installation package to a local warehouse, so that other projects can call;
  • mvn clean deploy: run the cleanup and release (PW to publish above).

Most of the above commands are ligatures, we can also split were implemented, it is a living, personal preferences and needs, Eclipse Run As maven project will provide for commonly used commands.

3, special instructions

Since Maven3 out subsequent Eclipse IDE often are integrated with Maven project management tool, so there will not be specific to you to say how Maven plug-in installed in Eclipse, in a subsequent presentation may mention how the section in Eclipse configure our own Maven, which are relatively simple content, everyone can find their own way.

I wish you are able to master this easy to use project management tool, if you like a friend concerned about the technology can also learn about other aspects of this technology, and similar framework, will give you a simple example: Gradle. As to Make before Maven, Ant silly what I think it is not necessary to go to learn, basically will not be used, to be realistic, to eat things most important thing.

 

Guess you like

Origin www.cnblogs.com/dyh004/p/11579282.html