我使用我的特定配置文件生成网站时遇到问题。我的个人资料设置如下:
<profiles>
<profile>
<id>codequality</id>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<configuration>
<outputDirectory>../target/site/${project.name}</outputDirectory>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<version>2.7.1</version>
<configuration>
<linkXref>true</linkXref>
<targetJdk>1.6</targetJdk>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<version>2.12</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jdepend-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<version>2.4.0</version>
<configuration>
<xmlOutput>true</xmlOutput>
<effort>Max</effort>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>dashboard-maven-plugin</artifactId>
</plugin>
</plugins>
</reporting>
</profile>
</profiles>
当我运行cmd: mvn site -P codequality 时,会生成该站点,但不存在findbugs报告。它包含这个:
target/
└── site
├── css
│ ├── maven-base.css
│ ├── maven-theme.css
│ ├── print.css
│ └── site.css
└── images
├── collapsed.gif
├── expanded.gif
├── external.png
├── icon_error_sml.gif
├── icon_info_sml.gif
├── icon_success_sml.gif
├── icon_warning_sml.gif
├── logos
│ ├── build-by-maven-black.png
│ ├── build-by-maven-white.png
│ └── maven-feather.png
└── newwindow.png
有人可以帮助我吗?
答案 0 :(得分:0)
首先为什么要更改网站生成的输出文件夹?此外,您没有将信息提供给findbugs插件,因为它将使用当前目标/文件夹(默认值:$ {project.reporting.outputDirectory})而不是给定的一个。