2.0 Milestone 1
Pre-releaseEnunciate 2.0 Milestone 1 includes:
- Support for Java 8
- Native, first-class support for JSON via Jackson annotations.
- A more modular architecture to allow for more agile extension development.
- Significant performance improvements.
- Support for the generated HTML documentation.
It is expected that there will be a number of bugs and other deficiencies with this release. Please report these using the Enunciate issue tracker.
Important note: Milestone 1 only supports the generated HTML documentation. Support for any generated client-side libraries (including Java, C#, PHP, etc.) is pending a future release.
The scope of the project has been tightened in an effort to focus on Enunciate's core functionality. Enunciate 2.0 will focus on generating documentation and client-side libraries and will no longer support runtime integration with the various frameworks. Developers using Enunciate 2.0 will need to configure their own web application according to the specifications of the framework(s) being used. Enunciate 2.0 will no longer build a .war
; instead, configure Enunciate with the destination directory for the documentation and attach it to your build process.
Maven
<project>
...
<build>
...
<plugins>
...
<plugin>
<groupId>com.webcohesion.enunciate</groupId>
<artifactId>enunciate-maven-plugin</artifactId>
<version>2.0.0-M.1</version>
<executions>
<execution>
<id>assemble</id>
<goals>
<goal>assemble</goal>
</goals>
</execution>
</executions>
</plugin>
...
</plugins>
...
</build>
...
</project>
By default, the enunciate-maven-plugin
will generate the documentation into the target/enunciate/docs/
directory.
Here are the plugin configuration options:
name | description |
---|---|
configFile |
The location of the Enunciate XML configuration file. By default, Enunciate will use a file called enunciate.xml in the Maven base directory. |
buildDir |
The location of the directory for Enunciate's output and temporary files. Default value is ${project.build.directory}/enunciate |
includes |
Ant-style patterns of classes to include in the API documentation. By default, Enunciate will only include API classes that are in the current project's source tree. |
excludes |
Ant-style patterns of classes to exclude in the API documentation. |
compilerArgs |
Additional arguments to pass to the compiler that Enunciate uses to compile the API source code. |
source |
The value of the -source parameter used by Enunciate to compile the API source code. |
target |
The value of the -target parameter used by Enunciate to compile the API source code. |
encoding |
The value of the -encoding parameter used by Enunciate to compile the API source code. |
Ant
<path id="enunciate.classpath">
<fileset dir="${enunciate.home}/lib">
<include name="*.jar"/>
</fileset>
</path>
<taskdef name="enunciate" classname="com.webcohesion.enunciate.EnunciateTask">
<classpath refid="enunciate.classpath"/>
</taskdef>
<enunciate basedir="src/main/java" buildDir="target/enunciate">
<include name="**/*.java"/>
<classpath refid="enunciate.classpath"/>
</enunciate>
Here are the task configuration options:
name | description |
---|---|
configFile |
The location of the Enunciate XML configuration file. |
javacArguments |
Additional arguments to pass to the compiler that Enunciate uses to compile the API source code. |
javacSourceVersion |
The value of the -source parameter used by Enunciate to compile the API source code. |
javacTargetVersion |
The value of the -target parameter used by Enunciate to compile the API source code. |
encoding |
The value of the -encoding parameter used by Enunciate to compile the API source code. |
Examples
The following examples are available to peruse as needed. These projects serve as the functional tests for the project:
Configuration
For more information about the Enunciate configuration options, see this XML schema.