Maven--01

1.maven structure

src:

  m AIN: ------------------------------> business logic code associated with the profile

      java: -------------------> business logic related code

      Reso urce: --------------------> business logic related configuration files

  test: ----------> test-related code and configuration files

      java: -------------------> test-related code

      resource: --------------------> test-related configuration files

pom.xml: ---------------------------------------> jar package depends

target: to store class files, and test class files, jar package

 

 

 

2. Some password

mvn clean: clean up the target directory

mvn complie: compile java code

mvn test: the implementation of the project test code

mvn package: The current project byte code and configuration files package

mvn install: The current project resulting package thrown into the local repository

mvn deploy: The current project resulting package thrown on PW

 

3.mvn clean test, the difference mvn test;

a. mvn clean test the latest generation of the jar package or other packages
b. not want to use mvn clean jar and want to ensure that the latest package is recommended to add  -Djar.forceCreation parameters

c.clean show the last time you compile the generated files to delete, test showed that only perform tests Code

Guess you like

Origin www.cnblogs.com/2608387044qqcom/p/12121353.html
01