我正在尝试使用Maven Doxygen插件。我在项目的pom.xml中添加了这个:
<reporting>
<plugins>
<plugin>
<groupId>net.sf.doodleproject</groupId>
<artifactId>doxygen-maven-plugin</artifactId>
<version>2.2</version>
</plugin>
</plugins>
</reporting>
<pluginRepositories>
<pluginRepository>
<id>doodleproject-repo</id>
<name>DoodleProject Maven 2 Repository</name>
<url>http://doodleproject.sourceforge.net/maven2/release</url>
<releases>
<enabled>true</enabled>
</releases>
</pluginRepository>
</pluginRepositories>
我启动命令:
mvn -X net.sf.doodleproject:doxygen-maven-plugin:report
我有这个错误:
[ERROR] Failed to execute goal net.sf.doodleproject:doxygen-maven-plugin:2.2:report (default-cli) on project project: An error has occurred in Doxygen report generation.
Failed to generate Doxygen documentation. -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException:
Failed to execute goal net.sf.doodleproject:doxygen-maven-plugin:2.2:report (default-cli) on project amc: An error has occurred in Doxygen report generation.
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
Caused by: org.apache.maven.plugin.MojoExecutionException: An error has occurred in Doxygen report generation.
at org.apache.maven.reporting.AbstractMavenReport.execute(AbstractMavenReport.java:83)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
Caused by: org.apache.maven.reporting.MavenReportException: Failed to generate Doxygen documentation.
at net.sf.doodleproject.mavenite.doxygen.DoxygenReport.executeReport(DoxygenReport.java:299)
at org.apache.maven.reporting.AbstractMavenReport.generate(AbstractMavenReport.java:131)
当我在没有maven插件的项目中使用它时,Doxygen运行良好。 使用插件还有其他事可做吗?
感谢您的帮助,
答案 0 :(得分:0)
我尝试了另一个插件:com.soebes.maven.plugins.dmg并且它正在运行。
我的pom.xml:
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<plugin>
<groupId>com.soebes.maven.plugins.dmg</groupId>
<artifactId>doxygen-maven-plugin</artifactId>
<configuration>
<projectName>${project.artifactId}</projectName>
<projectNumber>${project.version}</projectNumber>
<optimizeOutputJava>true</optimizeOutputJava>
<extractAll>true</extractAll>
<extractStatic>true</extractStatic>
<recursive>true</recursive>
<exclude>.git</exclude>
<recursive>true</recursive>
<umlLook>true</umlLook>
<haveGraph>true</haveGraph>
<generateLatex>false</generateLatex>
<generateHtml>true</generateHtml>
<outputDirectory>${basedir}/doxygen_doc</outputDirectory>
</configuration>
</plugin>
</plugins>
</build>
<pluginRepositories>
<pluginRepository>
<id>doodleproject-repo</id>
<name>DoodleProject Maven 2 Repository</name>
<url>http://doodleproject.sourceforge.net/maven2/release</url>
<releases>
<enabled>true</enabled>
</releases>
</pluginRepository>
</pluginRepositories>
答案 1 :(得分:-1)
试试这个插件。为我工作很好:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<failOnError>false</failOnError>
</configuration>
</plugin>