For most maven plugins, I can just register the plug-in in my maven.xml, and the plugin will execute.
With the cactus plugin, I added the plugin to maven.xml:
<postGoal name="xdoc:register-reports">
...
<attainGoal name="maven-cactus-plugin:register"/>
</postGoal>
...and added the report to project.xml:
<reports>
...
<report>maven-cactus-plugin</report>
</reports>
When I run maven site:generate, it does NOT run cactus:test. It does try to run cactus:report, and fails (can't find TESTS-TestSuites-Cactus.xml).
I tried to work around the issue by adding the following to maven.xml:
<preGoal name="cactus:report">
<attainGoal name="cactus:test"/>
</preGoal>
However, when I do this, it seems like cactus is never able to start Tomcat ("Failed to start the container after more than [180000] ms.") - very bizarre.
My current workaround is to make sure I add a cactus:test to my list of goals:
maven clean cactus:test site:generate
However, when I do that, many of the goals are executed more than once, for example java:compile, test:compile and test:test!
Note that the Cactus plugin has moved to the Cactus project.