我試圖運行maven-enunciate-plugin:1.26.2:docs並面臨NUllPointerException。maven-enunciate-plugin生成文檔的空指針異常
我唯一希望的是這裏所描述http://docs.codehaus.org/display/ENUNCIATE/Documentation+Only其文檔生成,所以我的pom.xml的是:
...
<plugin>
<groupId>org.codehaus.enunciate</groupId>
<artifactId>maven-enunciate-plugin</artifactId>
<version>1.26.2</version>
<configuration>
<docsDir>${project.build.directory}/docs</docsDir>
</configuration>
<executions>
<execution>
<goals>
<goal>docs</goal>
</goals>
</execution>
</executions>
</plugin>
...
但是,它啓動:
Caused by: org.apache.maven.plugin.MojoExecutionException: Problem assembling the enunciate app.
at org.codehaus.enunciate.DocsMojo.execute(DocsMojo.java:100)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 19 more
Caused by: java.lang.NullPointerException
at org.codehaus.enunciate.modules.java_client.JavaClientDeploymentModule.isGenerateJsonJar(JavaClientDeploymentModule.java:892)
at org.codehaus.enunciate.modules.java_client.JavaClientDeploymentModule.doCompile(JavaClientDeploymentModule.java:501)
at org.codehaus.enunciate.modules.BasicDeploymentModule.step(BasicDeploymentModule.java:113)
at org.codehaus.enunciate.main.Enunciate.doCompile(Enunciate.java:286)
at org.codehaus.enunciate.main.Enunciate$Stepper.step(Enunciate.java:1738)
at org.codehaus.enunciate.main.Enunciate$Stepper.stepTo(Enunciate.java:1766)
at org.codehaus.enunciate.DocsMojo.execute(DocsMojo.java:96)
什麼建議嗎?
我有以下建議:找到此特定版本插件的源代碼,並查看「DocsMojo」的第100行上發生了什麼。最有可能的是,你在配置中缺少一些參數。 –