Moving dependencies for the Checkstyle plugin into a profile

Follow-on from 335f594
This commit is contained in:
Andrew Phillips 2014-02-11 20:30:56 -05:00
parent 8c495ddee4
commit d7d76291ae
1 changed files with 28 additions and 12 deletions

View File

@ -668,16 +668,8 @@
<plugin> <plugin>
<artifactId>maven-checkstyle-plugin</artifactId> <artifactId>maven-checkstyle-plugin</artifactId>
<version>2.11</version> <version>2.11</version>
<dependencies>
<dependency>
<groupId>org.apache.jclouds</groupId>
<artifactId>jclouds-resources</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
<configuration> <configuration>
<!-- jclouds-resources has the checkstyle config in the classpath --> <!-- configLocation configured via profiles -->
<configLocation>resources/checkstyle.xml</configLocation>
<violationSeverity>warning</violationSeverity> <violationSeverity>warning</violationSeverity>
<includeTestSourceDirectory>true</includeTestSourceDirectory> <includeTestSourceDirectory>true</includeTestSourceDirectory>
</configuration> </configuration>
@ -1003,11 +995,35 @@
<plugin> <plugin>
<!-- When building jclouds-project, override the config to use the local file --> <!-- When building jclouds-project, override the config to use the local file -->
<artifactId>maven-checkstyle-plugin</artifactId> <artifactId>maven-checkstyle-plugin</artifactId>
<version>2.11</version>
<configuration> <configuration>
<configLocation>../resources/checkstyle.xml</configLocation> <configLocation>../resources/checkstyle.xml</configLocation>
<violationSeverity>warning</violationSeverity> </configuration>
<includeTestSourceDirectory>true</includeTestSourceDirectory> </plugin>
</plugins>
</build>
</profile>
<profile>
<id>not-jclouds-project</id>
<activation>
<file>
<!-- only in the jclouds-project module -->
<missing>src/etc/header.txt</missing>
</file>
</activation>
<build>
<plugins>
<plugin>
<artifactId>maven-checkstyle-plugin</artifactId>
<dependencies>
<dependency>
<groupId>org.apache.jclouds</groupId>
<artifactId>jclouds-resources</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
<configuration>
<!-- jclouds-resources has the checkstyle config in the classpath -->
<configLocation>resources/checkstyle.xml</configLocation>
</configuration> </configuration>
</plugin> </plugin>
</plugins> </plugins>