Skip to content

Commit

Permalink
Checkstyle med config-fil i separat build-tools project
Browse files Browse the repository at this point in the history
  • Loading branch information
jrftrifork committed Oct 3, 2011
1 parent dd17a67 commit 61f71be
Show file tree
Hide file tree
Showing 6 changed files with 133 additions and 69 deletions.
11 changes: 11 additions & 0 deletions common/build-tools/pom.xml
@@ -0,0 +1,11 @@
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>dk.nsi.stamdata</groupId>
<artifactId>build-tools</artifactId>
<version>3.1.0-SNAPSHOT</version>
<packaging>jar</packaging>

<name>Stamdata Build Tools</name>
</project>
@@ -0,0 +1,33 @@
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
"-//Puppy Crawl//DTD Check Configuration 1.2//EN"
"http://www.puppycrawl.com/dtds/configuration_1_2.dtd">

<module name="Checker">
<!--<module name="FileTabCharacter">-->
<!--<property name="eachLine" value="true"/>-->
<!--</module>-->

<!--<module name="RegexpSingleline">-->
<!--&lt;!&ndash; \s matches whitespace character, $ matches end of line. &ndash;&gt;-->
<!--<property name="format" value="\s+$"/>-->
<!--<property name="message" value="Line has trailing spaces."/>-->
<!--</module>-->

<module name="TreeWalker">
<property name="cacheFile" value="${checkstyle.cache.file}"/>

<!--<module name="IllegalImport"/> &lt;!&ndash; defaults to sun.* packages &ndash;&gt;-->
<!--<module name="RedundantImport"/>-->
<!--<module name="UnusedImports"/>-->


<!--&lt;!&ndash; Checks for blocks. You know, those {}'s &ndash;&gt;-->
<!--&lt;!&ndash; See http://checkstyle.sf.net/config_blocks.html &ndash;&gt;-->
<!--<module name="AvoidNestedBlocks"/>-->
<!--<module name="EmptyBlock"/>-->
<!--<module name="LeftCurly"/>-->
<!--<module name="NeedBraces"/>-->
<!--<module name="RightCurly"/>-->
</module>
</module>
30 changes: 30 additions & 0 deletions config/java-pom.xml
Expand Up @@ -34,8 +34,38 @@
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>2.7</version>
<dependencies>
<dependency>
<groupId>dk.nsi.stamdata</groupId>
<artifactId>build-tools</artifactId>
<version>3.1.0-SNAPSHOT</version>
</dependency>
</dependencies>
<configuration>
<configLocation>sdm/sdm_checkstyle_config.xml</configLocation>
</configuration>
</plugin>
</plugins>
</build>

<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>2.7</version>
<configuration>
<configLocation>sdm/sdm_checkstyle_config.xml</configLocation>
</configuration>
</plugin>
</plugins>
</reporting>

<dependencies>
<!-- GUICE -->
<dependency>
Expand Down
106 changes: 53 additions & 53 deletions config/webservice-pom.xml
@@ -1,23 +1,24 @@
<?xml version="1.0"?>
<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/maven-v4_0_0.xsd">

<modelVersion>4.0.0</modelVersion>
<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/maven-v4_0_0.xsd">

<parent>
<groupId>dk.nsi.stamdata</groupId>
<artifactId>java-pom</artifactId>
<version>3.1.0</version>
<relativePath>java-pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>

<artifactId>webservice-pom</artifactId>
<packaging>pom</packaging>

<name>WebService POM</name>

<!-- DEPENDENCIES -->

<dependencies>
<parent>
<groupId>dk.nsi.stamdata</groupId>
<artifactId>java-pom</artifactId>
<version>3.1.0</version>
<relativePath>java-pom.xml</relativePath>
</parent>

<artifactId>webservice-pom</artifactId>
<packaging>pom</packaging>

<name>WebService POM</name>

<!-- DEPENDENCIES -->

<dependencies>
<dependency>
<groupId>com.google.inject.extensions</groupId>
<artifactId>guice-servlet</artifactId>
Expand All @@ -29,42 +30,41 @@
<version>2.4</version>
<scope>provided</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.7.2</version>
<configuration>
<excludes>
<exclude>**/*IntegrationTest*</exclude>
<exclude>**/*DaoTest*</exclude>
<exclude>**/*ViewTest*</exclude>
</excludes>
</configuration>
</dependencies>

<executions>
<execution>
<id>surefire-it</id>
<phase>integration-test</phase>
<goals>
<goal>test</goal>
</goals>
<configuration>
<excludes>
<exclude>none</exclude>
</excludes>
<includes>
<include>**/*IntegrationTest*</include>
<include>**/*DaoTest*</include>
<include>**/*ViewTest*</include>
</includes>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<build>
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.7.2</version>
<configuration>
<excludes>
<exclude>**/*IntegrationTest*</exclude>
<exclude>**/*DaoTest*</exclude>
<exclude>**/*ViewTest*</exclude>
</excludes>
</configuration>

<executions>
<execution>
<id>surefire-it</id>
<phase>integration-test</phase>
<goals>
<goal>test</goal>
</goals>
<configuration>
<excludes>
<exclude>none</exclude>
</excludes>
<includes>
<include>**/*IntegrationTest*</include>
<include>**/*DaoTest*</include>
<include>**/*ViewTest*</include>
</includes>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
2 changes: 1 addition & 1 deletion nsp/cpr-ws/pom.xml
Expand Up @@ -197,6 +197,6 @@
</execution>
</executions>
</plugin>
</plugins>
</plugins>
</build>
</project>
20 changes: 5 additions & 15 deletions pom.xml
Expand Up @@ -11,9 +11,13 @@
<version>3.1.0-SNAPSHOT</version>

<modules>
<module>config/java-pom.xml</module>
<module>config/webservice-pom.xml</module>

<module>common/common</module>
<module>common/dgws-filter</module>

<module>common/build-tools</module>

<module>dodi/data-manager</module>

<module>nsp/batch-copy-ws</module>
Expand Down Expand Up @@ -75,11 +79,6 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>2.7</version>
</plugin>
</plugins>
</build>

Expand All @@ -106,13 +105,4 @@
</snapshots>
</pluginRepository>
</pluginRepositories>

<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
</plugin>
</plugins>
</reporting>
</project>

0 comments on commit 61f71be

Please sign in to comment.