MPCHECKSTYLE-39 : The checkstyle plugin use the maven.xdoc.locale.default to generate the report.
git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@289510 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
221f98468d
commit
66a7da764d
@ -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}"
|
||||
|
||||
@ -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"/>
|
||||
|
||||
@ -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"/>
|
||||
|
||||
@ -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"/>
|
||||
|
||||
@ -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>
|
||||
|
||||
@ -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>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user