You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by lt...@apache.org on 2006/02/18 22:04:35 UTC
svn commit: r378776 - in /maven/maven-1/plugins/trunk/checkstyle: ./
src/plugin-resources/ xdocs/
Author: ltheussl
Date: Sat Feb 18 13:04:35 2006
New Revision: 378776
URL: http://svn.apache.org/viewcvs?rev=378776&view=rev
Log:
Use a jsl transform instead of ant's style task, bypassing some jdk specific issues of the latter.
Added:
maven/maven-1/plugins/trunk/checkstyle/src/plugin-resources/checkstyle-summary.jsl
maven/maven-1/plugins/trunk/checkstyle/src/plugin-resources/checkstyle.jsl
Removed:
maven/maven-1/plugins/trunk/checkstyle/src/plugin-resources/checkstyle-summary.xsl
maven/maven-1/plugins/trunk/checkstyle/src/plugin-resources/checkstyle.xsl
Modified:
maven/maven-1/plugins/trunk/checkstyle/plugin.jelly
maven/maven-1/plugins/trunk/checkstyle/project.xml
maven/maven-1/plugins/trunk/checkstyle/xdocs/changes.xml
Modified: maven/maven-1/plugins/trunk/checkstyle/plugin.jelly
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/checkstyle/plugin.jelly?rev=378776&r1=378775&r2=378776&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/checkstyle/plugin.jelly (original)
+++ maven/maven-1/plugins/trunk/checkstyle/plugin.jelly Sat Feb 18 13:04:35 2006
@@ -232,18 +232,22 @@
<mkdir dir="${maven.gen.docs}/checkstyle"/>
- <!-- Make sure xalan is used for ant's style task -->
- ${systemScope.setProperty('javax.xml.transform.TransformerFactory','org.apache.xalan.processor.TransformerFactoryImpl')}
+ <doc:jsl
+ input="${maven.checkstyle.output.xml}"
+ output="checkstyle-summary-report.xml"
+ outputDirectory="${maven.checkstyle.dir}"
+ stylesheet="${plugin.resources}/checkstyle-summary.jsl"
+ encoding="${maven.docs.outputencoding}"
+ outputMode="xml"
+ prettyPrint="true"/>
- <style
- in="${maven.checkstyle.output.xml}"
- out="${maven.checkstyle.output.summary.xml}"
- style="${plugin.resources}/checkstyle-summary.xsl"/>
-
- <style
- in="${maven.checkstyle.output.summary.xml}"
- out="${maven.gen.docs}/checkstyle/index.xml"
- style="${plugin.resources}/checkstyle.xsl"/>
+ <doc:jsl
+ input="${maven.checkstyle.output.summary.xml}"
+ output="checkstyle/index.xml"
+ stylesheet="${plugin.resources}/checkstyle.jsl"
+ encoding="${maven.docs.outputencoding}"
+ outputMode="xml"
+ prettyPrint="true"/>
<doc:jsl
input="${maven.checkstyle.output.xml}"
Modified: maven/maven-1/plugins/trunk/checkstyle/project.xml
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/checkstyle/project.xml?rev=378776&r1=378775&r2=378776&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/checkstyle/project.xml (original)
+++ maven/maven-1/plugins/trunk/checkstyle/project.xml Sat Feb 18 13:04:35 2006
@@ -172,14 +172,5 @@
<classloader>root</classloader>
</properties>
</dependency>
- <dependency>
- <groupId>xalan</groupId>
- <artifactId>xalan</artifactId>
- <version>2.4.1</version>
- <url>http://xml.apache.org/xalan-j/</url>
- <properties>
- <classloader>root</classloader>
- </properties>
- </dependency>
</dependencies>
</project>
Added: maven/maven-1/plugins/trunk/checkstyle/src/plugin-resources/checkstyle-summary.jsl
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/checkstyle/src/plugin-resources/checkstyle-summary.jsl?rev=378776&view=auto
==============================================================================
--- maven/maven-1/plugins/trunk/checkstyle/src/plugin-resources/checkstyle-summary.jsl (added)
+++ maven/maven-1/plugins/trunk/checkstyle/src/plugin-resources/checkstyle-summary.jsl Sat Feb 18 13:04:35 2006
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ * ========================================================================
+ *
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * ========================================================================
+-->
+
+<jsl:stylesheet
+ select="$doc"
+ xmlns:j="jelly:core"
+ xmlns:jsl="jelly:jsl"
+ xmlns:x="jelly:xml"
+ xmlns="dummy" trim="true">
+
+ <jsl:template match="/">
+ <errors>
+ <x:forEach select="//error" sort="@message">
+ <j:set var="group-by"><x:expr select="./@message"/></j:set>
+ <x:set var="grstring" select="string(./@message)"/>
+ <j:if test="${!grstring.equals(oldgrstring)}">
+ <x:element name="error">
+ <x:attribute name="severity">
+ <x:expr select="./@severity"/>
+ </x:attribute>
+ <x:attribute name="message">
+ <x:expr select="$group-by"/>
+ </x:attribute>
+ <x:attribute name="count">
+ <x:expr select="count(//error[@message=$group-by])"/>
+ </x:attribute>
+ </x:element>
+ <x:set var="oldgrstring" select="string(./@message)"/>
+ </j:if>
+ </x:forEach>
+ </errors>
+ </jsl:template>
+
+ <jsl:template match="text()"/>
+
+</jsl:stylesheet>
\ No newline at end of file
Added: maven/maven-1/plugins/trunk/checkstyle/src/plugin-resources/checkstyle.jsl
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/checkstyle/src/plugin-resources/checkstyle.jsl?rev=378776&view=auto
==============================================================================
--- maven/maven-1/plugins/trunk/checkstyle/src/plugin-resources/checkstyle.jsl (added)
+++ maven/maven-1/plugins/trunk/checkstyle/src/plugin-resources/checkstyle.jsl Sat Feb 18 13:04:35 2006
@@ -0,0 +1,131 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ * ========================================================================
+ *
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * ========================================================================
+-->
+
+<jsl:stylesheet
+ select="$doc"
+ xmlns:j="jelly:core"
+ xmlns:jsl="jelly:jsl"
+ xmlns:x="jelly:xml"
+ xmlns="dummy" trim="true">
+
+ <jsl:template match="/">
+
+ <document>
+
+ <properties>
+ <title>Checkstyle Results</title>
+ </properties>
+
+ <body>
+
+ <section name="Checkstyle Results">
+ <p>
+ The following document contains the results of
+ <a href="http://checkstyle.sourceforge.net/">Checkstyle</a>
+ <a href="checkstyle.rss"><img src="../images/rss.png"/></a>.
+ </p>
+ </section>
+
+ <section name="Detailed reports">
+ <p>
+ <ul>
+ <li><a href="all.html">All problems</a></li>
+ <li><a href="error.html">Error level problems</a></li>
+ <li><a href="warning.html">Warning level problems</a></li>
+ <li><a href="info.html">Info level problems</a></li>
+ </ul>
+ </p>
+ </section>
+
+ <section name="Summary">
+ <table summary="Report summary">
+ <thead>
+ <tr>
+ <th style="width:75px">Total</th>
+ <th style="width:75px">Infos</th>
+ <th style="width:75px">Warnings</th>
+ <th style="width:75px">Errors</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td><x:expr select="count(//error)" /></td>
+ <td><x:expr select="count(//error[@severity='info'])" /></td>
+ <td><x:expr select="count(//error[@severity='warning'])" /></td>
+ <td><x:expr select="count(//error[@severity='error'])" /></td>
+ </tr>
+ </tbody>
+ </table>
+ </section>
+
+ <section name="Checkstyle error summary">
+ <table>
+ <tr>
+ <th>Error</th>
+ <th>Count</th>
+ </tr>
+ <x:forEach select="//error[@severity='error']" sort="@count" descending="true">
+ <tr>
+ <td><x:expr select="@message" /></td>
+ <td><x:expr select="@count" /></td>
+ </tr>
+ </x:forEach>
+ </table>
+ </section>
+
+ <section name="Checkstyle warning summary">
+ <table>
+ <tr>
+ <th>Error</th>
+ <th>Count</th>
+ </tr>
+ <x:forEach select="//error[@severity='warning']" sort="@count" descending="true">
+ <tr>
+ <td><x:expr select="@message" /></td>
+ <td><x:expr select="@count" /></td>
+ </tr>
+ </x:forEach>
+ </table>
+ </section>
+
+ <section name="Checkstyle info summary">
+ <table>
+ <tr>
+ <th>Error</th>
+ <th>Count</th>
+ </tr>
+ <x:forEach select="//error[@severity='info']" sort="@count" descending="true">
+ <tr>
+ <td><x:expr select="@message" /></td>
+ <td><x:expr select="@count" /></td>
+ </tr>
+ </x:forEach>
+ </table>
+ </section>
+
+ </body>
+ </document>
+ </jsl:template>
+
+ <jsl:template match="text()" />
+
+</jsl:stylesheet>
Modified: maven/maven-1/plugins/trunk/checkstyle/xdocs/changes.xml
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/checkstyle/xdocs/changes.xml?rev=378776&r1=378775&r2=378776&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/checkstyle/xdocs/changes.xml (original)
+++ maven/maven-1/plugins/trunk/checkstyle/xdocs/changes.xml Sat Feb 18 13:04:35 2006
@@ -28,7 +28,7 @@
<action dev="ltheussl" type="fix" issue="MPCHECKSTYLE-52">The links to source xref files does not honor <code>maven.jxr.destdir</code> and <code>maven.jxr.destdir.test</code>.</action>
<action dev="ltheussl" type="fix" issue="MPCHECKSTYLE-38">RSS file has incorrect links when used in multiproject build.</action>
<action dev="ltheussl" type="fix" issue="MPCHECKSTYLE-9"><code>maven.checkstyle.header.file</code> now defaults to <code>${maven.license.licenseFile}</code>.</action>
- <action dev="ltheussl" type="fix" issue="MPCHECKSTYLE-53" due-to="Bernard Durfee">ClassCastException when moving from 2.5 to 3.0. Xalan is used for ant's style task.</action>
+ <action dev="ltheussl" type="fix" issue="MPCHECKSTYLE-53" due-to="Bernard Durfee">ClassCastException when moving from 2.5 to 3.0. Use a jsl transform instead of ant's style task.</action>
</release>
<release version="3.0" date="2006-02-05">
<action dev="ltheussl" type="update">Upgraded to checkstyle 4.1.</action>