这次以配置简述的形势讲解,以下所有配置只需在父工程配置即可。
1.项目信息
- <!-- 版本控制 -->
- <scm>
- <connection>scm:git:git@github.com:lastsweetop/account.git</connection>
- <developerConnection>scm:git:git@github.com:lastsweetop/account.git</developerConnection>
- <url>https://github.com/lastsweetop/account/blob/master</url>
- </scm>
- <!-- 持续集成 -->
- <ciManagement>
- <system>Hudson</system>
- <url>http://${distribution.repository}:8080/hudson</url>
- </ciManagement>
- <!-- 项目团队 -->
- <developers>
- <developer>
- <id>sweetop</id>
- <name>sweetop</name>
- <email>sweetop@189.cn</email>
- <timezone>8</timezone>
- </developer>
- </developers>
- <!-- 项目授权 -->
- <licenses>
- <license>
- <name>Apache License,Version 2.0</name>
- <url>http://www.apache.org/licenses/LICENSE-2.0</url>
- </license>
- </licenses>
- <!-- 问题跟踪 -->
- <issueManagement>
- <system>urltracker</system>
- <url>http://10.18.96.90/URTracker/Accounts/Login.aspx</url>
- </issueManagement>
- <plugin>
- <!-- 站点生成插件 -->
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-site-plugin</artifactId>
- <version>3.2</version>
- <configuration>
- <!-- 支持国际化 -->
- <locales>zh_CN</locales>
- <reportPlugins>
- <plugin>
- <!-- 生成javadoc文件 -->
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-javadoc-plugin</artifactId>
- <version>2.9</version>
- </plugin>
- <plugin>
- <!-- 项目信息过滤 -->
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-project-info-reports-plugin</artifactId>
- <version>2.6</version>
- <reportSets>
- <reportSet>
- <reports>
- <!-- index一定要生成,否则链接问题 -->
- <report>index</report>
- <report>dependencies</report>
- <report>project-team</report>
- <report>issue-tracking</report>
- <report>license</report>
- <report>scm</report>
- <report>cim</report>
- <report>modules</report>
- <report>plugins</report>
- <report>help</report>
- <report>summary</report>
- </reports>
- </reportSet>
- </reportSets>
- </plugin>
- <plugin>
- <!-- 源码查看生成 -->
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jxr-plugin</artifactId>
- <version>2.3</version>
- <configuration>
- <!-- 多模块聚合 -->
- <aggregate>true</aggregate>
- </configuration>
- </plugin>
- <plugin>
- <!-- 代码风格检查 -->
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-checkstyle-plugin</artifactId>
- <version>2.10</version>
- <configuration>
- <!-- 使用maven社区代码风格 -->
- <configLocation>config/maven_checks.xml</configLocation>
- </configuration>
- </plugin>
- <plugin>
- <!-- 代码更改日志 -->
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-changelog-plugin</artifactId>
- <version>2.2</version>
- </plugin>
- <plugin>
- <!-- 代码隐藏bug检查 -->
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-pmd-plugin</artifactId>
- <version>3.0</version>
- <configuration>
- <!-- 多模块聚合 -->
- <aggregate>true</aggregate>
- </configuration>
- </plugin>
- <plugin>
- <!-- 测试覆盖率 -->
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>cobertura-maven-plugin</artifactId>
- <version>2.5.2</version>
- </plugin>
- </reportPlugins>
- </configuration>
- </plugin>
3.项目站点生成命令
- mvn site
- clean site site:stage -DstagingDirectory=/Users/apple/site
- <distributionManagement>
- <site>
- <id>website</id>
- <url>file:///Users/apple/site/</url>
- </site>
- </distributionManagement>
- <?xml version="1.0" encoding="UTF-8"?>
- <project name="Account" xmlns="http://maven.apache.org/DECORATION/1.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/DECORATION/1.0.0 http://maven.apache.org/xsd/decoration-1.0.0.xsd">
- <bannerLeft>
- <!-- 左上角图片 -->
- <name>maven</name>
- <src>images/apache-maven-project.png</src>
- <href>http://projects.apache.org/</href>
- </bannerLeft>
- <bannerRight>
- <!-- 右上角图片 -->
- <name>java</name>
- <src>images/java_logo.jpg</src>
- <href>http://www.java.com</href>
- </bannerRight>
- <!-- 版本信息放在右边 -->
- <version position="right" />
- <!-- 发布信息放在右边 -->
- <publishDate position="right" />
- <body>
- <breadcrumbs>
- <!-- 横条链接 -->
- <item name="lastsweetop" href="http://blog.csdn.net/lastsweetop" />
- <item name="account" href="http://192.168.115.5:8080/account/index.html"/>
- </breadcrumbs>
- <menu ref="parent"/>
- <!-- 项目信息报告 inherit表示子模块继承父模块-->
- <menu ref="reports" inherit="top"></menu>
- </body>
- <skin>
- <!-- 谷歌皮肤 -->
- <groupId>com.googlecode.fluido-skin</groupId>
- <artifactId>fluido-skin</artifactId>
- <version>1.3</version>
- </skin>
- </project>