我将当前正在工作的项目介绍给DocBook,以创建我们的用户指南。我们现在已经分成两个单独的文档,我正在尝试在文档之间进行交叉链接。我现在已经生成了.db文件。但是这样做html文件不再有任何内容(我已经禁用了pdf,直到我可以使html工作)。生成的xml文件似乎是完整的,它们只是没有转换为html。任何帮助将不胜感激。
src.xml:
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
<id>release</id>
<formats>
<format>jar</format>
</formats>
<includeBaseDirectory>false</includeBaseDirectory>
<baseDirectory>swac-home</baseDirectory>
<!--files>
<file>
<source>target/docbkx/pdf/swac-reference-manual.pdf</source>
<fileMode>0444</fileMode>
</file>
<file>
<source>target/docbkx/pdf/swac-analysts-guide.pdf</source>
<fileMode>0444</fileMode>
</file>
</files-->
<fileSets>
<fileSet>
<directory>target/docbkx/html</directory>
<outputDirectory>html</outputDirectory>
<fileMode>0444</fileMode>
</fileSet>
<fileSet>
<excludes>
<!--exclude>*.pdf</exclude-->
</excludes>
<directory>src/docbkx/images</directory>
<outputDirectory>html/images</outputDirectory>
<fileMode>0444</fileMode>
</fileSet>
</fileSets>
</assembly>
的pom.xml:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>swac-parent</artifactId>
<groupId>gov.faa.ang.swac</groupId>
<version>1.7-SNAPSHOT</version>
</parent>
<artifactId>swac-documentation</artifactId>
<name>SWAC Documentation</name>
<packaging>pom</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<build>
<resources>
<resource>
<directory>src</directory>
</resource>
</resources>
<plugins>
<plugin>
<groupId>com.agilejava.docbkx</groupId>
<artifactId>docbkx-maven-plugin</artifactId>
<version>2.0.14</version>
<configuration>
<!-- shared configuration -->
<generatedSourceDirectory>${project.build.directory}/docbkx/generated</generatedSourceDirectory>
<xincludeSupported>true</xincludeSupported>
<paperType>Letter</paperType>
<fop1Extensions>1</fop1Extensions>
<customizationParameters>
<!-- additional XSLT parameters-->
<!--parameter>
<name>key</name>
<value>value</value>
</parameter-->
</customizationParameters>
</configuration>
<executions>
<execution>
<id>olinkdb-bogus-guide</id>
<phase>process-sources</phase>
<configuration>
<currentDocid>bogus-guide</currentDocid>
<includes>swac-analysts-guide.xml</includes>
<collectXrefTargets>only</collectXrefTargets>
<targetsFilename>${project.build.directory}/docbkx/generated/guide.html-target.db</targetsFilename>
<postProcess>
<!--delete file="${project.build.directory}/docbkx/generated/html/bogus-guide.html" /-->
</postProcess>
</configuration>
<goals>
<goal>generate-html</goal>
</goals>
</execution>
<execution>
<id>olinkdb-bogus-manual</id>
<phase>process-sources</phase>
<configuration>
<currentDocid>bogus-manual</currentDocid>
<includes>swac-reference-manual.xml</includes>
<collectXrefTargets>only</collectXrefTargets>
<targetsFilename>${project.build.directory}/docbkx/generated/manual.html-target.db</targetsFilename>
<postProcess>
<!--delete file="${project.build.directory}/docbkx/generated/html/bogus-manual.html" /-->
</postProcess>
</configuration>
<goals>
<goal>generate-html</goal>
</goals>
</execution>
<execution>
<id>reference manual</id>
<phase>process-sources</phase>
<goals>
<goal>generate-html</goal>
<!--goal>generate-pdf</goal-->
</goals>
<configuration>
<!-- per execution configuration -->
<targetDatabaseDocument>guide.target.db</targetDatabaseDocument>
<xincludeSupported>true</xincludeSupported>
<includes>swac-reference-manual.xml</includes>
<draftMode>no</draftMode>
</configuration>
</execution>
<execution>
<id>analysts guide</id>
<phase>process-sources</phase>
<goals>
<goal>generate-html</goal>
<!--goal>generate-pdf</goal-->
</goals>
<configuration>
<!-- per execution configuration -->
<targetDatabaseDocument>manual.target.db</targetDatabaseDocument>
<xincludeSupported>true</xincludeSupported>
<includes>swac-analysts-guide.xml</includes>
<draftMode>no</draftMode>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>net.sf.docbook</groupId>
<artifactId>docbook-xml</artifactId>
<version>5.0-all</version>
<classifier>resources</classifier>
<type>zip</type>
<scope>runtime</scope>
</dependency>
</dependencies>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptors>
<descriptor>src/assembly/src.xml</descriptor>
</descriptors>
<appendAssemblyId>false</appendAssemblyId>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-install-plugin</artifactId>
<version>2.2</version>
</plugin>
</plugins>
</build>
</project>
调试输出:
...
[DEBUG] All known ContainerDescriptorHandler components: [metaInf-services, plexus, file-aggregator, metaInf-spring]
[DEBUG] Cannot find ArtifactResolver with hint: project-cache-aware
org.codehaus.plexus.component.repository.exception.ComponentLookupException: java.util.NoSuchElementException
role: org.apache.maven.artifact.resolver.ArtifactResolver
roleHint: project-cache-aware
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:264)
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:240)
at org.apache.maven.shared.repository.DefaultRepositoryAssembler.contextualize(DefaultRepositoryAssembler.java:721)
at org.eclipse.sisu.plexus.PlexusLifecycleManager.contextualize(PlexusLifecycleManager.java:322)
at org.eclipse.sisu.plexus.PlexusLifecycleManager.manageLifecycle(PlexusLifecycleManager.java:297)
at org.eclipse.sisu.plexus.PlexusLifecycleManager.onProvision(PlexusLifecycleManager.java:143)
at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:109)
at com.google.inject.internal.ProvisionListenerStackCallback.provision(ProvisionListenerStackCallback.java:55)
at com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:68)
at com.google.inject.internal.InternalFactoryToInitializableAdapter.get(InternalFactoryToInitializableAdapter.java:47)
at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1054)
at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
at com.google.inject.Scopes$1$1.get(Scopes.java:59)
at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)
at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:997)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1047)
at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:993)
at org.eclipse.sisu.inject.LazyBeanEntry.getValue(LazyBeanEntry.java:82)
at org.eclipse.sisu.plexus.LazyPlexusBean.getValue(LazyPlexusBean.java:51)
at org.eclipse.sisu.wire.EntryListAdapter$ValueIterator.next(EntryListAdapter.java:111)
at org.apache.maven.plugin.assembly.archive.DefaultAssemblyArchiver.createArchive(DefaultAssemblyArchiver.java:180)
at org.apache.maven.plugin.assembly.mojos.AbstractAssemblyMojo.execute(AbstractAssemblyMojo.java:445)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:317)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:152)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:555)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: java.util.NoSuchElementException
at java.util.Collections$EmptyIterator.next(Collections.java:3006)
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:260)
... 43 more
[DEBUG] No dependency sets specified.
[DEBUG] FileSet[html/] dir perms: -1 file perms: -1
[DEBUG] The archive base directory is 'null'
[DEBUG] NOT reformatting any files in C:\Users\ssmitz\Documents\NetBeansProjects\trunk\swac-users-guide\target\docbkx\html
[DEBUG] Adding file-set from directory: 'C:\Users\ssmitz\Documents\NetBeansProjects\trunk\swac-users-guide\target\docbkx\html'
assembly output directory is: 'html/'
[DEBUG] Adding file-set in: C:\Users\ssmitz\Documents\NetBeansProjects\trunk\swac-users-guide\target\docbkx\html to archive location: html/
[DEBUG] FileSet[html/images/] dir perms: -1 file perms: 107777
[DEBUG] The archive base directory is 'null'
[DEBUG] NOT reformatting any files in C:\Users\ssmitz\Documents\NetBeansProjects\trunk\swac-users-guide\src\docbkx\images
[DEBUG] Adding file-set from directory: 'C:\Users\ssmitz\Documents\NetBeansProjects\trunk\swac-users-guide\src\docbkx\images'
assembly output directory is: 'html/images/'
[DEBUG] Adding file-set in: C:\Users\ssmitz\Documents\NetBeansProjects\trunk\swac-users-guide\src\docbkx\images to archive location: html/images/
[INFO] Building jar: C:\Users\ssmitz\Documents\NetBeansProjects\trunk\swac-users-guide\target\swac-documentation-1.7-SNAPSHOT.jar
...