Michael Osipov created DOXIASITETOOLS-171:
---------------------------------------------
Summary: DefaultSiteRenderer must use
Package#getImplementationVersion to check for Doxia Sitetools prerequisite
Key: DOXIASITETOOLS-171
URL: https://issues.apache.org/jira/browse/DOXIASITETOOLS-171
Project: Maven Doxia Sitetools
Issue Type: Bug
Components: Site renderer
Affects Versions: 1.7.3
Reporter: Michael Osipov
Assignee: Michael Osipov
Fix For: 1.7.4
Issue raised on the [mailing
list|https://mail-archives.apache.org/mod_mbox/maven-dev/201611.mbox/%3CCAArU9iZJLoscR0VQw7%2BpTcXUwHLwjF%3Dva8MNLN-rn%2BEuMQGfCQ%40mail.gmail.com%3E]
with a [sample project|https://github.com/jieryn/fluido-fail] issue has been
reproduced.
The reason is that the prerequisite for the Sitetools are validated against:
{code:java}
Package p = DefaultSiteRenderer.class.getPackage();
String current = ( p == null ) ? null : p.getSpecificationVersion();
{code}
but the specification for the value of {{SpecificationVersion}} is
{{major.minor}}. This was broken for some years and finally fixed with
MSHARED-191. This likely creeped into the module.
Proposed patch:
{code}
Index: DefaultSiteRenderer.java
===================================================================
--- DefaultSiteRenderer.java (revision 1768577)
+++ DefaultSiteRenderer.java (working copy)
@@ -803,7 +803,7 @@
skinModel.getPrerequisites() == null ? null :
skinModel.getPrerequisites().getDoxiaSitetools();
Package p = DefaultSiteRenderer.class.getPackage();
- String current = ( p == null ) ? null :
p.getSpecificationVersion();
+ String current = ( p == null ) ? null :
p.getImplementationVersion();
if ( StringUtils.isNotBlank( toolsPrerequisite ) && ( current
!= null )
&& !matchVersion( current, toolsPrerequisite ) )
{code}
works flawlessly with the sample project.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)