maven-site-plugin:3.5 has problem to build our website (Issue #2966)

58 views
Skip to first unread message

Vladislav Lis

unread,
Apr 28, 2016, 3:16:52 AM4/28/16
to checkstyle-devel
The problem appears after update of maven-site-plugin version to 3.5 (https://github.com/checkstyle/checkstyle/issues/2966#issue-136078084) and repeats in version 3.5.1.

The root of the problem:
Error validating the model: SAX2 driver class org.apache.xerces.parsers.SAXParser not found

After manually adding org.apache.xerces to ependencies of maven-site-plugin the build fails with NPE.

Full logs are attached.

add xerces to dependencies
site 3.5 failure

Roman Ivanov

unread,
Apr 28, 2016, 8:32:05 AM4/28/16
to Vladislav Lis, checkstyle-devel
Hi Vlad,

Please always share link to your sources,  to share how exactly you did changes to code that cause that problems.


please look at log and all ERRORs, here are lines:

[DEBUG] Processing Velocity for writingchecks.xml.vm
[ERROR] ResourceManager.getResource() parse exception
org.apache.velocity.exception.ParseErrorException: Lexical error,   Encountered: "p" (112), after : "." at /home/vlad/projects/checkstyle/src/xdocs/writingchecks.xml.vm[line 199, column 91]
at org.apache.velocity.Template.process(Template.java:151)
at org.apache.velocity.runtime.resource.ResourceManagerImpl.loadResource(ResourceManagerImpl.java:437)
at org.apache.velocity.runtime.resource.ResourceManagerImpl.getResource(ResourceManagerImpl.java:352)
at org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java:1533)
at org.apache.velocity.app.VelocityEngine.mergeTemplate(VelocityEngine.java:343)
at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.renderDocument(DefaultSiteRenderer.java:373)
at org.apache.maven.doxia.siterenderer.DoxiaDocumentRenderer.renderDocument(DoxiaDocumentRenderer.java:53)


from release notes:

> [MSITE-762] - Upgrade Velocity from 1.5 to 1.7

So please focus on new Velocity problem, most likely new syntax, or resolving old parsing problems, or introduction of new parsing problems .... .
Please contact Velocity support mail-list for help.


thanks,
Roman Ivanov

--
You received this message because you are subscribed to the Google Groups "checkstyle-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to checkstyle-dev...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Vladislav Lis

unread,
Apr 30, 2016, 10:00:03 AM4/30/16
to checkstyle-devel, vlad...@gmail.com
Hi Roman,

Enforcing Velocity 1.5 solves the problem. (https://maven.apache.org/plugins/maven-site-plugin/migrate.html)

We need to decide, whether it's OK to use Velocity 1.5 or we have to upgrade it to 1.7.
All the changes are listed here: https://velocity.apache.org/engine/releases/velocity-1.7/changes-report.html

As we have only a few velocity files and they cover our needs as is I suppose there's no need in upgrade.

vlad@vlad-N61PC-M2S ~/projects/checkstyle $ git diff
diff --git a/pom.xml b/pom.xml
index 3644d10..cf5def5 100644
--- a/pom.xml
+++ b/pom.xml
@@ -191,7 +191,7 @@
     <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
     <projectVersion>${project.version}</projectVersion>
     <antlr4.version>4.5.3</antlr4.version>
-    <maven.site.plugin.version>3.4</maven.site.plugin.version>
+    <maven.site.plugin.version>3.5.1</maven.site.plugin.version>
     <maven.findbugs.plugin.version>3.0.3</maven.findbugs.plugin.version>
     <maven.pmd.plugin.version>3.6</maven.pmd.plugin.version>
     <maven.jacoco.plugin.version>0.7.6.201602180812</maven.jacoco.plugin.versio
@@ -613,6 +613,16 @@
             <artifactId>wagon-ssh</artifactId>
             <version>2.10</version>
           </dependency>
+          <dependency>
+            <groupId>xerces</groupId>
+            <artifactId>xercesImpl</artifactId>
+            <version>2.11.0</version>
+          </dependency>
+          <dependency>
+            <groupId>org.apache.velocity</groupId>
+            <artifactId>velocity</artifactId>
+            <version>1.5</version>
+          </dependency>
         </dependencies>
       </plugin>

Vladislav Lis

unread,
Apr 30, 2016, 11:59:51 AM4/30/16
to checkstyle-devel, vlad...@gmail.com
https://github.com/checkstyle/checkstyle/pull/3148

Velocity files are updated to Velocity 1.7
Reply all
Reply to author
Forward
0 new messages