You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ol...@apache.org on 2011/10/01 23:57:27 UTC
svn commit: r1178096 - in
/maven/plugins/trunk/maven-checkstyle-plugin/src/it/multi-modules-aggregate:
./ child-a/ child-a/src/ child-a/src/main/ child-a/src/main/java/
child-a/src/main/java/org/ child-a/src/main/java/org/apache/
child-a/src/main/java/...
Author: olamy
Date: Sat Oct 1 21:57:26 2011
New Revision: 1178096
URL: http://svn.apache.org/viewvc?rev=1178096&view=rev
Log:
[MCHECKSTYLE-62] Support aggregated reports in a multi-modules project: add it test
Added:
maven/plugins/trunk/maven-checkstyle-plugin/src/it/multi-modules-aggregate/
maven/plugins/trunk/maven-checkstyle-plugin/src/it/multi-modules-aggregate/child-a/
maven/plugins/trunk/maven-checkstyle-plugin/src/it/multi-modules-aggregate/child-a/pom.xml (with props)
maven/plugins/trunk/maven-checkstyle-plugin/src/it/multi-modules-aggregate/child-a/src/
maven/plugins/trunk/maven-checkstyle-plugin/src/it/multi-modules-aggregate/child-a/src/main/
maven/plugins/trunk/maven-checkstyle-plugin/src/it/multi-modules-aggregate/child-a/src/main/java/
maven/plugins/trunk/maven-checkstyle-plugin/src/it/multi-modules-aggregate/child-a/src/main/java/org/
maven/plugins/trunk/maven-checkstyle-plugin/src/it/multi-modules-aggregate/child-a/src/main/java/org/apache/
maven/plugins/trunk/maven-checkstyle-plugin/src/it/multi-modules-aggregate/child-a/src/main/java/org/apache/maven/
maven/plugins/trunk/maven-checkstyle-plugin/src/it/multi-modules-aggregate/child-a/src/main/java/org/apache/maven/plugins/
maven/plugins/trunk/maven-checkstyle-plugin/src/it/multi-modules-aggregate/child-a/src/main/java/org/apache/maven/plugins/checkstyle/
maven/plugins/trunk/maven-checkstyle-plugin/src/it/multi-modules-aggregate/child-a/src/main/java/org/apache/maven/plugins/checkstyle/its/
maven/plugins/trunk/maven-checkstyle-plugin/src/it/multi-modules-aggregate/child-a/src/main/java/org/apache/maven/plugins/checkstyle/its/App.java (with props)
maven/plugins/trunk/maven-checkstyle-plugin/src/it/multi-modules-aggregate/child-b/
maven/plugins/trunk/maven-checkstyle-plugin/src/it/multi-modules-aggregate/child-b/pom.xml (with props)
maven/plugins/trunk/maven-checkstyle-plugin/src/it/multi-modules-aggregate/child-b/src/
maven/plugins/trunk/maven-checkstyle-plugin/src/it/multi-modules-aggregate/child-b/src/main/
maven/plugins/trunk/maven-checkstyle-plugin/src/it/multi-modules-aggregate/child-b/src/main/java/
maven/plugins/trunk/maven-checkstyle-plugin/src/it/multi-modules-aggregate/child-b/src/main/java/org/
maven/plugins/trunk/maven-checkstyle-plugin/src/it/multi-modules-aggregate/child-b/src/main/java/org/apache/
maven/plugins/trunk/maven-checkstyle-plugin/src/it/multi-modules-aggregate/child-b/src/main/java/org/apache/maven/
maven/plugins/trunk/maven-checkstyle-plugin/src/it/multi-modules-aggregate/child-b/src/main/java/org/apache/maven/plugins/
maven/plugins/trunk/maven-checkstyle-plugin/src/it/multi-modules-aggregate/child-b/src/main/java/org/apache/maven/plugins/checkstyle/
maven/plugins/trunk/maven-checkstyle-plugin/src/it/multi-modules-aggregate/child-b/src/main/java/org/apache/maven/plugins/checkstyle/its/
maven/plugins/trunk/maven-checkstyle-plugin/src/it/multi-modules-aggregate/child-b/src/main/java/org/apache/maven/plugins/checkstyle/its/AppTest.java (with props)
maven/plugins/trunk/maven-checkstyle-plugin/src/it/multi-modules-aggregate/invoker.properties (with props)
maven/plugins/trunk/maven-checkstyle-plugin/src/it/multi-modules-aggregate/pom.xml (with props)
maven/plugins/trunk/maven-checkstyle-plugin/src/it/multi-modules-aggregate/verify.groovy (with props)
Added: maven/plugins/trunk/maven-checkstyle-plugin/src/it/multi-modules-aggregate/child-a/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-checkstyle-plugin/src/it/multi-modules-aggregate/child-a/pom.xml?rev=1178096&view=auto
==============================================================================
--- maven/plugins/trunk/maven-checkstyle-plugin/src/it/multi-modules-aggregate/child-a/pom.xml (added)
+++ maven/plugins/trunk/maven-checkstyle-plugin/src/it/multi-modules-aggregate/child-a/pom.xml Sat Oct 1 21:57:26 2011
@@ -0,0 +1,46 @@
+<?xml version="1.0"?>
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>multi-modules-aggregate-parent</artifactId>
+ <groupId>org.apache.maven.plugins.checkstyle.its</groupId>
+ <version>1.0-SNAPSHOT</version>
+ </parent>
+ <groupId>org.apache.maven.plugins.checkstyle.its</groupId>
+ <artifactId>multi-modules-child</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <name>multi-modules-child</name>
+ <url>http://maven.apache.org</url>
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+ <build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ <version>@pom.version@</version>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-site-plugin</artifactId>
+ <version>@sitePluginVersion@</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ <version>@pom.version@</version>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Propchange: maven/plugins/trunk/maven-checkstyle-plugin/src/it/multi-modules-aggregate/child-a/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-checkstyle-plugin/src/it/multi-modules-aggregate/child-a/pom.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: maven/plugins/trunk/maven-checkstyle-plugin/src/it/multi-modules-aggregate/child-a/src/main/java/org/apache/maven/plugins/checkstyle/its/App.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-checkstyle-plugin/src/it/multi-modules-aggregate/child-a/src/main/java/org/apache/maven/plugins/checkstyle/its/App.java?rev=1178096&view=auto
==============================================================================
--- maven/plugins/trunk/maven-checkstyle-plugin/src/it/multi-modules-aggregate/child-a/src/main/java/org/apache/maven/plugins/checkstyle/its/App.java (added)
+++ maven/plugins/trunk/maven-checkstyle-plugin/src/it/multi-modules-aggregate/child-a/src/main/java/org/apache/maven/plugins/checkstyle/its/App.java Sat Oct 1 21:57:26 2011
@@ -0,0 +1,32 @@
+package org.apache.maven.plugins.checkstyle.its;
+
+/*
+ * 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.
+ */
+
+/**
+ * Hello world!
+ *
+ */
+public class App
+{
+ public static void main( String[] args )
+ {
+ System.out.println( "Hello World!" );
+ }
+}
Propchange: maven/plugins/trunk/maven-checkstyle-plugin/src/it/multi-modules-aggregate/child-a/src/main/java/org/apache/maven/plugins/checkstyle/its/App.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-checkstyle-plugin/src/it/multi-modules-aggregate/child-a/src/main/java/org/apache/maven/plugins/checkstyle/its/App.java
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: maven/plugins/trunk/maven-checkstyle-plugin/src/it/multi-modules-aggregate/child-b/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-checkstyle-plugin/src/it/multi-modules-aggregate/child-b/pom.xml?rev=1178096&view=auto
==============================================================================
--- maven/plugins/trunk/maven-checkstyle-plugin/src/it/multi-modules-aggregate/child-b/pom.xml (added)
+++ maven/plugins/trunk/maven-checkstyle-plugin/src/it/multi-modules-aggregate/child-b/pom.xml Sat Oct 1 21:57:26 2011
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>multi-modules-aggregate-parent</artifactId>
+ <groupId>org.apache.maven.plugins.checkstyle.its</groupId>
+ <version>1.0-SNAPSHOT</version>
+ </parent>
+ <groupId>org.apache.maven.plugins.checkstyle.its</groupId>
+ <artifactId>multi-modules-child-nosource</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <name>multi-modules-child-nosource</name>
+ <url>http://maven.apache.org</url>
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+</project>
Propchange: maven/plugins/trunk/maven-checkstyle-plugin/src/it/multi-modules-aggregate/child-b/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-checkstyle-plugin/src/it/multi-modules-aggregate/child-b/pom.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: maven/plugins/trunk/maven-checkstyle-plugin/src/it/multi-modules-aggregate/child-b/src/main/java/org/apache/maven/plugins/checkstyle/its/AppTest.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-checkstyle-plugin/src/it/multi-modules-aggregate/child-b/src/main/java/org/apache/maven/plugins/checkstyle/its/AppTest.java?rev=1178096&view=auto
==============================================================================
--- maven/plugins/trunk/maven-checkstyle-plugin/src/it/multi-modules-aggregate/child-b/src/main/java/org/apache/maven/plugins/checkstyle/its/AppTest.java (added)
+++ maven/plugins/trunk/maven-checkstyle-plugin/src/it/multi-modules-aggregate/child-b/src/main/java/org/apache/maven/plugins/checkstyle/its/AppTest.java Sat Oct 1 21:57:26 2011
@@ -0,0 +1,38 @@
+package org.apache.maven.plugins.checkstyle.its;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+/**
+ * Unit test for simple App.
+ */
+public class AppTest
+ extends TestCase
+{
+ /**
+ * Create the test case
+ *
+ * @param testName name of the test case
+ */
+ public AppTest( String testName )
+ {
+ super( testName );
+ }
+
+ /**
+ * @return the suite of tests being tested
+ */
+ public static Test suite()
+ {
+ return new TestSuite( AppTest.class );
+ }
+
+ /**
+ * Rigourous Test :-)
+ */
+ public void testApp()
+ {
+ assertTrue( true );
+ }
+}
Propchange: maven/plugins/trunk/maven-checkstyle-plugin/src/it/multi-modules-aggregate/child-b/src/main/java/org/apache/maven/plugins/checkstyle/its/AppTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-checkstyle-plugin/src/it/multi-modules-aggregate/child-b/src/main/java/org/apache/maven/plugins/checkstyle/its/AppTest.java
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: maven/plugins/trunk/maven-checkstyle-plugin/src/it/multi-modules-aggregate/invoker.properties
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-checkstyle-plugin/src/it/multi-modules-aggregate/invoker.properties?rev=1178096&view=auto
==============================================================================
--- maven/plugins/trunk/maven-checkstyle-plugin/src/it/multi-modules-aggregate/invoker.properties (added)
+++ maven/plugins/trunk/maven-checkstyle-plugin/src/it/multi-modules-aggregate/invoker.properties Sat Oct 1 21:57:26 2011
@@ -0,0 +1 @@
+invoker.goals=clean site
Propchange: maven/plugins/trunk/maven-checkstyle-plugin/src/it/multi-modules-aggregate/invoker.properties
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-checkstyle-plugin/src/it/multi-modules-aggregate/invoker.properties
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: maven/plugins/trunk/maven-checkstyle-plugin/src/it/multi-modules-aggregate/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-checkstyle-plugin/src/it/multi-modules-aggregate/pom.xml?rev=1178096&view=auto
==============================================================================
--- maven/plugins/trunk/maven-checkstyle-plugin/src/it/multi-modules-aggregate/pom.xml (added)
+++ maven/plugins/trunk/maven-checkstyle-plugin/src/it/multi-modules-aggregate/pom.xml Sat Oct 1 21:57:26 2011
@@ -0,0 +1,84 @@
+<?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/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.apache.maven.plugins.checkstyle.its</groupId>
+ <artifactId>multi-modules-aggregate-parent</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <packaging>pom</packaging>
+ <name>multi-modules-parent</name>
+ <url>http://maven.apache.org/</url>
+
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ </properties>
+
+ <build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ <version>@pom.version@</version>
+ <configuration>
+ <configLocation>http://svn.apache.org/repos/asf/maven/plugins/tags/maven-checkstyle-plugin-2.5/src/main/resources/config/maven_checks.xml</configLocation>
+ <headerLocation>http://svn.apache.org/repos/asf/maven/plugins/tags/maven-checkstyle-plugin-2.5/src/main/resources/config/maven-header.txt</headerLocation>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-site-plugin</artifactId>
+ <version>@sitePluginVersion@</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ <version>@pom.version@</version>
+ </plugin>
+ </plugins>
+ </build>
+
+ <reporting>
+ <excludeDefaults>true</excludeDefaults>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ <version>@pom.version@</version>
+ <inherited>false</inherited>
+ <reportSets>
+ <reportSet>
+ <reports>
+ <report>checkstyle-aggregate</report>
+ </reports>
+ </reportSet>
+ </reportSets>
+ </plugin>
+ </plugins>
+ </reporting>
+ <modules>
+ <module>child-a</module>
+ <module>child-b</module>
+ </modules>
+</project>
\ No newline at end of file
Propchange: maven/plugins/trunk/maven-checkstyle-plugin/src/it/multi-modules-aggregate/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-checkstyle-plugin/src/it/multi-modules-aggregate/pom.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: maven/plugins/trunk/maven-checkstyle-plugin/src/it/multi-modules-aggregate/verify.groovy
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-checkstyle-plugin/src/it/multi-modules-aggregate/verify.groovy?rev=1178096&view=auto
==============================================================================
--- maven/plugins/trunk/maven-checkstyle-plugin/src/it/multi-modules-aggregate/verify.groovy (added)
+++ maven/plugins/trunk/maven-checkstyle-plugin/src/it/multi-modules-aggregate/verify.groovy Sat Oct 1 21:57:26 2011
@@ -0,0 +1,33 @@
+
+/*
+ * 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.
+ */
+
+assert new File(basedir, 'target/checkstyle-cachefile').exists();
+assert new File(basedir, 'target/checkstyle-checker.xml').exists();
+assert new File(basedir, 'target/checkstyle-header.txt').exists();
+assert new File(basedir, 'target/checkstyle-result.xml').exists();
+
+assert new File(basedir, 'target/site/checkstyle-aggregate.html').exists();
+
+content = new File(basedir, 'target/site/checkstyle-aggregate.html').text;
+
+assert content.contains( 'org/apache/maven/plugins/checkstyle/its/App.java' );
+assert content.contains( 'org/apache/maven/plugins/checkstyle/its/AppTest.java' );
+
+return true;
\ No newline at end of file
Propchange: maven/plugins/trunk/maven-checkstyle-plugin/src/it/multi-modules-aggregate/verify.groovy
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-checkstyle-plugin/src/it/multi-modules-aggregate/verify.groovy
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision