我正在尝试使用 maven-jdocbook-plugin 和 maven 3 运行 docbook。
使用最少的配置:
<plugin>
<groupId>org.jboss.maven.plugins</groupId>
<artifactId>maven-jdocbook-plugin</artifactId>
<executions>
<execution>
<id>default-cli</id>
<goals>
<goal>generate</goal>
</goals>
<phase>compile</phase>
</execution>
</executions>
<configuration>
<sourceDirectory>src/main/doc/xml</sourceDirectory>
<sourceDocumentName>DocBook.xml</sourceDocumentName>
<formats>
<format>
<formatName>html</formatName>
<finalName>index.html</finalName>
</format>
</configuration>
</plugin>
我收到以下错误:
[ERROR] Failed to execute goal org.jboss.maven.plugins:maven-jdocbook-plugin:2.3.8:generate (default-cli) on project <project>: Execution default-cli of goal org.jboss.maven.plugins:maven-jdocbook-plugin:2.3.8:generate failed: could not locate resource [/html/chunk.xsl] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.jboss.maven.plugins:maven-jdocbook-plugin:2.3.8:generate (default-cli) on project <project>: Execution default-cli of goal org.jboss.maven.plugins:maven-jdocbook-plugin:2.3.8:generate failed: could not locate resource [/html/chunk.xsl]
当我查看本地 Maven 存储库时,我看到:
$ ls ~/.m2/repository/net/sf/docbook/docbook-xsl
$ 1.76.1
$ ls ~/.m2/repository/net/sf/docbook/docbook-xsl/1.76.1
$ _maven.repositories docbook-xsl-1.76.1.pom docbook-xsl-1.76.1.pom.sha1
所以有一个 POM 但没有库。
如果我为 docbook-xsl 提供了明确的依赖关系,它会下载内容(但我仍然得到相同的错误):
<dependency>
<groupId>net.sf.docbook</groupId>
<artifactId>docbook-xsl</artifactId>
<version>1.76.1</version>
<classifier>ns-resources</classifier>
<type>zip</type>
</dependency>
我让它真正生成任何东西的唯一方法是给它一个 docbook-xsl 版本,它有一个 jar 而不是 zip:
<groupId>net.sf.docbook</groupId>
<artifactId>docbook-xsl-ns</artifactId>
<version>1.74.0</version>
如何获取 XSL 模板的 zip 版本以使用此插件?