How to configure TLDDoc to create documentation for JSP TagLibs?

The company I work for currently has several taglibs for several projects. We use maven and hudson. I was tasked with finding what we can use to automatically generate documentation for our taglib. I found TLDDoc , but I could not find anything explaining how to install it. Please note: I am not a Java developer, I am a user interface developer who works in JSP among other technologies. Any help would be appreciated.

+3
source share
2 answers

I had a similar requirement. What I did was use Ant script in the maven file, it will find all TLD definition files within the projects that I need, and will loop over each file and do something.

I needed 2 exits. HTML and DITA (technical documentation format, successor to DOCBOOK).

  • For each TLD, TLDDoc will be called, and the same will be done in the output directory.
  • An additional script executed an XSLT stylesheet that converts the TLD xml domain to DITA. From DITA, I use the "DITA Open Toolkit" to output to PDF and another type of HTML.

With maven, you need to learn a little Ant script and know how to call java classes (TLDDOC) or the XSLT engine.

It was really cool and quite flexible.

+1
source

TLDDoc maven, , . :

        <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>exec-maven-plugin</artifactId>
            <executions>
                <execution>
                    <id>generateTldDoc</id>
                    <phase>prepare-package</phase>
                    <goals>
                        <goal>java</goal>
                    </goals>
                    <configuration>
                        <includePluginDependencies>true</includePluginDependencies>
                        <includeProjectDependencies>false</includeProjectDependencies>
                        <mainClass>com.sun.tlddoc.TLDDoc</mainClass>
                        <arguments>                  
                            <argument>-doctitle</argument>
                            <argument>Whatever Taglib</argument>
                            <argument>-windowtitle</argument>
                            <argument>Whatever Taglib</argument>   
                            <argument>-d</argument>
                            <argument>${project.build.directory}/tlddoc</argument>
                            <argument>src/main/resources/META-INF/something.tld</argument>
                            <argument>src/main/resources/META-INF/somethingelse.tld</argument>
                        </arguments>
                    </configuration>
                </execution>
            </executions>
            <dependencies>
                <dependency>
                    <groupId>taglibrarydoc</groupId>
                    <artifactId>tlddoc</artifactId>
                    <version>1.3</version>
                </dependency>
            </dependencies>
        </plugin>
0

All Articles