evenisse    2004/04/23 08:48:47

  Modified:    checkstyle plugin.jelly
               checkstyle/xdocs changes.xml properties.xml
  Log:
  MPCHECKSTYLE-7. Allow Checkstyle plugin to access checks file from a URL.
  
  Revision  Changes    Path
  1.24      +17 -9     maven-plugins/checkstyle/plugin.jelly
  
  Index: plugin.jelly
  ===================================================================
  RCS file: /home/cvs/maven-plugins/checkstyle/plugin.jelly,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- plugin.jelly      4 Mar 2004 18:01:42 -0000       1.23
  +++ plugin.jelly      23 Apr 2004 15:48:47 -0000      1.24
  @@ -46,20 +46,28 @@
   
       <j:if test="${sourcesPresent == 'true'}">
   
  -      <!-- If an explicit config file is set then use that. If one isn't 
  +      <!-- If an explicit config file or URL is set then use that. If one isn't 
                   then we will look for the maven.checkstyle.format property and
                   load the predefined config set. -->
         <j:set var="checkstylePropertiesX" value="${maven.checkstyle.properties}X"/>
  +      <j:set var="checkstylePropertiesURLX" 
value="${maven.checkstyle.propertiesURL}X"/>
         <j:choose>
           <j:when test="${checkstylePropertiesX != 'X'}">
  -          <j:set 
  -            var="checkstyleProperties" 
  -            value="${maven.checkstyle.properties}"/>
  +          <j:set
  +            var="checkstyleProperties"
  +            value="file:${maven.checkstyle.properties}"/>
  +          <util:replace oldChar="\\" newChar="/" value="${checkstyleProperties}" 
var="checkstyleProperties" />
  +        </j:when>
  +        <j:when test="${checkstylePropertiesURLX != 'X'}">
  +          <j:set
  +            var="checkstyleProperties"
  +            value="${maven.checkstyle.propertiesURL}"/>
           </j:when>
           <j:otherwise>
  -          <j:set 
  -            var="checkstyleProperties" 
  -            value="${plugin.resources}/${maven.checkstyle.format}_checks.xml"/>
  +          <j:set
  +            var="checkstyleProperties"
  +            
value="file:///${plugin.resources}/${maven.checkstyle.format}_checks.xml"/>
  +          <util:replace oldChar="\\" newChar="/" value="${checkstyleProperties}" 
var="checkstyleProperties" />
           </j:otherwise>
         </j:choose>
   
  @@ -104,7 +112,7 @@
         =  ${maven.checkstyle.header.file}
         =  Checkstyle needs it to check the existence of the License in =
         =  your source files. If it can't find this file, it throws an  =
  -      =  error.                                                       = 
  +      =  error.                                                       =
         =  A temporary solution is to create an empty LICENSE.txt file. =
         =  Though, we recommend that you edit this License.             =
         =================================================================
  @@ -129,7 +137,7 @@
       <ant:echo>Using ${checkstyleProperties} for checkstyle ...</ant:echo>
   
       <ant:checkstyle
  -      config="${checkstyleProperties}"
  +      configURL="${checkstyleProperties}"
         failOnViolation="${maven.checkstyle.fail.on.violation}">
   
         <property key="checkstyle.header.file" 
  
  
  
  1.27      +1 -0      maven-plugins/checkstyle/xdocs/changes.xml
  
  Index: changes.xml
  ===================================================================
  RCS file: /home/cvs/maven-plugins/checkstyle/xdocs/changes.xml,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- changes.xml       12 Apr 2004 10:57:24 -0000      1.26
  +++ changes.xml       23 Apr 2004 15:48:47 -0000      1.27
  @@ -26,6 +26,7 @@
     </properties>
     <body>
       <release version="2.4" date="in CVS">
  +      <action dev="evenisse" type="update" issue="MPCHECKSTYLE-7">Allow Checkstyle 
plugin to access checks file from a URL.</action>
         <action dev="vmassol" type="update">Upgraded to Checkstyle 3.4.</action>
       </release>
       <release version="2.3" date="2004-03-11">
  
  
  
  1.5       +10 -0     maven-plugins/checkstyle/xdocs/properties.xml
  
  Index: properties.xml
  ===================================================================
  RCS file: /home/cvs/maven-plugins/checkstyle/xdocs/properties.xml,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- properties.xml    4 Mar 2004 18:01:42 -0000       1.4
  +++ properties.xml    23 Apr 2004 15:48:47 -0000      1.5
  @@ -71,6 +71,16 @@
             </td>
           </tr>
           <tr>
  +          <td>maven.checkstyle.propertiesURL</td>
  +          <td>Yes</td>
  +          <td>
  +            Specifies the URL of the checkstyle properties that will be
  +            used to check the source. Note that you will need to use this
  +            property only if you don't want to use any of the predefined
  +            formats (see <code>maven.checkstyle.format</code>).
  +          </td>
  +        </tr>
  +        <tr>
             <td>maven.checkstyle.header.file</td>
             <td>Yes</td>
             <td>
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to