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 2005/12/08 19:20:57 UTC

svn commit: r355164 - /maven/maven-1/plugins/trunk/checkstyle/plugin.jelly

Author: ltheussl
Date: Thu Dec  8 10:20:38 2005
New Revision: 355164

URL: http://svn.apache.org/viewcvs?rev=355164&view=rev
Log:
Remove unnecessary dependencies for m1.0 compatibility.
If maven.xdoc.locale.default is not defined, use "en" as default.

Modified:
    maven/maven-1/plugins/trunk/checkstyle/plugin.jelly

Modified: maven/maven-1/plugins/trunk/checkstyle/plugin.jelly
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/checkstyle/plugin.jelly?rev=355164&r1=355163&r2=355164&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/checkstyle/plugin.jelly (original)
+++ maven/maven-1/plugins/trunk/checkstyle/plugin.jelly Thu Dec  8 10:20:38 2005
@@ -33,12 +33,6 @@
   xmlns:define="jelly:define"
   xmlns:checkstyle="checkstyle">
 
-  <j:if test="${bootstrapping == null}">
-    <!-- fake test because the assert:assertPluginAvailable tag is avalaible in the maven-plugin-plugin 1.7 and newer. Thus maven will break if it's not present. -->  
-    <assert:assertPluginAvailable groupId="maven" artifactId="maven-plugin-plugin" minRelease="1.7" neededBy="${plugin.artifactId}"/>
-    <assert:assertPluginAvailable groupId="maven" artifactId="maven-xdoc-plugin" minRelease="1.10" neededBy="${plugin.artifactId}"/>
-  </j:if>
-
 
   <!-- ======================================================================== -->
 
@@ -141,17 +135,24 @@
       file="${maven.checkstyle.cache.file}"/>
     <ant:mkdir dir="${maven.checkstyle.cache.dir}"/>
 
+    <j:set var="localeCountry" value="en"/>
+    <!-- maven.xdoc.locale.default is only defined in xdoc-plugin >= 1.10 -->
     <maven:get var="currentLocale" plugin="maven-xdoc-plugin" property="maven.xdoc.locale.default"/>
-    <!-- Extract localeCountry -->
+    <!-- Set localeCountry to maven.xdoc.locale.default, if defined-->
     <j:choose>
+      <j:when test="${!empty(currentLocale)}">
+        <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 Country code we'll use EN instead.</echo>
-            <j:set var="localeCountry" value="EN"/>
+            <echo>The locale defined in maven.xdoc.locale.default is invalid, using "en" instead.</echo>
           </j:otherwise>
+        </j:choose>
+      </j:when>
+      <j:otherwise>
+        <echo>No locale defined in maven.xdoc.locale.default, using "en".</echo>
+      </j:otherwise>
     </j:choose>
 
     <ant:echo>Using ${checkstyleProperties} for checkstyle ...</ant:echo>