XML Doclet

Javadoc to XML

License

License

Categories

Categories

SBE Data Data Structures
GroupId

GroupId

com.github.markusbernhardt
ArtifactId

ArtifactId

xml-doclet
Last Version

Last Version

1.0.5
Release Date

Release Date

Type

Type

jar
Description

Description

XML Doclet
Javadoc to XML
Project URL

Project URL

https://github.com/MarkusBernhardt/xml-doclet
Source Code Management

Source Code Management

https://github.com/MarkusBernhardt/xml-doclet

Download xml-doclet

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.markusbernhardt/xml-doclet/ -->
<dependency>
    <groupId>com.github.markusbernhardt</groupId>
    <artifactId>xml-doclet</artifactId>
    <version>1.0.5</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.markusbernhardt/xml-doclet/
implementation 'com.github.markusbernhardt:xml-doclet:1.0.5'
// https://jarcasting.com/artifacts/com.github.markusbernhardt/xml-doclet/
implementation ("com.github.markusbernhardt:xml-doclet:1.0.5")
'com.github.markusbernhardt:xml-doclet:jar:1.0.5'
<dependency org="com.github.markusbernhardt" name="xml-doclet" rev="1.0.5">
  <artifact name="xml-doclet" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.markusbernhardt', module='xml-doclet', version='1.0.5')
)
libraryDependencies += "com.github.markusbernhardt" % "xml-doclet" % "1.0.5"
[com.github.markusbernhardt/xml-doclet "1.0.5"]

Dependencies

compile (2)

Group / Artifact Type Version
commons-cli : commons-cli jar 1.2
org.slf4j : slf4j-api jar 1.7.12

test (2)

Group / Artifact Type Version
org.slf4j : slf4j-simple jar 1.7.12
junit : junit jar 4.12

system (1)

Group / Artifact Type Version
com.sun » tools jar 1.7

Project Modules

There are no modules declared in this project.

A doclet to output javadoc as XML

This library provides a doclet to output the javadoc comments from Java source code to a XML document.

The name, some ideas and most unit tests were shamelessly stolen from the xml-doclet library by Seth Call.

Usage

If you are using maven you can use this library by adding the following report to your pom.xml:

<project>
	...
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<executions>
					<execution>
						<id>xml-doclet</id>
					<phase>prepare-package</phase>
						<goals>
							<goal>javadoc</goal>
						</goals>
						<configuration>
							<doclet>com.github.markusbernhardt.xmldoclet.XmlDoclet</doclet>
							<additionalparam>-d ${project.build.directory} -filename ${project.artifactId}-${project.version}-javadoc.xml</additionalparam>
							<useStandardDocletOptions>false</useStandardDocletOptions>
							<docletArtifact>
								<groupId>com.github.markusbernhardt</groupId>
								<artifactId>xml-doclet</artifactId>
								<version>1.0.5</version>
							</docletArtifact>
						</configuration>
					</execution>
				</executions>
			</plugin>
	...
</project>

Use 'mvn package' with maven. If you are not using maven, you can use the jar-with-dependencies, which contains all required libraries.

javadoc -doclet com.github.markusbernhardt.xmldoclet.XmlDoclet \
-docletpath xml-doclet-1.0.5-jar-with-dependencies.jar \
[Javadoc- and XmlDoclet-Options]

A Makefile target to generate xml from both the production and test code:

javadoc:
mkdir -p target/production target/test
CLASSPATH=$$(echo $$(find ~/.m2/repository/ -name '*.jar'|grep -v jdk14 )|sed 's/ /:/g')\
 javadoc -doclet com.github.markusbernhardt.xmldoclet.XmlDoclet -sourcepath src/main/java -d target/production org.rulez.demokracia.PDEngine
CLASSPATH=$$(echo $$(find ~/.m2/repository/ -name '*.jar'|grep -v jdk14 )|sed 's/ /:/g')\
 javadoc -doclet com.github.markusbernhardt.xmldoclet.XmlDoclet -sourcepath src/test/java -d target/test org.rulez.demokracia.PDEngine

If you want more control and feel adventurous you could you use this jar and provide all required libraries from this list on your own.

Options

-d <directory>            Destination directory for output file.
                          Default: .
                          
-docencoding <encoding>   Encoding of the output file.
                          Default: UTF8
                          
-dryrun                   Parse javadoc, but don't write output file.
                          Default: false
                          
-filename <filename>      Name of the output file.
                          Default: javadoc.xml

Versions

Version
1.0.5
1.0.4
1.0.3
1.0.2
1.0.1
1.0.0