Skip to content

Commit 2d49c95

Browse files
committed
Allow checkstyle to be run standalone
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/codec/trunk@1744731 13f79535-47bb-0310-9956-ffa450edef68
1 parent 8ab0ecd commit 2d49c95

1 file changed

Lines changed: 16 additions & 4 deletions

File tree

pom.xml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,10 @@ limitations under the License.
235235
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
236236
<commons.encoding>UTF-8</commons.encoding>
237237
<checkstyle.header.file>${basedir}/LICENSE-header.txt</checkstyle.header.file>
238+
<!-- Use 2.9.1 instead of 2.10-2.15; which seems to scan the 'target'
239+
dir and wants license headers in .properties to be the header for
240+
Java files. -->
241+
<checkstyle.version>2.9.1</checkstyle.version>
238242
</properties>
239243
<build>
240244
<pluginManagement>
@@ -368,17 +372,25 @@ limitations under the License.
368372
<tarLongFileMode>gnu</tarLongFileMode>
369373
</configuration>
370374
</plugin>
375+
<!-- Allow use of mvn checkstyle:checkstyle. Must agree with reporting section below. -->
376+
<plugin>
377+
<groupId>org.apache.maven.plugins</groupId>
378+
<artifactId>maven-checkstyle-plugin</artifactId>
379+
<version>${checkstyle.version}</version>
380+
<configuration>
381+
<configLocation>${basedir}/checkstyle.xml</configLocation>
382+
<enableRulesSummary>false</enableRulesSummary>
383+
<headerFile>${basedir}/LICENSE-header.txt</headerFile>
384+
</configuration>
385+
</plugin>
371386
</plugins>
372387
</build>
373388
<reporting>
374389
<plugins>
375390
<plugin>
376391
<groupId>org.apache.maven.plugins</groupId>
377392
<artifactId>maven-checkstyle-plugin</artifactId>
378-
<!-- Use 2.9.1 instead of 2.10-2.15; which seems to scan the 'target'
379-
dir and wants license headers in .properties to be the header for
380-
Java files. -->
381-
<version>2.9.1</version>
393+
<version>${checkstyle.version}</version>
382394
<configuration>
383395
<configLocation>${basedir}/checkstyle.xml</configLocation>
384396
<enableRulesSummary>false</enableRulesSummary>

0 commit comments

Comments
 (0)