Put this in the plugins
section of your pom.xml
:
<build>
<plugins>
<plugin>
<groupId>eu.trentorise.opendata.josman</groupId>
<artifactId>josman-maven-plugin</artifactId>
<version>0.7.0</version>
</plugin>
...
</plugins>
...
</build>
In case updates are available, version numbers follows semantic versioning rules.
You can then invoke the plugin by calling the goal site:
mvn josman:site
This will generate a website with documentation for all the released versions you have. It will not consider current snapshot, so if you just want to test how the website will look like for the current snapshot, use snapshot
flag:
mvn josman:site -Dsite.snapshot=true
Or in pom.xml
configuration:
<plugin>
<groupId>eu.trentorise.opendata.josman</groupId>
<artifactId>josman-maven-plugin</artifactId>
<configuration>
<snapshot>true</snapshot>
</configuration>
</plugin>
To ignore some version, you can use ignoredVersions
:
<plugin>
<groupId>eu.trentorise.opendata.josman</groupId>
<artifactId>josman-maven-plugin</artifactId>
<configuration>
<ignoredVersions>
<ignoredVersion>0.0.1</ignoredVersion>
</ignoredVersions>
</configuration>
</plugin>
A good companion to Josman is GitHub Site Plugin that allows sending the generated website to origin repository in the gh-pages branch, so that it will be served by Github on myorganization.github.io/myrepo
urls.
To send website:
mvn com.github.github:site-maven-plugin:site