You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ep...@apache.org on 2006/04/20 08:53:27 UTC
svn commit: r395514 - in /maven/plugins/trunk/maven-checkstyle-plugin/src:
main/java/org/apache/maven/plugin/checkstyle/ main/resources/config/
test/java/org/apache/maven/plugin/checkstyle/
test/java/org/apache/maven/plugin/checkstyle/stubs/ test/plugi...
Author: epunzalan
Date: Wed Apr 19 23:53:25 2006
New Revision: 395514
URL: http://svn.apache.org/viewcvs?rev=395514&view=rev
Log:
PR: MCHECKSTYLE-39
Added test-harness tests for checkstyle goal.
Also, removed the comment in maven_checks.xml since it prevents a user to use the cacheFile parameter in combination with the "maven" checkstyle format.
Added:
maven/plugins/trunk/maven-checkstyle-plugin/src/test/java/org/apache/maven/plugin/checkstyle/stubs/MavenProjectWithExceptionsStub.java
maven/plugins/trunk/maven-checkstyle-plugin/src/test/java/org/apache/maven/plugin/checkstyle/stubs/MavenProjectWithNoJxrPluginStub.java
maven/plugins/trunk/maven-checkstyle-plugin/src/test/plugin-configs/custom-plugin-config.xml
maven/plugins/trunk/maven-checkstyle-plugin/src/test/plugin-configs/dep-resolution-exception-plugin-config.xml
maven/plugins/trunk/maven-checkstyle-plugin/src/test/plugin-configs/fail-on-error-plugin-config.xml
maven/plugins/trunk/maven-checkstyle-plugin/src/test/plugin-configs/no-source-plugin-config.xml
maven/plugins/trunk/maven-checkstyle-plugin/src/test/plugin-configs/useFile-plugin-config.xml
maven/plugins/trunk/maven-checkstyle-plugin/src/test/test-sources/LICENSE.txt
Modified:
maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/CheckstyleReport.java
maven/plugins/trunk/maven-checkstyle-plugin/src/main/resources/config/maven_checks.xml
maven/plugins/trunk/maven-checkstyle-plugin/src/test/java/org/apache/maven/plugin/checkstyle/CheckstyleReportTest.java
maven/plugins/trunk/maven-checkstyle-plugin/src/test/java/org/apache/maven/plugin/checkstyle/stubs/MinMavenProjectStub.java
maven/plugins/trunk/maven-checkstyle-plugin/src/test/plugin-configs/min-plugin-config.xml
Modified: maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/CheckstyleReport.java
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/CheckstyleReport.java?rev=395514&r1=395513&r2=395514&view=diff
==============================================================================
--- maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/CheckstyleReport.java (original)
+++ maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/CheckstyleReport.java Wed Apr 19 23:53:25 2006
@@ -809,7 +809,7 @@
parentFile.mkdirs();
}
- FileOutputStream fileOutputStream = null;
+ FileOutputStream fileOutputStream;
try
{
fileOutputStream = new FileOutputStream( file );
@@ -822,7 +822,7 @@
}
private File[] getFilesToProcess( String includes, String excludes )
- throws MavenReportException, IOException
+ throws IOException
{
StringBuffer excludesStr = new StringBuffer();
Modified: maven/plugins/trunk/maven-checkstyle-plugin/src/main/resources/config/maven_checks.xml
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-checkstyle-plugin/src/main/resources/config/maven_checks.xml?rev=395514&r1=395513&r2=395514&view=diff
==============================================================================
--- maven/plugins/trunk/maven-checkstyle-plugin/src/main/resources/config/maven_checks.xml (original)
+++ maven/plugins/trunk/maven-checkstyle-plugin/src/main/resources/config/maven_checks.xml Wed Apr 19 23:53:25 2006
@@ -41,7 +41,7 @@
<module name="TreeWalker">
- <!-- property name="cacheFile" value="${checkstyle.cache.file}"/ -->
+ <property name="cacheFile" value="${checkstyle.cache.file}"/>
<property name="tabWidth" value="4"/>
Modified: maven/plugins/trunk/maven-checkstyle-plugin/src/test/java/org/apache/maven/plugin/checkstyle/CheckstyleReportTest.java
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-checkstyle-plugin/src/test/java/org/apache/maven/plugin/checkstyle/CheckstyleReportTest.java?rev=395514&r1=395513&r2=395514&view=diff
==============================================================================
--- maven/plugins/trunk/maven-checkstyle-plugin/src/test/java/org/apache/maven/plugin/checkstyle/CheckstyleReportTest.java (original)
+++ maven/plugins/trunk/maven-checkstyle-plugin/src/test/java/org/apache/maven/plugin/checkstyle/CheckstyleReportTest.java Wed Apr 19 23:53:25 2006
@@ -16,9 +16,10 @@
* limitations under the License.
*/
-import org.apache.maven.plugin.testing.AbstractMojoTestCase;
import org.apache.maven.plugin.Mojo;
+import org.apache.maven.plugin.testing.AbstractMojoTestCase;
import org.apache.maven.reporting.MavenReport;
+import org.apache.maven.artifact.DependencyResolutionRequiredException;
import java.io.File;
@@ -28,12 +29,71 @@
public class CheckstyleReportTest
extends AbstractMojoTestCase
{
+ public void testNoSource()
+ throws Exception
+ {
+ File pluginXmlFile = new File( getBasedir(), "src/test/plugin-configs/no-source-plugin-config.xml" );
+
+ Mojo mojo = lookupMojo( "checkstyle", pluginXmlFile );
+
+ assertNotNull( "Mojo found.", mojo );
+
+ mojo.execute();
+
+ File outputFile = (File) getVariableValueFromObject( mojo, "outputFile" );
+ assertNotNull( "Test output file", outputFile );
+ assertFalse( "Test output file exists", outputFile.exists() );
+ }
+
public void testMinConfiguration()
throws Exception
{
File htmlFile = generateReport( "min-plugin-config.xml" );
}
+ public void testCustomConfiguration()
+ throws Exception
+ {
+ File htmlFile = generateReport( "custom-plugin-config.xml" );
+ }
+
+ public void testUseFile()
+ throws Exception
+ {
+ File htmlFile = generateReport( "useFile-plugin-config.xml" );
+ }
+
+ public void testFailOnError()
+ {
+ try
+ {
+ File htmlFile = generateReport( "fail-on-error-plugin-config.xml" );
+
+ fail( "Must throw exception on errors" );
+ }
+ catch ( Exception e )
+ {
+ //expected
+ }
+ }
+
+ public void testDependencyResolutionException()
+ {
+ try
+ {
+ File htmlFile = generateReport( "dep-resolution-exception-plugin-config.xml" );
+
+ fail( "Must throw exception on errors" );
+ }
+ catch ( Exception e )
+ {
+ if ( !( e.getCause().getCause() instanceof DependencyResolutionRequiredException ) )
+ {
+ fail( "Must throw exception on errors" );
+ }
+ }
+ }
+
private File generateReport( String pluginXml )
throws Exception
{
@@ -50,8 +110,10 @@
assertTrue( "Test output file exists", outputFile.exists() );
String cacheFile = (String) getVariableValueFromObject( mojo, "cacheFile" );
- assertNotNull( "Test cache file", cacheFile );
- assertTrue( "Test cache file exists", new File( cacheFile ).exists() );
+ if ( cacheFile != null )
+ {
+ assertTrue( "Test cache file exists", new File( cacheFile ).exists() );
+ }
MavenReport reportMojo = (MavenReport) mojo;
File outputDir = reportMojo.getReportOutputDirectory();
@@ -61,6 +123,12 @@
{
File rssFile = new File( outputDir, "checkstyle.rss" );
assertTrue( "Test rss file exists", rssFile.exists() );
+ }
+
+ File useFile = (File) getVariableValueFromObject( mojo, "useFile" );
+ if ( useFile != null )
+ {
+ assertTrue( "Test useFile exists", useFile.exists() );
}
String filename = reportMojo.getOutputName() + ".html";
Added: maven/plugins/trunk/maven-checkstyle-plugin/src/test/java/org/apache/maven/plugin/checkstyle/stubs/MavenProjectWithExceptionsStub.java
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-checkstyle-plugin/src/test/java/org/apache/maven/plugin/checkstyle/stubs/MavenProjectWithExceptionsStub.java?rev=395514&view=auto
==============================================================================
--- maven/plugins/trunk/maven-checkstyle-plugin/src/test/java/org/apache/maven/plugin/checkstyle/stubs/MavenProjectWithExceptionsStub.java (added)
+++ maven/plugins/trunk/maven-checkstyle-plugin/src/test/java/org/apache/maven/plugin/checkstyle/stubs/MavenProjectWithExceptionsStub.java Wed Apr 19 23:53:25 2006
@@ -0,0 +1,35 @@
+package org.apache.maven.plugin.checkstyle.stubs;
+
+import org.apache.maven.artifact.DependencyResolutionRequiredException;
+import org.apache.maven.plugin.testing.stubs.ArtifactStub;
+
+import java.util.List;
+
+/*
+ * Copyright 2001-2006 The Apache Software Foundation.
+ *
+ * Licensed 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.
+ */
+
+/**
+ * @author Edwin Punzalan
+ */
+public class MavenProjectWithExceptionsStub
+ extends MinMavenProjectStub
+{
+ public List getCompileClasspathElements()
+ throws DependencyResolutionRequiredException
+ {
+ throw new DependencyResolutionRequiredException( new ArtifactStub() );
+ }
+}
Added: maven/plugins/trunk/maven-checkstyle-plugin/src/test/java/org/apache/maven/plugin/checkstyle/stubs/MavenProjectWithNoJxrPluginStub.java
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-checkstyle-plugin/src/test/java/org/apache/maven/plugin/checkstyle/stubs/MavenProjectWithNoJxrPluginStub.java?rev=395514&view=auto
==============================================================================
--- maven/plugins/trunk/maven-checkstyle-plugin/src/test/java/org/apache/maven/plugin/checkstyle/stubs/MavenProjectWithNoJxrPluginStub.java (added)
+++ maven/plugins/trunk/maven-checkstyle-plugin/src/test/java/org/apache/maven/plugin/checkstyle/stubs/MavenProjectWithNoJxrPluginStub.java Wed Apr 19 23:53:25 2006
@@ -0,0 +1,37 @@
+package org.apache.maven.plugin.checkstyle.stubs;
+
+/*
+ * Copyright 2001-2006 The Apache Software Foundation.
+ *
+ * Licensed 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.
+ */
+
+import java.util.List;
+import java.util.Collections;
+
+/**
+ * @author Edwin Punzalan
+ */
+public class MavenProjectWithNoJxrPluginStub
+ extends MinMavenProjectStub
+{
+ public String getInceptionYear()
+ {
+ return "2005";
+ }
+
+ public List getReportPlugins()
+ {
+ return Collections.EMPTY_LIST;
+ }
+}
Modified: maven/plugins/trunk/maven-checkstyle-plugin/src/test/java/org/apache/maven/plugin/checkstyle/stubs/MinMavenProjectStub.java
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-checkstyle-plugin/src/test/java/org/apache/maven/plugin/checkstyle/stubs/MinMavenProjectStub.java?rev=395514&r1=395513&r2=395514&view=diff
==============================================================================
--- maven/plugins/trunk/maven-checkstyle-plugin/src/test/java/org/apache/maven/plugin/checkstyle/stubs/MinMavenProjectStub.java (original)
+++ maven/plugins/trunk/maven-checkstyle-plugin/src/test/java/org/apache/maven/plugin/checkstyle/stubs/MinMavenProjectStub.java Wed Apr 19 23:53:25 2006
@@ -18,6 +18,7 @@
import org.apache.maven.model.Build;
import org.apache.maven.model.Organization;
+import org.apache.maven.model.ReportPlugin;
import org.apache.maven.artifact.DependencyResolutionRequiredException;
import org.codehaus.plexus.PlexusTestCase;
@@ -34,7 +35,7 @@
public List getCompileClasspathElements()
throws DependencyResolutionRequiredException
{
- return Collections.EMPTY_LIST;
+ return Collections.singletonList( PlexusTestCase.getBasedir() + "/target/classes" );
}
public File getBasedir()
@@ -44,7 +45,11 @@
public List getReportPlugins()
{
- return Collections.EMPTY_LIST;
+ ReportPlugin jxrPlugin = new ReportPlugin();
+
+ jxrPlugin.setArtifactId( "maven-jxr-plugin" );
+
+ return Collections.singletonList( jxrPlugin );
}
public Organization getOrganization()
Added: maven/plugins/trunk/maven-checkstyle-plugin/src/test/plugin-configs/custom-plugin-config.xml
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-checkstyle-plugin/src/test/plugin-configs/custom-plugin-config.xml?rev=395514&view=auto
==============================================================================
--- maven/plugins/trunk/maven-checkstyle-plugin/src/test/plugin-configs/custom-plugin-config.xml (added)
+++ maven/plugins/trunk/maven-checkstyle-plugin/src/test/plugin-configs/custom-plugin-config.xml Wed Apr 19 23:53:25 2006
@@ -0,0 +1,47 @@
+<!--
+ ~ Copyright 2001-2006 The Apache Software Foundation.
+ ~
+ ~ Licensed 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>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ <configuration>
+ <outputDirectory>${basedir}/target/test-harness/checkstyle/custom</outputDirectory>
+ <enableRulesSummary>true</enableRulesSummary>
+ <enableSeveritySummary>true</enableSeveritySummary>
+ <enableFilesSummary>true</enableFilesSummary>
+ <enableRSS>true</enableRSS>
+ <includes>**/*.java</includes>
+ <configLocation>config/sun_checks.xml</configLocation>
+ <format>maven</format>
+ <headerLocation>LICENSE.txt</headerLocation>
+ <headerFile>${basedir}/src/test/test-sources/LICENSE.txt</headerFile>
+ <cacheFile>${basedir}/target/test-harness/checkstyle/custom/checkstyle-cachefile</cacheFile>
+ <outputFile>${basedir}/target/test-harness/checkstyle/custom/checkstyle-result.xml</outputFile>
+ <outputFileFormat>plain</outputFileFormat>
+ <failsOnError>false</failsOnError>
+ <sourceDirectory>${basedir}/src/test/test-sources</sourceDirectory>
+ <project implementation="org.apache.maven.plugin.checkstyle.stubs.MavenProjectWithNoJxrPluginStub"/>
+ <consoleOutput>true</consoleOutput>
+ <linkXRef>true</linkXRef>
+ <!-- value not really important, just point to an existing dir -->
+ <xrefLocation>${basedir}/target/test-harness/checkstyle/custom</xrefLocation>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Added: maven/plugins/trunk/maven-checkstyle-plugin/src/test/plugin-configs/dep-resolution-exception-plugin-config.xml
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-checkstyle-plugin/src/test/plugin-configs/dep-resolution-exception-plugin-config.xml?rev=395514&view=auto
==============================================================================
--- maven/plugins/trunk/maven-checkstyle-plugin/src/test/plugin-configs/dep-resolution-exception-plugin-config.xml (added)
+++ maven/plugins/trunk/maven-checkstyle-plugin/src/test/plugin-configs/dep-resolution-exception-plugin-config.xml Wed Apr 19 23:53:25 2006
@@ -0,0 +1,45 @@
+<!--
+ ~ Copyright 2001-2006 The Apache Software Foundation.
+ ~
+ ~ Licensed 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>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ <configuration>
+ <outputDirectory>${basedir}/target/test-harness/checkstyle/dep-resolution</outputDirectory>
+ <enableRulesSummary>true</enableRulesSummary>
+ <enableSeveritySummary>true</enableSeveritySummary>
+ <enableFilesSummary>true</enableFilesSummary>
+ <enableRSS>true</enableRSS>
+ <includes>**/*.java</includes>
+ <configLocation>config/sun_checks.xml</configLocation>
+ <format>sun</format>
+ <headerLocation>${basedir}/src/test/test-sources/LICENSE.txt</headerLocation>
+ <cacheFile>${basedir}/target/test-harness/checkstyle/dep-resolution/checkstyle-cachefile</cacheFile>
+ <outputFile>${basedir}/target/test-harness/checkstyle/dep-resolution/checkstyle-result.xml</outputFile>
+ <outputFileFormat>xml</outputFileFormat>
+ <failsOnError>false</failsOnError>
+ <sourceDirectory>${basedir}/src/test/test-sources</sourceDirectory>
+ <project implementation="org.apache.maven.plugin.checkstyle.stubs.MavenProjectWithExceptionsStub"/>
+ <consoleOutput>false</consoleOutput>
+ <linkXRef>true</linkXRef>
+ <xrefLocation>${basedir}/target/site/xref</xrefLocation>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Added: maven/plugins/trunk/maven-checkstyle-plugin/src/test/plugin-configs/fail-on-error-plugin-config.xml
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-checkstyle-plugin/src/test/plugin-configs/fail-on-error-plugin-config.xml?rev=395514&view=auto
==============================================================================
--- maven/plugins/trunk/maven-checkstyle-plugin/src/test/plugin-configs/fail-on-error-plugin-config.xml (added)
+++ maven/plugins/trunk/maven-checkstyle-plugin/src/test/plugin-configs/fail-on-error-plugin-config.xml Wed Apr 19 23:53:25 2006
@@ -0,0 +1,45 @@
+<!--
+ ~ Copyright 2001-2006 The Apache Software Foundation.
+ ~
+ ~ Licensed 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>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ <configuration>
+ <outputDirectory>${basedir}/target/test-harness/checkstyle/fail-on-error</outputDirectory>
+ <enableRulesSummary>true</enableRulesSummary>
+ <enableSeveritySummary>true</enableSeveritySummary>
+ <enableFilesSummary>true</enableFilesSummary>
+ <enableRSS>true</enableRSS>
+ <includes>**/*.java</includes>
+ <configLocation>config/sun_checks.xml</configLocation>
+ <format>sun</format>
+ <headerLocation>${basedir}/src/test/test-sources/LICENSE.txt</headerLocation>
+ <cacheFile>${basedir}/target/test-harness/checkstyle/fail-on-error/checkstyle-cachefile</cacheFile>
+ <outputFile>${basedir}/target/test-harness/checkstyle/fail-on-error/checkstyle-result.xml</outputFile>
+ <outputFileFormat>xml</outputFileFormat>
+ <failsOnError>true</failsOnError>
+ <sourceDirectory>${basedir}/src/test/test-sources</sourceDirectory>
+ <project implementation="org.apache.maven.plugin.checkstyle.stubs.MinMavenProjectStub"/>
+ <consoleOutput>false</consoleOutput>
+ <linkXRef>true</linkXRef>
+ <xrefLocation>${basedir}/target/site/xref</xrefLocation>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Modified: maven/plugins/trunk/maven-checkstyle-plugin/src/test/plugin-configs/min-plugin-config.xml
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-checkstyle-plugin/src/test/plugin-configs/min-plugin-config.xml?rev=395514&r1=395513&r2=395514&view=diff
==============================================================================
--- maven/plugins/trunk/maven-checkstyle-plugin/src/test/plugin-configs/min-plugin-config.xml (original)
+++ maven/plugins/trunk/maven-checkstyle-plugin/src/test/plugin-configs/min-plugin-config.xml Wed Apr 19 23:53:25 2006
@@ -13,6 +13,7 @@
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
+
<project>
<build>
<plugins>
@@ -27,7 +28,7 @@
<includes>**/*.java</includes>
<configLocation>config/sun_checks.xml</configLocation>
<format>sun</format>
- <!--headerLocation>${basedir}/LICENSE.txt</headerLocation-->
+ <headerLocation>${basedir}/src/test/test-sources/LICENSE.txt</headerLocation>
<cacheFile>${basedir}/target/test-harness/checkstyle/min/checkstyle-cachefile</cacheFile>
<outputFile>${basedir}/target/test-harness/checkstyle/min/checkstyle-result.xml</outputFile>
<outputFileFormat>xml</outputFileFormat>
Added: maven/plugins/trunk/maven-checkstyle-plugin/src/test/plugin-configs/no-source-plugin-config.xml
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-checkstyle-plugin/src/test/plugin-configs/no-source-plugin-config.xml?rev=395514&view=auto
==============================================================================
--- maven/plugins/trunk/maven-checkstyle-plugin/src/test/plugin-configs/no-source-plugin-config.xml (added)
+++ maven/plugins/trunk/maven-checkstyle-plugin/src/test/plugin-configs/no-source-plugin-config.xml Wed Apr 19 23:53:25 2006
@@ -0,0 +1,45 @@
+<!--
+ ~ Copyright 2001-2006 The Apache Software Foundation.
+ ~
+ ~ Licensed 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>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ <configuration>
+ <outputDirectory>${basedir}/target/test-harness/checkstyle/no-source</outputDirectory>
+ <enableRulesSummary>true</enableRulesSummary>
+ <enableSeveritySummary>true</enableSeveritySummary>
+ <enableFilesSummary>true</enableFilesSummary>
+ <enableRSS>true</enableRSS>
+ <includes>**/*.java</includes>
+ <configLocation>config/sun_checks.xml</configLocation>
+ <format>sun</format>
+ <headerLocation>${basedir}/src/test/test-sources/LICENSE.txt</headerLocation>
+ <cacheFile>${basedir}/target/test-harness/checkstyle/no-source/checkstyle-cachefile</cacheFile>
+ <outputFile>${basedir}/target/test-harness/checkstyle/no-source/checkstyle-result.xml</outputFile>
+ <outputFileFormat>xml</outputFileFormat>
+ <failsOnError>false</failsOnError>
+ <sourceDirectory>${basedir}/src/test/no-sources</sourceDirectory>
+ <project implementation="org.apache.maven.plugin.checkstyle.stubs.MinMavenProjectStub"/>
+ <consoleOutput>false</consoleOutput>
+ <linkXRef>true</linkXRef>
+ <xrefLocation>${basedir}/target/site/xref</xrefLocation>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Added: maven/plugins/trunk/maven-checkstyle-plugin/src/test/plugin-configs/useFile-plugin-config.xml
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-checkstyle-plugin/src/test/plugin-configs/useFile-plugin-config.xml?rev=395514&view=auto
==============================================================================
--- maven/plugins/trunk/maven-checkstyle-plugin/src/test/plugin-configs/useFile-plugin-config.xml (added)
+++ maven/plugins/trunk/maven-checkstyle-plugin/src/test/plugin-configs/useFile-plugin-config.xml Wed Apr 19 23:53:25 2006
@@ -0,0 +1,46 @@
+<!--
+ ~ Copyright 2001-2006 The Apache Software Foundation.
+ ~
+ ~ Licensed 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>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ <configuration>
+ <outputDirectory>${basedir}/target/test-harness/checkstyle/useFile</outputDirectory>
+ <enableRulesSummary>true</enableRulesSummary>
+ <enableSeveritySummary>true</enableSeveritySummary>
+ <enableFilesSummary>true</enableFilesSummary>
+ <enableRSS>true</enableRSS>
+ <includes>**/*.java</includes>
+ <configLocation>config/sun_checks.xml</configLocation>
+ <format>sun</format>
+ <headerLocation>${basedir}/src/test/test-sources/LICENSE.txt</headerLocation>
+ <cacheFile>${basedir}/target/test-harness/checkstyle/useFile/checkstyle-cachefile</cacheFile>
+ <outputFile>${basedir}/target/test-harness/checkstyle/useFile/checkstyle-result.xml</outputFile>
+ <outputFileFormat>xml</outputFileFormat>
+ <failsOnError>false</failsOnError>
+ <sourceDirectory>${basedir}/src/test/test-sources</sourceDirectory>
+ <project implementation="org.apache.maven.plugin.checkstyle.stubs.MinMavenProjectStub"/>
+ <consoleOutput>true</consoleOutput>
+ <linkXRef>true</linkXRef>
+ <xrefLocation>${basedir}/target/site/xref</xrefLocation>
+ <useFile>${basedir}target/test-harness/checkstyle/useFile/checkstyle-output.txt</useFile>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Added: maven/plugins/trunk/maven-checkstyle-plugin/src/test/test-sources/LICENSE.txt
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-checkstyle-plugin/src/test/test-sources/LICENSE.txt?rev=395514&view=auto
==============================================================================
--- maven/plugins/trunk/maven-checkstyle-plugin/src/test/test-sources/LICENSE.txt (added)
+++ maven/plugins/trunk/maven-checkstyle-plugin/src/test/test-sources/LICENSE.txt Wed Apr 19 23:53:25 2006
@@ -0,0 +1,15 @@
+/*
+ * Copyright 2004-2005 The Apache Software Foundation.
+ *
+ * Licensed 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.
+ */