Common Maven plug-in parameters and maven plug-ins
1. clean:
Clear files not in the default path
<Build> [...] <plugin> <artifactId> maven-clean-plugin </artifactId> <version> 2.6.1 </version> <configuration> <filesets> <fileset> <directory> some/relative/path </directory> customize the file to be cleared, relative Path <shortdes> <include> **/*. tmp </include> <include> **/*. log </include> </includes> <excludes> <exclude> **/important. log </exclude> <exclude> **/another-important.log </exclude> </excludes> <followSymlinks> false </followSymlinks> </fileset> </filesets> </configuration> </plugin> [...] </build>
This project does not run clean: skip = true
2. compile: by default, it is always compiled by JDK1.5 and can be customized.
<project> [...] <build> [...] <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.2</version> <configuration> <source>1.8</source> <target>1.8</target> </configuration> </plugin> </plugins> [...] </build> [...]</project>
Test-compile: Do not compile the test class: skip = true
3. install:
Do not install it on the local code library: skip = true
Install and upgrade to the official version:UpdateReleaseInfo= True
4.Process-resources:
Set encoding: encoding = UTF-8
Forcibly replace the target file, even if the target is up to date:Overwrite= True
Files that do not use the preload Resource function:NonFilteredFileExtensions=, Default: jpg, jpeg, gif, bmp, png
Some use preload resources, while others do not (because binary files may be accidentally changed)
<Project>... <build>... <resources> <resource> <directory> src/main/resources </directory> resource folder <filtering> true </filtering> use <shortdes> <include> **/*. xml </include> files used </includes> </resource> <directory> src/main/resources </directory> <filtering> false </filtering> NO use <excludes> <exclude> **/*. xml </exclude> remove the used </excludes> </resource>... </resources>... </build>... </project>
Specify $ {} not to replace, that is, escape: escapeString =\, will become \ $ {}
The change will be replaced with the variable content format:
<Delimiters> <delimiter >$ {*} </delimiter> * content will be replaced by <delimiter >@</delimiter> </delimiters>
Process-test-resources: Test resource not copied: skip = true
6. test: A file is output by default. You can specify the output to the screen:
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <configuration> <reportFormat>brief</reportFormat> <useFile>false</useFile> </configuration></plugin>
Skip the test phase:SkipTests= True
More details: http://maven.apache.org/plugins/