Skip to content

Commit 006188e

Browse files
committed
Allow checkstyle to be run interactively (not part of site build)
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1485830 13f79535-47bb-0310-9956-ffa450edef68
1 parent c6c762a commit 006188e

1 file changed

Lines changed: 20 additions & 6 deletions

File tree

pom.xml

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,11 @@ CSV files of various types.
123123
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
124124
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
125125
<commons.encoding>UTF-8</commons.encoding>
126+
<!--
127+
Use 2.9.1 instead of 2.10; 2.10 seems to scan the 'target' dir
128+
and wants license headers in .properties to be the header for Java files.
129+
-->
130+
<checkstyle.version>2.9.1</checkstyle.version>
126131
<checkstyle.header.file>${basedir}/LICENSE-header.txt</checkstyle.header.file>
127132
</properties>
128133

@@ -147,22 +152,31 @@ CSV files of various types.
147152
</excludes>
148153
</configuration>
149154
</plugin>
155+
<!-- Allow checkstyle to be run interactively; keep in sync with report config below -->
156+
<plugin>
157+
<groupId>org.apache.maven.plugins</groupId>
158+
<artifactId>maven-checkstyle-plugin</artifactId>
159+
<version>${checkstyle.version}</version>
160+
<configuration>
161+
<configLocation>${basedir}/checkstyle.xml</configLocation>
162+
<enableRulesSummary>false</enableRulesSummary>
163+
<headerLocation>${checkstyle.header.file}</headerLocation>
164+
</configuration>
165+
</plugin>
150166
</plugins>
151167
</build>
152168

153169
<reporting>
154170
<plugins>
171+
<!-- Keep in sync with build config above -->
155172
<plugin>
156173
<groupId>org.apache.maven.plugins</groupId>
157174
<artifactId>maven-checkstyle-plugin</artifactId>
158-
<!-- Use 2.9.1 instead of 2.10; 2.10 seems to scan the 'target'
159-
dir and wants license headers in .properties to be the header for
160-
Java files. -->
161-
<version>2.9.1</version>
175+
<version>${checkstyle.version}</version>
162176
<configuration>
163177
<configLocation>${basedir}/checkstyle.xml</configLocation>
164178
<enableRulesSummary>false</enableRulesSummary>
165-
<headerLocation>${basedir}/LICENSE-header.txt</headerLocation>
179+
<headerLocation>${checkstyle.header.file}</headerLocation>
166180
</configuration>
167181
<!-- We need to specify reportSets because 2.9.1 creates two reports -->
168182
<reportSets>
@@ -198,7 +212,7 @@ CSV files of various types.
198212
</tags>
199213
</configuration>
200214
</plugin>
201-
<!--
215+
<!--
202216
NOTE: this requires Maven 3.0.x; when used with Maven 2.2.1, the following error is seen:
203217
Embedded error: Error rendering Maven report: org.dom4j.DocumentFactory cannot be cast to org.dom4j.DocumentFactory
204218
-->

0 commit comments

Comments
 (0)