Author: bentmann Date: Mon Aug 11 12:06:46 2008 New Revision: 684879 URL: http://svn.apache.org/viewvc?rev=684879&view=rev Log: o Added some integration tests
Added: maven/plugins/trunk/maven-checkstyle-plugin/src/it/ maven/plugins/trunk/maven-checkstyle-plugin/src/it/check-fail/ maven/plugins/trunk/maven-checkstyle-plugin/src/it/check-fail/invoker.properties (with props) maven/plugins/trunk/maven-checkstyle-plugin/src/it/check-fail/pom.xml (with props) maven/plugins/trunk/maven-checkstyle-plugin/src/it/check-fail/src/ maven/plugins/trunk/maven-checkstyle-plugin/src/it/check-fail/src/main/ maven/plugins/trunk/maven-checkstyle-plugin/src/it/check-fail/src/main/java/ maven/plugins/trunk/maven-checkstyle-plugin/src/it/check-fail/src/main/java/org/ maven/plugins/trunk/maven-checkstyle-plugin/src/it/check-fail/src/main/java/org/MyClass.java (with props) maven/plugins/trunk/maven-checkstyle-plugin/src/it/check-pass/ maven/plugins/trunk/maven-checkstyle-plugin/src/it/check-pass/invoker.properties (with props) maven/plugins/trunk/maven-checkstyle-plugin/src/it/check-pass/pom.xml (with props) maven/plugins/trunk/maven-checkstyle-plugin/src/it/check-pass/src/ maven/plugins/trunk/maven-checkstyle-plugin/src/it/check-pass/src/main/ maven/plugins/trunk/maven-checkstyle-plugin/src/it/check-pass/src/main/java/ maven/plugins/trunk/maven-checkstyle-plugin/src/it/check-pass/src/main/java/org/ maven/plugins/trunk/maven-checkstyle-plugin/src/it/check-pass/src/main/java/org/MyClass.java (with props) maven/plugins/trunk/maven-checkstyle-plugin/src/it/check-pass/src/main/java/org/package.html (with props) maven/plugins/trunk/maven-checkstyle-plugin/src/it/minimal-pom/ maven/plugins/trunk/maven-checkstyle-plugin/src/it/minimal-pom/pom.xml (with props) maven/plugins/trunk/maven-checkstyle-plugin/src/it/minimal-pom/src/ maven/plugins/trunk/maven-checkstyle-plugin/src/it/minimal-pom/src/main/ maven/plugins/trunk/maven-checkstyle-plugin/src/it/minimal-pom/src/main/java/ maven/plugins/trunk/maven-checkstyle-plugin/src/it/minimal-pom/src/main/java/org/ maven/plugins/trunk/maven-checkstyle-plugin/src/it/minimal-pom/src/main/java/org/MyClass.java (with props) maven/plugins/trunk/maven-checkstyle-plugin/src/it/minimal-pom/verify.bsh (with props) maven/plugins/trunk/maven-checkstyle-plugin/src/it/settings.xml (with props) Modified: maven/plugins/trunk/maven-checkstyle-plugin/pom.xml Modified: maven/plugins/trunk/maven-checkstyle-plugin/pom.xml URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-checkstyle-plugin/pom.xml?rev=684879&r1=684878&r2=684879&view=diff ============================================================================== --- maven/plugins/trunk/maven-checkstyle-plugin/pom.xml (original) +++ maven/plugins/trunk/maven-checkstyle-plugin/pom.xml Mon Aug 11 12:06:46 2008 @@ -199,20 +199,27 @@ <build> <plugins> <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-antrun-plugin</artifactId> + <artifactId>maven-invoker-plugin</artifactId> + <configuration> + <debug>true</debug> + <projectsDirectory>src/it</projectsDirectory> + <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo> + <pomIncludes> + <pomInclude>*/pom.xml</pomInclude> + </pomIncludes> + <preBuildHookScript>setup.bsh</preBuildHookScript> + <postBuildHookScript>verify.bsh</postBuildHookScript> + <localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath> + <settingsFile>src/it/settings.xml</settingsFile> + <goals> + <goal>site</goal> + </goals> + </configuration> <executions> <execution> <id>integration-test</id> - <phase>integration-test</phase> - <configuration> - <tasks> - <echo/><echo/><echo/><echo/><echo/> - <echo level="warning">NO INTEGRATION TESTS DEFINED</echo> - <echo/><echo/><echo/><echo/><echo/> - </tasks> - </configuration> <goals> + <goal>install</goal> <goal>run</goal> </goals> </execution> Added: maven/plugins/trunk/maven-checkstyle-plugin/src/it/check-fail/invoker.properties URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-checkstyle-plugin/src/it/check-fail/invoker.properties?rev=684879&view=auto ============================================================================== --- maven/plugins/trunk/maven-checkstyle-plugin/src/it/check-fail/invoker.properties (added) +++ maven/plugins/trunk/maven-checkstyle-plugin/src/it/check-fail/invoker.properties Mon Aug 11 12:06:46 2008 @@ -0,0 +1,2 @@ +invoker.goals=verify +invoker.buildResult=failure Propchange: maven/plugins/trunk/maven-checkstyle-plugin/src/it/check-fail/invoker.properties ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/plugins/trunk/maven-checkstyle-plugin/src/it/check-fail/invoker.properties ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Added: maven/plugins/trunk/maven-checkstyle-plugin/src/it/check-fail/pom.xml URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-checkstyle-plugin/src/it/check-fail/pom.xml?rev=684879&view=auto ============================================================================== --- maven/plugins/trunk/maven-checkstyle-plugin/src/it/check-fail/pom.xml (added) +++ maven/plugins/trunk/maven-checkstyle-plugin/src/it/check-fail/pom.xml Mon Aug 11 12:06:46 2008 @@ -0,0 +1,54 @@ +<?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</groupId> + <artifactId>check-fail</artifactId> + <version>1.0-SNAPSHOT</version> + <packaging>jar</packaging> + + <url>http://maven.apache.org/</url> + + <properties> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + </properties> + + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-checkstyle-plugin</artifactId> + <version>@pom.version@</version> + <executions> + <execution> + <id>check</id> + <goals> + <goal>check</goal> + </goals> + </execution> + </executions> + </plugin> + </plugins> + </build> +</project> Propchange: maven/plugins/trunk/maven-checkstyle-plugin/src/it/check-fail/pom.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/plugins/trunk/maven-checkstyle-plugin/src/it/check-fail/pom.xml ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Added: maven/plugins/trunk/maven-checkstyle-plugin/src/it/check-fail/src/main/java/org/MyClass.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-checkstyle-plugin/src/it/check-fail/src/main/java/org/MyClass.java?rev=684879&view=auto ============================================================================== --- maven/plugins/trunk/maven-checkstyle-plugin/src/it/check-fail/src/main/java/org/MyClass.java (added) +++ maven/plugins/trunk/maven-checkstyle-plugin/src/it/check-fail/src/main/java/org/MyClass.java Mon Aug 11 12:06:46 2008 @@ -0,0 +1,5 @@ +package org; + +public class MyClass +{ +} Propchange: maven/plugins/trunk/maven-checkstyle-plugin/src/it/check-fail/src/main/java/org/MyClass.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/plugins/trunk/maven-checkstyle-plugin/src/it/check-fail/src/main/java/org/MyClass.java ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Added: maven/plugins/trunk/maven-checkstyle-plugin/src/it/check-pass/invoker.properties URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-checkstyle-plugin/src/it/check-pass/invoker.properties?rev=684879&view=auto ============================================================================== --- maven/plugins/trunk/maven-checkstyle-plugin/src/it/check-pass/invoker.properties (added) +++ maven/plugins/trunk/maven-checkstyle-plugin/src/it/check-pass/invoker.properties Mon Aug 11 12:06:46 2008 @@ -0,0 +1 @@ +invoker.goals=verify Propchange: maven/plugins/trunk/maven-checkstyle-plugin/src/it/check-pass/invoker.properties ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/plugins/trunk/maven-checkstyle-plugin/src/it/check-pass/invoker.properties ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Added: maven/plugins/trunk/maven-checkstyle-plugin/src/it/check-pass/pom.xml URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-checkstyle-plugin/src/it/check-pass/pom.xml?rev=684879&view=auto ============================================================================== --- maven/plugins/trunk/maven-checkstyle-plugin/src/it/check-pass/pom.xml (added) +++ maven/plugins/trunk/maven-checkstyle-plugin/src/it/check-pass/pom.xml Mon Aug 11 12:06:46 2008 @@ -0,0 +1,54 @@ +<?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</groupId> + <artifactId>check-pass</artifactId> + <version>1.0-SNAPSHOT</version> + <packaging>jar</packaging> + + <url>http://maven.apache.org/</url> + + <properties> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + </properties> + + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-checkstyle-plugin</artifactId> + <version>@pom.version@</version> + <executions> + <execution> + <id>check</id> + <goals> + <goal>check</goal> + </goals> + </execution> + </executions> + </plugin> + </plugins> + </build> +</project> Propchange: maven/plugins/trunk/maven-checkstyle-plugin/src/it/check-pass/pom.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/plugins/trunk/maven-checkstyle-plugin/src/it/check-pass/pom.xml ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Added: maven/plugins/trunk/maven-checkstyle-plugin/src/it/check-pass/src/main/java/org/MyClass.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-checkstyle-plugin/src/it/check-pass/src/main/java/org/MyClass.java?rev=684879&view=auto ============================================================================== --- maven/plugins/trunk/maven-checkstyle-plugin/src/it/check-pass/src/main/java/org/MyClass.java (added) +++ maven/plugins/trunk/maven-checkstyle-plugin/src/it/check-pass/src/main/java/org/MyClass.java Mon Aug 11 12:06:46 2008 @@ -0,0 +1,7 @@ +package org; + +/** + * Yada yada yada. + */ +public class MyClass { +} Propchange: maven/plugins/trunk/maven-checkstyle-plugin/src/it/check-pass/src/main/java/org/MyClass.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/plugins/trunk/maven-checkstyle-plugin/src/it/check-pass/src/main/java/org/MyClass.java ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Added: maven/plugins/trunk/maven-checkstyle-plugin/src/it/check-pass/src/main/java/org/package.html URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-checkstyle-plugin/src/it/check-pass/src/main/java/org/package.html?rev=684879&view=auto ============================================================================== --- maven/plugins/trunk/maven-checkstyle-plugin/src/it/check-pass/src/main/java/org/package.html (added) +++ maven/plugins/trunk/maven-checkstyle-plugin/src/it/check-pass/src/main/java/org/package.html Mon Aug 11 12:06:46 2008 @@ -0,0 +1,7 @@ +<html> + <head> + <title></title> + </head> + <body> + </body> +</html> Propchange: maven/plugins/trunk/maven-checkstyle-plugin/src/it/check-pass/src/main/java/org/package.html ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/plugins/trunk/maven-checkstyle-plugin/src/it/check-pass/src/main/java/org/package.html ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Added: maven/plugins/trunk/maven-checkstyle-plugin/src/it/minimal-pom/pom.xml URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-checkstyle-plugin/src/it/minimal-pom/pom.xml?rev=684879&view=auto ============================================================================== --- maven/plugins/trunk/maven-checkstyle-plugin/src/it/minimal-pom/pom.xml (added) +++ maven/plugins/trunk/maven-checkstyle-plugin/src/it/minimal-pom/pom.xml Mon Aug 11 12:06:46 2008 @@ -0,0 +1,56 @@ +<?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</groupId> + <artifactId>minimal-pom</artifactId> + <version>1.0-SNAPSHOT</version> + <packaging>jar</packaging> + + <url>http://maven.apache.org/</url> + + <properties> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + </properties> + + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-site-plugin</artifactId> + <version>2.0-beta-7</version> + </plugin> + </plugins> + </build> + + <reporting> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-checkstyle-plugin</artifactId> + <version>@pom.version@</version> + </plugin> + </plugins> + </reporting> +</project> Propchange: maven/plugins/trunk/maven-checkstyle-plugin/src/it/minimal-pom/pom.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/plugins/trunk/maven-checkstyle-plugin/src/it/minimal-pom/pom.xml ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Added: maven/plugins/trunk/maven-checkstyle-plugin/src/it/minimal-pom/src/main/java/org/MyClass.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-checkstyle-plugin/src/it/minimal-pom/src/main/java/org/MyClass.java?rev=684879&view=auto ============================================================================== --- maven/plugins/trunk/maven-checkstyle-plugin/src/it/minimal-pom/src/main/java/org/MyClass.java (added) +++ maven/plugins/trunk/maven-checkstyle-plugin/src/it/minimal-pom/src/main/java/org/MyClass.java Mon Aug 11 12:06:46 2008 @@ -0,0 +1,5 @@ +package org; + +public class MyClass +{ +} Propchange: maven/plugins/trunk/maven-checkstyle-plugin/src/it/minimal-pom/src/main/java/org/MyClass.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/plugins/trunk/maven-checkstyle-plugin/src/it/minimal-pom/src/main/java/org/MyClass.java ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Added: maven/plugins/trunk/maven-checkstyle-plugin/src/it/minimal-pom/verify.bsh URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-checkstyle-plugin/src/it/minimal-pom/verify.bsh?rev=684879&view=auto ============================================================================== --- maven/plugins/trunk/maven-checkstyle-plugin/src/it/minimal-pom/verify.bsh (added) +++ maven/plugins/trunk/maven-checkstyle-plugin/src/it/minimal-pom/verify.bsh Mon Aug 11 12:06:46 2008 @@ -0,0 +1,33 @@ +import java.io.*; +import java.util.*; +import java.util.regex.*; + +try +{ + File siteDir = new File( basedir, "target/site" ); + System.out.println( "Checking for existence of site directory: " + siteDir ); + if ( !siteDir.isDirectory() ) + { + System.out.println( "FAILED" ); + return false; + } + + String[] reports = { "checkstyle" }; + for ( String report : reports ) + { + File reportFile = new File( siteDir, report + ".html" ); + System.out.println( "Checking for existence of report: " + reportFile ); + if ( !reportFile.isFile() ) + { + System.out.println( "FAILED" ); + return false; + } + } +} +catch( Throwable t ) +{ + t.printStackTrace(); + return false; +} + +return true; Propchange: maven/plugins/trunk/maven-checkstyle-plugin/src/it/minimal-pom/verify.bsh ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/plugins/trunk/maven-checkstyle-plugin/src/it/minimal-pom/verify.bsh ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Added: maven/plugins/trunk/maven-checkstyle-plugin/src/it/settings.xml URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-checkstyle-plugin/src/it/settings.xml?rev=684879&view=auto ============================================================================== --- maven/plugins/trunk/maven-checkstyle-plugin/src/it/settings.xml (added) +++ maven/plugins/trunk/maven-checkstyle-plugin/src/it/settings.xml Mon Aug 11 12:06:46 2008 @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="UTF-8"?> +<settings> + <profiles> + <profile> + <id>it-repo</id> + <activation> + <activeByDefault>true</activeByDefault> + </activation> + <repositories> + <repository> + <id>local.central</id> + <url>file://@localRepository@</url> + <releases> + <enabled>true</enabled> + </releases> + <snapshots> + <enabled>true</enabled> + </snapshots> + </repository> + </repositories> + <pluginRepositories> + <pluginRepository> + <id>local.central</id> + <url>file://@localRepository@</url> + <releases> + <enabled>true</enabled> + </releases> + <snapshots> + <enabled>true</enabled> + </snapshots> + </pluginRepository> + </pluginRepositories> + </profile> + </profiles> +</settings> Propchange: maven/plugins/trunk/maven-checkstyle-plugin/src/it/settings.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/plugins/trunk/maven-checkstyle-plugin/src/it/settings.xml ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision