Better handling of HTML license documents
-----------------------------------------
Key: MPIR-95
URL: http://jira.codehaus.org/browse/MPIR-95
Project: Maven 2.x Project Info Reports Plugin
Issue Type: Improvement
Affects Versions: 2.1
Reporter: Martin von Gagern
Priority: Minor
Attachments: pom.xml
I've got a document here specifying
http://www.opensource.org/licenses/mit-license.php as its license. This is
handles rather poorly by the generated license document, as the framework
around the license text gets in the way and the heading levels of the license
text don't fit. I can imagine several possible solutions to improve this
situations:
1. Specify local file in pom. This makes it difficult to automatically handle
licensing automatically, as only well known public URLs can be used to identify
well known licenses, which won't work for local file names or private web sites.
2. Provide a way to specify appropriate local files for licenses without
touching the url in the pom. This could take the form of some map parameter
that associates license names with license documents.
3. Provide a way to simply not include any license text, only the link. This is
the quickest solution.
4. Embed the license text as an iframe with an external source, so you only
link and copy nothing.
5. Parse HTML and allow XPath selectors or something similar to extract the
license content.
When you do some better HTML parsing one day (maybe using
org.htmlparser:htmlparser?), you might wish to adjust headline levels as well.
Find the highest level headline that occurs in the extracted fragment,
calculate an offset that places this one level below the license name headline
printed by the plugin, and apply this offset to every headline in the fragment.
If you decide for one of the solutions 2-4, I guess I could hack a quick patch
to implement this. 5 is more work, of course.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira