Eirik Bjørsnøs wrote:
I'd like to release version 1.0-alpha-2 of the OS X Application Bundle Plugin.
0, not using it. Notes:
The POM is missing a <scm> element causing the "Source Repository"
report to point at a wrong URL.
"mvn dependency:analyze" is reporting some undeclared/unused deps.
The mojo's parameter "project" should probably have the "@readonly"
annotation. Not many users will want to stuff another Maven project in
there ;-)
You could consider to initialize mojo parameters that are populated from
the POM via "default-value" instead of "expression" [0, 1].
Regarding:
FileWriter writer = new FileWriter( infoPlist );
velocity.getEngine().mergeTemplate( dictionaryFile, "utf-8", velocityContext,
writer );
These lines are subject to encoding issues [2]:
1) The Info.plist is XML and may be provided by the user but the user is
in theory free to use another encoding for the template.
Since the transformation of bytes to characters is burried in Velocity
when loading the template (i.e. I don't see an easy way of using the
newXmlReader() method from plexus-utils), it might be the simplest
solution to mandate that custom templates must use UTF-8 just as the
code already assumes. This requirement should however be well
documented, probably on the mojo parameter "dictionaryFile" and the
example "custom-dictionary.apt"
2) The merged template is written using the platform default encoding,
it should however be written using the encoding given by the XML
declaration of the processed template.
If you require all input templates to be in UTF-8, you can simply
replace the FileWriter with an OutputStreamWriter around a
FileOutputStream where the OutputStreamWriter is told to use UTF-8 as
well. Alternatively, WriterFactory.newXmlWriter() from latest
plexus-utils will do the job, but would require your plugin to have a
prerequisite on Maven 2.0.6.
In src/site/examples/custom-dictionary.apt there are some typos in the
sentence
This example how how to set VM options and system propertie using a custom
Info.plist file
"[...] shows how [...] properties [...]"
Finally, consider to add <version> elements to the POM snippets shown in
the docs to teach users the best practice of locking down the plugin
version.
Apart from these knick knacks, amazingly comprehensive documentation,
good job!
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/Re%3A-Common-Bugs-p15919795.html
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email