[转载]Maven相关有关问题及使用
[转载]Maven相关问题及使用Maven相关问题及使用(1)Maven archetype:generate(2)mkdir src\main\resources,
[转载]Maven相关问题及使用
Maven相关问题及使用
(1)Maven archetype:generate
(2)mkdir src\main\resources,src\test\resources
(3)添加parent
<reporting> <outputDirectory>target/site</outputDirectory> <plugins> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>cobertura-maven-plugin</artifactId> </plugin> </plugins> </reporting> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>cobertura-maven-plugin</artifactId> <configuration> <instrumentation> <!--<ignore>.*</ignore> --> <excludes> <exclude>**/*Test.class</exclude> </excludes> </instrumentation> </configuration> <executions> <execution> <goals> <goal>clean</goal> </goals> </execution> </executions> </plugin>
21、mvn autoconf描述:autoconfig工具的封装,允许在编译时,或者编译后进行参数配置。
注意:如果你使用了m2eclipse,发现eclipse进程挂起,请在eclipse.ini文件里面加上-DinteractiveMode=false,这样eclipse在编译项目的时候就不会执行autoconfig了,需要执行autoconfig,请在命令行使用mvn autoconf:config
mvn autoconf:autoconf -Dproperties=/home/jiangyr/antx_subscription.properties
22、mvn帮助插件help:active-profiles
列出当前构建中活动的Profile(项目的,用户的,全局的)。
help:effective-pom
显示当前构建的实际POM,包含活动的Profile。
help:effective-settings
打印出项目的实际settings, 包括从全局的settings和用户级别settings继承的
配置。
help:describe
描述插件的属性。它不需要在项目目录下运行。但是你必须提供你想要描述插件
的 groupId 和 artifactId。
eg: mvn help:describe -Dplugin=assembly