David Vicente wrote:
I would like to perform a bugfix release of the JDepend Maven Plugin.
0, not using it.
Notes (some of these may be non-sense since I don't know the plugin at all):
The POM has no <scm> element, causing a bad "Source Repository" report:
http://svn.codehaus.org/mojo/tags/mojo-16/jdepend-maven-plugin
Using the maven-plugin-plugin:2.4.1 (e.g. via inheriting from mojo-17)
would improve the goal documentation.
For mojo parameters, using the annotation "default-value" is recommended
over "expression" when accessing POM elements like build directories [0,
1]. Among others, using "default-value" will make the expression show up
nicely on the mojo's info page.
The "Usage" page would benefit from a <version> element in the POM
snippet, to demonstrate good practice.
"mvn dependendcy:analyze" reports several used but undeclared artifacts.
The mojo fields outputDirectory, projectDirectory, classDirectory,
reportFile are of Type String rather than File, making them subject to
Common Bug #1 [2].
Shouldn't the parameter projectDirectory be @readonly, i.e. are there
really use cases for the plugin where users are expected to specify a
different directory than the POM's base directory? If not, every
parameter less reduces confusion and potential misuse.
The current default value for outputDirectory suggests to use
${project.reporting.outputDirectory} instead to honour the general POM
setting for site output.
In JDependMojo.java:105, the plugin is directly using its parameter
outputDirectory to access the file system. However,
MavenReport.getReportOutputDirectory() should be used for proper
interplay with the Site Plugin, compare Common Bug #4 [3].
Related to the above line: Does the plugin need to issue the mkdirs()
call at all? Spontaneously, I would assume the sink handles this.
Benjamin
[0]
http://www.nabble.com/Difference-between-default-value-and-expression-metatags-td5725581.html
[1]
http://www.nabble.com/Plugin-Parameters%3A-expression-vs.-default-value-td15109298.html
[2] http://www.nabble.com/Common-Bugs-p14783703.html
[3] http://www.nabble.com/Re%3A-Common-Bugs-p15246107.html
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email