maven compile test package



  

 

Use lifecycle commands:

Clear: mvn clean

Compile: mvn compile

Test: mvn test

Packaging: mvn package (whether to play jar or war can be configured in <packaging> in pom)

 

Introduce third-party jar packages:

 

	<build>
		<plugins>
			<plugin>
			    <groupId>org.apache.maven.plugins</groupId>
			    <artifactId>maven-shade-plugin</artifactId>
			    <version>3.1.0</version>
			    <executions>
			    	<execution>
			    		<phase>package</phase>
			    		<goals>
			    			<goal>shade</goal>
			    		</goals>
			    	</execution>
			    </executions>
			</plugin>
		</plugins>
	</build>

 After executing the package, it will automatically put the class file of the third-party jar package into the local jar

 

 

 

Use the plugin command:

Compile the project file:

mvn compiler:compile

 

Compile the test file:

mvn compiler:testCompile

 

Execute the test case:

mvn surefire:test

 

 

 

 

 

 

 

 

 

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326000267&siteId=291194637
Recommended