Skip to content
Permalink
Browse files
use technique documented at http://maven.apache.org/plugins/maven-che…
…ckstyle-plugin/examples/multi-module-config.html to enable shared checkstyle config among modules

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/proxy/branches/version-2.0-work@967239 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
mbenson committed Jul 23, 2010
1 parent e7c35f4 commit 2f47d45dd24a1cec411b99a760b03c3891d80d9d
Show file tree
Hide file tree
Showing 3 changed files with 88 additions and 2 deletions.
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Licensed to the Apache Software Foundation (ASF) under one or more ~
contributor license agreements. See the NOTICE file distributed with ~
this work for additional information regarding copyright ownership. ~
The ASF licenses this file to You under the Apache License, Version
2.0 ~ (the "License"); you may not use this file except in compliance
with ~ the License. You may obtain a copy of the License at ~ ~
http://www.apache.org/licenses/LICENSE-2.0 ~ ~ Unless required by
applicable law or agreed to in writing, software ~ distributed under
the License is distributed on an "AS IS" BASIS, ~ WITHOUT WARRANTIES
OR CONDITIONS OF ANY KIND, either express or implied. ~ See the
License for the specific language governing permissions and ~
limitations under the License.
-->

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>org.apache</groupId>
<artifactId>apache</artifactId>
<version>7</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.apache.commons</groupId>
<artifactId>commons-proxy-build-tools</artifactId>
<version>2.0-SNAPSHOT</version>
<name>Commons Proxy Build Tools</name>
<description>Provide common setup, from http://maven.apache.org/plugins/maven-checkstyle-plugin/examples/multi-module-config.html</description>
</project>
@@ -0,0 +1,45 @@
<?xml version="1.0"?>

<!--
~ Licensed to the Apache Software Foundation (ASF) under one or more
~ contributor license agreements. See the NOTICE file distributed with
~ this work for additional information regarding copyright ownership.
~ The ASF licenses this file to You under the Apache License, Version 2.0
~ (the "License"); you may not use this file except in compliance with
~ the License. You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<!DOCTYPE module PUBLIC
"-//Puppy Crawl//DTD Check Configuration 1.1//EN"
"http://www.puppycrawl.com/dtds/configuration_1_1.dtd">

<!-- commons proxy2 customization of default Checkstyle behavior -->
<module name="Checker">
<property name="localeLanguage" value="en"/>

<module name="Header">
<property name="headerFile" value="license-header.txt"/>
</module>

<!-- no tabs allowed in files -->
<module name="FileTabCharacter"/>

<module name="TreeWalker">
<!-- Verify that EVERY source file has the appropriate license -->
<!-- check sane import statements -->
<module name="AvoidStarImport"/>
<module name="RedundantImport"/>
<module name="UnusedImports"/>

<module name="LineLength">
<property name="max" value="120"/>
</module>
</module>
</module>
15 pom.xml
@@ -21,7 +21,7 @@
<modelVersion>4.0.0</modelVersion>
<packaging>pom</packaging>
<modules>

<module>build-tools</module>
<module>core</module>
<module>jdk</module>
<module>javassist</module>
@@ -134,6 +134,17 @@
<tarLongFileMode>gnu</tarLongFileMode>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>commons-proxy-build-tools</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>

@@ -143,7 +154,7 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<configuration>
<configLocation>${basedir}/checkstyle.xml</configLocation>
<configLocation>org/apache/commons/proxy2/checkstyle.xml</configLocation>
</configuration>
</plugin>
<plugin>

0 comments on commit 2f47d45

Please sign in to comment.