maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Osipov (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (MSITE-768) maven-site-plugin 3.5 breaks Velocity
Date Mon, 29 Feb 2016 21:53:18 GMT

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

Michael Osipov commented on MSITE-768:
--------------------------------------

I have tested your sample project and am able to confirm that this is not a bug in MSITE.
There are two issues with Doxia Sitetools and Plexus Velocity component.

1. The configured Site Renderer Component misses to pass the following property to the Velocity
engine:
{format}
<property>
  <name>eventhandler.include.class</name>
  <value>org.apache.velocity.app.event.implement.IncludeRelativePath</value>
</property>
{format}
2. All custom resource loaders, whether from Sitetools or Plexus Velocity, are crap. The do
not stick to the contract from the abstract {{ResourceLoader}} class.

Ultimately, due to the first issue, your {{include.vm}} is not make absolute to {{index.md.vm}}
and second throws an NPE because the first loader does not find your included template in
the classpath. No one checks for a {{null}} after {{getResourceAsStream}}.

Please open for both appropriate issues, I will close this one and process the others.

> maven-site-plugin 3.5 breaks Velocity
> -------------------------------------
>
>                 Key: MSITE-768
>                 URL: https://issues.apache.org/jira/browse/MSITE-768
>             Project: Maven Site Plugin
>          Issue Type: Bug
>    Affects Versions: 3.5
>         Environment: $ mvn --version
> Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T17:41:47+01:00)
> Maven home: /usr/local/Cellar/maven/3.3.9/libexec
> Java version: 1.8.0_74, vendor: Oracle Corporation
> Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0_74.jdk/Contents/Home/jre
> Default locale: de_DE, platform encoding: UTF-8
> OS name: "mac os x", version: "10.11.3", arch: "x86_64", family: "mac"
>            Reporter: Christian Schlichtherle
>            Priority: Blocker
>         Attachments: msite-768.zip
>
>
> It seem like since version 3.5, I cannot use {{#parse}} or {{#include}} in Velocity filtered
templates anymore. See attached test project.
> Please note that it doesn't matter what the name of the file to parse is. You can even
change it to a non-existent file (e.g. "foo") and it all still abort unnecessary recursion.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message