You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by jo...@apache.org on 2006/11/06 16:59:31 UTC
svn commit: r471771 - in /maven/plugins/trunk/maven-checkstyle-plugin:
pom.xml
src/test/java/org/apache/maven/plugin/checkstyle/CheckstyleReportTest.java
src/test/java/org/apache/maven/plugin/checkstyle/LocatorTest.java
Author: joakime
Date: Mon Nov 6 07:59:30 2006
New Revision: 471771
URL: http://svn.apache.org/viewvc?view=rev&rev=471771
Log:
* Adding Apache Process LICENSE and HEADER files.
* Adding super-pom build/resources entry to allow tests to succeed.
Modified:
maven/plugins/trunk/maven-checkstyle-plugin/pom.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/LocatorTest.java
Modified: maven/plugins/trunk/maven-checkstyle-plugin/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-checkstyle-plugin/pom.xml?view=diff&rev=471771&r1=471770&r2=471771
==============================================================================
--- maven/plugins/trunk/maven-checkstyle-plugin/pom.xml (original)
+++ maven/plugins/trunk/maven-checkstyle-plugin/pom.xml Mon Nov 6 07:59:30 2006
@@ -1,4 +1,7 @@
-<?xml version="1.0" encoding="UTF-8"?><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">
+<?xml version="1.0" encoding="UTF-8"?>
+<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">
<parent>
<artifactId>maven-plugins</artifactId>
<groupId>org.apache.maven.plugins</groupId>
@@ -117,4 +120,29 @@
<scope>test</scope>
</dependency>
</dependencies>
+ <build>
+ <resources>
+ <!-- Include the apache process LICENSE and NOTICE
+ files.
+ -->
+ <resource>
+ <targetPath>META-INF</targetPath>
+ <filtering>false</filtering>
+ <directory>${basedir}</directory>
+ <includes>
+ <include>LICENSE</include>
+ <include>NOTICE</include>
+ </includes>
+ </resource>
+ <!-- Include super-pom defined main/resources
+ Removing this section will break the build.
+ Since we have defined a new build/resources
+ section for the Apache process LICENSE and NOTICE
+ files, this original default section is now
+ required. -->
+ <resource>
+ <directory>${basedir}/src/main/resources</directory>
+ </resource>
+ </resources>
+ </build>
</project>
Modified: maven/plugins/trunk/maven-checkstyle-plugin/src/test/java/org/apache/maven/plugin/checkstyle/CheckstyleReportTest.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-checkstyle-plugin/src/test/java/org/apache/maven/plugin/checkstyle/CheckstyleReportTest.java?view=diff&rev=471771&r1=471770&r2=471771
==============================================================================
--- 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 Mon Nov 6 07:59:30 2006
@@ -23,7 +23,10 @@
import org.codehaus.plexus.util.FileUtils;
import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
import java.util.Locale;
+import java.util.PropertyResourceBundle;
import java.util.ResourceBundle;
/**
@@ -32,10 +35,6 @@
public class CheckstyleReportTest
extends AbstractMojoTestCase
{
- private Locale oldDefaultLocale;
-
- private ResourceBundle bundle;
-
/**
* @see junit.framework.TestCase#setUp()
*/
@@ -43,12 +42,6 @@
throws Exception
{
super.setUp();
-
- // Specify English as default Locale for messages in tests
- oldDefaultLocale = Locale.getDefault();
- Locale.setDefault( Locale.ENGLISH );
- bundle = ResourceBundle.getBundle( "checkstyle-report", Locale.ENGLISH, getClass().getClassLoader() );
-
}
/**
@@ -58,9 +51,6 @@
throws Exception
{
super.tearDown();
-
- // Restore current locale
- Locale.setDefault( oldDefaultLocale );
}
public void testNoSource()
@@ -157,6 +147,7 @@
throws Exception
{
File pluginXmlFile = new File( getBasedir(), "src/test/plugin-configs/" + pluginXml );
+ ResourceBundle bundle = ResourceBundle.getBundle( "checkstyle-report", Locale.getDefault(), this.getClassLoader() );
Mojo mojo = lookupMojo( "checkstyle", pluginXmlFile );
Modified: maven/plugins/trunk/maven-checkstyle-plugin/src/test/java/org/apache/maven/plugin/checkstyle/LocatorTest.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-checkstyle-plugin/src/test/java/org/apache/maven/plugin/checkstyle/LocatorTest.java?view=diff&rev=471771&r1=471770&r2=471771
==============================================================================
--- maven/plugins/trunk/maven-checkstyle-plugin/src/test/java/org/apache/maven/plugin/checkstyle/LocatorTest.java (original)
+++ maven/plugins/trunk/maven-checkstyle-plugin/src/test/java/org/apache/maven/plugin/checkstyle/LocatorTest.java Mon Nov 6 07:59:30 2006
@@ -75,6 +75,10 @@
assertNotNull( "Test resolved file", resolvedFile );
assertTrue( "Test resolved file exists", resolvedFile.exists() );
+
+ File resolvedConfig = locator.resolveLocation( "config/sun_checks.xml", "sun_checks.xml" );
+ assertNotNull( "Test resolved file", resolvedConfig );
+ assertTrue( "Test resolved file exists", resolvedConfig.exists() );
}
public void testException()