Maven distribution plugin
The maven-distrib-plugin will generate a report that is automatically included in the generated website
if you instruct Maven to run the report by including it in the 'reports' section of the
project.xml
file.
<!-- List of reports to be included when the website is generated by Maven --> <reports> <report>maven-distrib-plugin</report> <report>maven-jdepend-plugin</report> <report>maven-changelog-plugin</report> <report>maven-developer-activity-plugin</report> <report>maven-file-activity-plugin</report> <report>maven-jxr-plugin</report> <report>maven-javadoc-plugin</report> </reports> Notice the fact that the distrib plugin is the first in the list. The location in the list is irrelevant to the correct functioning of course, but the sidebar menu in the reports section of the generated web pages will adhere to the ordering presented here. As such, 'Distributions' will be the first menu item in this particular set-up. The report itself contains a table with convenient download links for all versions of distributable jars it can find in your ${maven.build.dir} folder. These downloads will be sorted by descending version number (SNAPSHOT versions are considered to be 'newer' than non-snapshot versions with the same version number), so the most recent release is always on top. The report also generates a second table with download links as well as URL links (so be sure to specify these correctly in the project.xml file; your users will surely benefit) for the dependencies for this project.
Last but not least: the downloads for the retrieved versions of your project deliverable will be accompanied
by a description. By default, this description is generated and therefore not very verbose (let alone meaningful), yet
if you browse the '${maven.build.dir}/generated-xdocs/distrib' folder, you will come across the
distribution.xml
file. Inside this file you will find XML comment tags containing the filenames
of each downloadable deliverable version.
Enclosed in these comment tags is a description for that file. If you edit it and do not delete this XML file,
these edits (ie., your own descriptions) will be retrieved and included in the final output the next time you
generate the site. As such, you can incrementally document your versioned releases and this information will be
faithfully preserved during each site generation step.
<tr> <td><a href="deliverable-1.3.2.jar">deliverable-1.3.2.jar</a></td> <td><!-- deliverable-1.3.2.jar -->deliverable-1.3.2.jar version.<!-- /deliverable-1.3.2.jar --></td> </tr>
Note that the comment is generated to be the filename of the deliverable with ' version.' appended. Lame, isn't it?
<tr> <td><a href="deliverable-1.3.2.jar">deliverable-1.3.2.jar</a></td> <td><!-- deliverable-1.3.2.jar -->This is a more decent description, albeit still not a very meaningful one.<!-- /deliverable-1.3.2.jar --></td> </tr> and then regenerate the site, this new and enhanced comment will be persisted on the newly generated website. And so on ad infinitum , obviously. Enjoy!- lnnrt |