Version 2.0 of the Sculptor Maven Plugin (introduced in the thread [1]) is available in Fornax SVN [2]. As already outlined in thread [3] this version of the plugin combines the functionality of four Maven plugins (clean, checksum, oaw-workflow and graphviz) into a single one.
Running this plugin with verbose logging, deletion of previously generated files in lifecycle phase "clean", code generation in lifecycle phase "generate-sources" and image generation in lifecycle phase "generate-resources" needs the following configuration in a projects POM:
<build>
<plugins>
<plugin>
<groupId>org.fornax.toolsupport</groupId>
<artifactId>sculptor-maven-plugin</artifactId>
<version>2.0.0</version>
<configuration>
<verbose>true</verbose>
</configuration>
<executions>
<execution>
<id>cleanup</id>
<goals>
<goal>clean</goal>
</goals>
</execution>
<execution>
<id>code-generation</id>
<goals>
<goal>generate</goal>
</goals>
</execution>
<execution>
<id>image-generation</id>
<goals>
<goal>generate-images</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
The plugin preserves its state (the list of generated files with their checksum) in a hidden file (named ".sculptor-status") in the project directory. This file is used to keep track of the files generated by the last code generator run. Before the code generator is executed again the plugin deletes all the previously generated files (stored in the status file) first.
By using "mvn clean" (with correctly configured cleanup execution) the plugin deletes all the previously generated files (stored in the status file) and the status file itself.
The automatic deletion of generated files (before the code generator is executed) can be turned-off (e.g. for partial generation mode [4]) via the generator configuration property "clean" (default: true):
<execution>
<id>code-generation</id>
<configuration>
<clean>false</clean>
</configuration>
<goals>
<goal>generate</goal>
</goals>
</execution>
To support the plugins new Mojos (CleanMojo and GraphvizMojo) the new version 1.0.2 of the Fornax M2E Extensions Eclipse plugin/feature [5] is available in Fornax SVN [6].
/Torsten