To use Easydoc with Maven, you just need to declare easydoc-maven-plugin in you pom.xml.
<plugin>
<groupId>com.github.weekens</groupId>
<artifactId>easydoc-maven-plugin</artifactId>
<version>0.4.17</version>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
</plugin>
See this section for more information.
To run Easydoc from command line, just do
java -jar easydoc.jar
(more details here)
After you're set up, just start writing docs right inside your source files...
/*@@easydoc-start@@
<h1>RESTful API</h1>
The service exposes RESTful API to provide access to it's resources.
The methods are available under http://company.com/myservice/api
@@easydoc-end@@*/
@Controller("/api")
class RESTController {
...
}
...XML files...
<!--@@easydoc-start@@
<h1>Database</h1>
The service uses database, which is configured in database.xml file.
@@easydoc-end@@-->
<import location="database.xml"/>
...property files...
#@@easydoc-start, ignore=#@@
#
# <h1>Configuration</h1>
#
# The application is configured using application.properties file.
#
#@@easydoc-end@@
app.greeting=Hello World!
...or any other files in your project.
All the HTMLs between @@easydoc-start@@ and @@easydoc-end@@ keys are the docs. They will get to the resulting documentation page. This is briefly described here.
You can see how it works by just looking at Easydoc documentation.
- structured documentation (with parent and child docs, and ordering)
- source links
- automatic index (contents) generation
- Markdown support
- combining docs from different projects
- full support of command line
- variables
- Ant target