现在我来开发一个report plugin,我希望我的report plugin输出的hello world能够被集成到mvn site产生的站点中。
1.用向导创建一个report plugin工程:
mvn archetype:create -DgroupId=org.freebird -DartifactId=myreport -DarchetypeArtifactId=maven-archetype-mojo
/**
* Goal which touches a timestamp file.
*
* @goal my-report
*
* @phase site
*/
public class MyMojo
extends AbstractMojo
{
3.替换父类为AbstractMavenReport
需要在pom.xml中添加以下依赖:
<dependency>
<groupId>org.apache.maven.reporting</groupId>
<artifactId>maven-reporting-api</artifactId>
<version>3.0</version>
</dependency>
<dependency>
<groupId>o