Author: aheritier
Date: Fri Sep 16 05:25:48 2005
New Revision: 289510
URL: http://svn.apache.org/viewcvs?rev=289510&view=rev
Log:
MPCHECKSTYLE-39 : The checkstyle plugin use the maven.xdoc.locale.default to
generate the report.
Modified:
maven/maven-1/plugins/trunk/checkstyle/plugin.jelly
maven/maven-1/plugins/trunk/checkstyle/src/plugin-resources/avalon_checks.xml
maven/maven-1/plugins/trunk/checkstyle/src/plugin-resources/images/
(props changed)
maven/maven-1/plugins/trunk/checkstyle/src/plugin-resources/sun_checks.xml
maven/maven-1/plugins/trunk/checkstyle/src/plugin-resources/turbine_checks.xml
maven/maven-1/plugins/trunk/checkstyle/xdocs/changes.xml
maven/maven-1/plugins/trunk/checkstyle/xdocs/index.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=289510&r1=289509&r2=289510&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/checkstyle/plugin.jelly (original)
+++ maven/maven-1/plugins/trunk/checkstyle/plugin.jelly Fri Sep 16 05:25:48 2005
@@ -28,9 +28,16 @@
xmlns:ant="jelly:ant"
xmlns:util="jelly:util"
xmlns:doc="doc"
+ xmlns:maven="jelly:maven"
xmlns:define="jelly:define"
xmlns:checkstyle="checkstyle">
+ <j:if test="${bootstrapping == null}">
+ <!-- fake test because the plugin:available tag is avalaible in the
maven-plugin-plugin 1.7 and newer. Thus maven will break if it's not present.
-->
+ <plugin:available groupId="maven" artifactId="maven-plugin-plugin"
minRelease="1.7" neededBy="maven-faq-plugin"/>
+ <plugin:available groupId="maven" artifactId="maven-xdoc-plugin"
minRelease="1.10" neededBy="maven-faq-plugin"/>
+ </j:if>
+
<!--
========================================================================
Default goal.
@@ -136,7 +143,21 @@
file="${maven.checkstyle.cache.file}"/>
<ant:mkdir dir="${maven.checkstyle.cache.dir}"/>
+ <maven:get var="currentLocale" plugin="maven-xdoc-plugin"
property="maven.xdoc.locale.default"/>
+ <!-- Extract localeCountry -->
+ <j:choose>
+ <j:when test="${currentLocale.length() >= 2}">
+ <j:set var="localeCountry"
value="${currentLocale.substring(0,2)}"/>
+ </j:when>
+ <j:otherwise>
+ <echo>The locale defined in maven.xdoc.locale.default is
invalid.</echo>
+ <echo>As Coutry code we'll use EN instead.</echo>
+ <j:set var="localeCountry" value="EN"/>
+ </j:otherwise>
+ </j:choose>
+
<ant:echo>Using ${checkstyleProperties} for checkstyle ...</ant:echo>
+ <ant:echo>LocaleCountry : ${localeCountry}</ant:echo>
<ant:checkstyle
configURL="${checkstyleProperties}"
@@ -148,6 +169,8 @@
file="${maven.checkstyle.cache.file}"/>
<property key="checkstyle.suppressions.file"
file="${maven.checkstyle.suppressions.file}"/>
+ <property key="checkstyle.localeCountry"
+ value="${localeCountry}"/>
<ant:fileset dir="${pom.build.sourceDirectory}"
includes="${maven.checkstyle.includes}"
Modified:
maven/maven-1/plugins/trunk/checkstyle/src/plugin-resources/avalon_checks.xml
URL:
http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/checkstyle/src/plugin-resources/avalon_checks.xml?rev=289510&r1=289509&r2=289510&view=diff
==============================================================================
---
maven/maven-1/plugins/trunk/checkstyle/src/plugin-resources/avalon_checks.xml
(original)
+++
maven/maven-1/plugins/trunk/checkstyle/src/plugin-resources/avalon_checks.xml
Fri Sep 16 05:25:48 2005
@@ -50,6 +50,9 @@
<module name="Checker">
+ <!-- Locale to use to generate messages -->
+ <property name="localeCountry" value="${checkstyle.localeCountry}"/>
+
<!-- Checks that a package.html file exists for each package. -->
<!-- See http://checkstyle.sf.net/config_javadoc.html#PackageHtml -->
<module name="PackageHtml"/>
Propchange: maven/maven-1/plugins/trunk/checkstyle/src/plugin-resources/images/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Fri Sep 16 05:25:48 2005
@@ -0,0 +1 @@
+Thumbs.db
Modified:
maven/maven-1/plugins/trunk/checkstyle/src/plugin-resources/sun_checks.xml
URL:
http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/checkstyle/src/plugin-resources/sun_checks.xml?rev=289510&r1=289509&r2=289510&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/checkstyle/src/plugin-resources/sun_checks.xml
(original)
+++ maven/maven-1/plugins/trunk/checkstyle/src/plugin-resources/sun_checks.xml
Fri Sep 16 05:25:48 2005
@@ -50,6 +50,9 @@
<module name="Checker">
+ <!-- Locale to use to generate messages -->
+ <property name="localeCountry" value="${checkstyle.localeCountry}"/>
+
<!-- Checks that a package.html file exists for each package. -->
<!-- See http://checkstyle.sf.net/config_javadoc.html#PackageHtml -->
<module name="PackageHtml"/>
Modified:
maven/maven-1/plugins/trunk/checkstyle/src/plugin-resources/turbine_checks.xml
URL:
http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/checkstyle/src/plugin-resources/turbine_checks.xml?rev=289510&r1=289509&r2=289510&view=diff
==============================================================================
---
maven/maven-1/plugins/trunk/checkstyle/src/plugin-resources/turbine_checks.xml
(original)
+++
maven/maven-1/plugins/trunk/checkstyle/src/plugin-resources/turbine_checks.xml
Fri Sep 16 05:25:48 2005
@@ -50,6 +50,9 @@
<module name="Checker">
+ <!-- Locale to use to generate messages -->
+ <property name="localeCountry" value="${checkstyle.localeCountry}"/>
+
<!-- Checks that a package.html file exists for each package. -->
<!-- See http://checkstyle.sf.net/config_javadoc.html#PackageHtml -->
<module name="PackageHtml"/>
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=289510&r1=289509&r2=289510&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/checkstyle/xdocs/changes.xml (original)
+++ maven/maven-1/plugins/trunk/checkstyle/xdocs/changes.xml Fri Sep 16
05:25:48 2005
@@ -26,6 +26,9 @@
</properties>
<body>
<release version="3.0-SNAPSHOT" date="in SVN">
+ <action dev="aheritier" type="update">It requires at least
maven-plugin-plugin v1.7.</action>
+ <action dev="aheritier" type="update">It requires at least
maven-xdoc-plugin v1.10.</action>
+ <action dev="aheritier" type="update" issue="MPCHECKSTYLE-39">The
checkstyle plugin use the maven.xdoc.locale.default to generate the
report.</action>
<action dev="carlos" type="add" issue="MPCHECKSTYLE-30">Ability to check
test sources using property maven.checkstyle.check.tests</action>
<action dev="carlos" type="add">Generate reports filtered by
severity</action>
<action dev="carlos" type="update">Support for Java5</action>
Modified: maven/maven-1/plugins/trunk/checkstyle/xdocs/index.xml
URL:
http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/checkstyle/xdocs/index.xml?rev=289510&r1=289509&r2=289510&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/checkstyle/xdocs/index.xml (original)
+++ maven/maven-1/plugins/trunk/checkstyle/xdocs/index.xml Fri Sep 16 05:25:48
2005
@@ -33,6 +33,13 @@
code violations can be easily found and corrected.
</p>
</section>
+ <section name="Requirements">
+ <p>Be careful, the following plugins must be installed to use the FAQ
plugin :</p>
+ <ul>
+ <li>maven-plugin-plugin 1.7 (at least)</li>
+ <li>maven-xdoc-plugin 1.10 (at least)</li>
+ </ul>
+ </section>
</body>
</document>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]