[ 
https://issues.apache.org/jira/browse/DOXIASITETOOLS-171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15648426#comment-15648426
 ] 

Hervé Boutemy commented on DOXIASITETOOLS-171:
----------------------------------------------

the change happened 1 year ago and was integrated to maven-jar-plugin 3.0.0: 
too late to change the behaviour

IMHO, just need to improve the title of MSHARED-191, since the change is not 
only about SNAPSHOT but also only keep 2 parts

notice that "which we do not support actually" is completely wrong: we support 
indefinite parts: it's just ArtifactVersion API that is broken, see 
https://lists.apache.org/thread.html/ddad4e650e51d5b51348fc7975e37c67e1cecde68f9461c220145ea7@%3Cdev.maven.apache.org%3E
but this API is not really used intensively any more after ComparableVersion 
was done

> 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)

Reply via email to