Premise:
Configure the package related plug-in, look at the packaging of the results to add different plugin, installed good m2eclipse.
The following steps take the packing of the war package as an example.
Steps:
- such as: Right-click, select Run As or Debug as to select Maven Build. The difference between the following two is that the first one will pop up an interface for you to select the previous build goal as the build goal, and the second will let you enter goal to complete the build.
- Enter: Package at goals and click Run to execute.
Description
- There are many ways maven can be packaged, so refer to the blog that was reproduced in the previous article: http://www.cnblogs.com/lzxianren/p/4904980.html
- If you need to skip the test, enter it at goals: Package-dmaven.test.skip=true or package-dskiptests, the difference is
-dskiptests, does not execute the test case, but compiles the test case class to generate the corresponding class file to target/test-classes;
-dmaven.test.skip=true, do not execute test cases, nor compile test case classes;
- If you still need clean, add clean at the front.
- MAVEN goals can have multiple, will be executed one after the other, so the above is said nonsense ...
Problem:
- Disable Maven warning Message-"Selected war files include a web-inf/web.xml which will is ignored" modify the version of the War pack plugin. Specific reference: Stack Overflow
Reference:
- Maven Packaging without Test (skip tests)
- The difference between-dskiptests and-dmaven.test.skip=true in maven
- Guide to Creating assemblies
Packaging practices under Eclipse