Moving dependencies for the Checkstyle plugin into a profile Follow-on from 335f59
Project: http://git-wip-us.apache.org/repos/asf/jclouds/repo Commit: http://git-wip-us.apache.org/repos/asf/jclouds/commit/1efb750a Tree: http://git-wip-us.apache.org/repos/asf/jclouds/tree/1efb750a Diff: http://git-wip-us.apache.org/repos/asf/jclouds/diff/1efb750a Branch: refs/heads/update-checkstyle-config Commit: 1efb750abef815a8eaeaad1d0ed461d2fd3acf75 Parents: 8c495dd Author: Andrew Phillips <[email protected]> Authored: Tue Feb 11 20:30:56 2014 -0500 Committer: Andrew Phillips <[email protected]> Committed: Tue Feb 11 20:32:32 2014 -0500 ---------------------------------------------------------------------- project/pom.xml | 40 ++++++++++++++++++++++++++++------------ 1 file changed, 28 insertions(+), 12 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/jclouds/blob/1efb750a/project/pom.xml ---------------------------------------------------------------------- diff --git a/project/pom.xml b/project/pom.xml index c94da03..3bee327 100644 --- a/project/pom.xml +++ b/project/pom.xml @@ -668,16 +668,8 @@ <plugin> <artifactId>maven-checkstyle-plugin</artifactId> <version>2.11</version> - <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> + <!-- configLocation configured via profiles --> <violationSeverity>warning</violationSeverity> <includeTestSourceDirectory>true</includeTestSourceDirectory> </configuration> @@ -1003,11 +995,35 @@ <plugin> <!-- When building jclouds-project, override the config to use the local file --> <artifactId>maven-checkstyle-plugin</artifactId> - <version>2.11</version> <configuration> <configLocation>../resources/checkstyle.xml</configLocation> - <violationSeverity>warning</violationSeverity> - <includeTestSourceDirectory>true</includeTestSourceDirectory> + </configuration> + </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> </plugin> </plugins>
