2

My team is working on a webservice project, and I am working on creating the documentation for the web service API. I have used a custom JavaDoc doclet to create two xml outputs of the available methods, one for internal developers and one for external developers.

Now, we are using the Jboss Maven Jdocbook plugin to create a DocBook output, along with other xml files, to create a users guide for our webservices.

What I want to do is run the Maven JdocBook plugin twice, once using the internal methods and once on the external methods, to create two separate users guides for either internal or external developers, using two different master.xml files. The pom file:

<build>
  <defaultGoal>generate</defaultGoal>
  <plugins>
     <plugin>
        <groupId>org.jboss.maven.plugins</groupId>
        <artifactId>maven-jdocbook-plugin</artifactId>
        <extensions>true</extensions>
        <goals>
           <goal>generate</goal>
        </goals>
        <configuration>
           <formats>
              <format>
                 <formatName>html</formatName>
              </format>
              <format>
                 <formatName>html_single</formatName>
              </format>
           </formats>
        </configuration>
        <executions>
           <execution>
              <id>internal</id>
              <phase>compile</phase>
              <configuration>
                 <baseOutputDirectory>../../Test/JavaDocTest/internal/</baseOutputDirectory>
                 <sourceDocumentName>masterInternal.xml</sourceDocumentName>
              </configuration>
           </execution>
           <execution>
              <id>external</id>
              <phase>compile</phase>
              <configuration>
                 <baseOutputDirectory>../../Test/JavaDocTest/external/</baseOutputDirectory>
                 <sourceDocumentName>masterExternal.xml</sourceDocumentName>
              </configuration>
           </execution>
        </executions>
     </plugin>
     <plugin>
        <groupId>org.jboss.maven.plugins</groupId>
        <artifactId>maven-jdocbook-style-plugin</artifactId>
        <version>1.0.0</version>
        <extensions>true</extensions>
     </plugin>
  </plugins>

The problem I am running in to is that unless I put the sourceDocumentName in the base configuration (outside of the execution section and in the section with the formats) the build does not recognize the different source document name. The standard master file is called master.xml, and on compiling in NetBeans, it says it is looking for master.xml, which it can't find because it does not exist, and then skips the generation.

It is appearing to just skip the execution sections altogether, as when I try to run the build with multiple executions (such as above) it still just runs once. Any ideas why it's skipping the execution sections?

I believe it might have something to do with the phase tag of the execution, but according to http://www.jboss.org/maven-jdocbook-plugin/ there are only a few phases (process-resources, compile, package, install, deploy), and I've tried all of them and none of them seem to work.
Thanks in advance.

sterbap1
  • 41
  • 3
  • My group figured out that you need to set sourceDocumentName in the main configuration area. It turns out that the docbook is generated once using the main config section, and then it looks for any other executions and runs those using the specific sub-configuration for that execution. Hope this helps someone in the future. – sterbap1 Dec 29 '11 at 18:56

1 Answers1

2

My group figured out that you need to set sourceDocumentName in the main configuration area. It turns out that the docbook is generated once using the main config section, and then it looks for any other executions and runs those using the specific sub-configuration for that execution.

Hope this helps someone in the future.

sterbap1
  • 41
  • 3