MPCHECKSTYLE-7. Allow Checkstyle plugin to access checks file from a URL.

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@115033 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
evenisse 2004-04-23 15:48:47 +00:00
parent d9d79a4f0b
commit 12becbbd4d
3 changed files with 28 additions and 9 deletions

View File

@ -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"

View File

@ -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">

View File

@ -70,6 +70,16 @@
formats (see <code>maven.checkstyle.format</code>).
</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>