You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by be...@apache.org on 2010/08/29 21:16:22 UTC

svn commit: r990633 - in /maven/plugins/trunk/maven-compiler-plugin: ./ src/it/non-english-warnings/ src/it/non-english-warnings/src/ src/it/non-english-warnings/src/main/ src/it/non-english-warnings/src/main/java/ src/it/non-english-warnings/src/test/...

Author: bentmann
Date: Sun Aug 29 19:16:21 2010
New Revision: 990633

URL: http://svn.apache.org/viewvc?rev=990633&view=rev
Log:
[MCOMPILER-109] JavacCompiler treat localized warning messages as errors

Added:
    maven/plugins/trunk/maven-compiler-plugin/src/it/non-english-warnings/
    maven/plugins/trunk/maven-compiler-plugin/src/it/non-english-warnings/invoker.properties   (with props)
    maven/plugins/trunk/maven-compiler-plugin/src/it/non-english-warnings/pom.xml   (with props)
    maven/plugins/trunk/maven-compiler-plugin/src/it/non-english-warnings/src/
    maven/plugins/trunk/maven-compiler-plugin/src/it/non-english-warnings/src/main/
    maven/plugins/trunk/maven-compiler-plugin/src/it/non-english-warnings/src/main/java/
    maven/plugins/trunk/maven-compiler-plugin/src/it/non-english-warnings/src/main/java/MyClass.java   (with props)
    maven/plugins/trunk/maven-compiler-plugin/src/it/non-english-warnings/src/test/
    maven/plugins/trunk/maven-compiler-plugin/src/it/non-english-warnings/src/test/java/
    maven/plugins/trunk/maven-compiler-plugin/src/it/non-english-warnings/src/test/java/MyTest.java   (with props)
    maven/plugins/trunk/maven-compiler-plugin/src/it/non-english-warnings/verify.bsh   (with props)
Modified:
    maven/plugins/trunk/maven-compiler-plugin/pom.xml

Modified: maven/plugins/trunk/maven-compiler-plugin/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-compiler-plugin/pom.xml?rev=990633&r1=990632&r2=990633&view=diff
==============================================================================
--- maven/plugins/trunk/maven-compiler-plugin/pom.xml (original)
+++ maven/plugins/trunk/maven-compiler-plugin/pom.xml Sun Aug 29 19:16:21 2010
@@ -99,7 +99,7 @@ under the License.
     <dependency>
       <groupId>org.codehaus.plexus</groupId>
       <artifactId>plexus-compiler-manager</artifactId>
-      <version>1.8</version>
+      <version>1.8.1</version>
       <exclusions>
         <exclusion>
           <groupId>org.codehaus.plexus</groupId>
@@ -110,7 +110,7 @@ under the License.
     <dependency>
       <groupId>org.codehaus.plexus</groupId>
       <artifactId>plexus-compiler-javac</artifactId>
-      <version>1.8</version>
+      <version>1.8.1</version>
       <scope>runtime</scope>
       <exclusions>
         <exclusion>

Added: maven/plugins/trunk/maven-compiler-plugin/src/it/non-english-warnings/invoker.properties
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-compiler-plugin/src/it/non-english-warnings/invoker.properties?rev=990633&view=auto
==============================================================================
--- maven/plugins/trunk/maven-compiler-plugin/src/it/non-english-warnings/invoker.properties (added)
+++ maven/plugins/trunk/maven-compiler-plugin/src/it/non-english-warnings/invoker.properties Sun Aug 29 19:16:21 2010
@@ -0,0 +1,2 @@
+# NOTE: javac has been localized for Japanese, i.e. javac won't output English messages in this locale...
+invoker.mavenOpts = -Duser.language=ja

Propchange: maven/plugins/trunk/maven-compiler-plugin/src/it/non-english-warnings/invoker.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-compiler-plugin/src/it/non-english-warnings/invoker.properties
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-compiler-plugin/src/it/non-english-warnings/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-compiler-plugin/src/it/non-english-warnings/pom.xml?rev=990633&view=auto
==============================================================================
--- maven/plugins/trunk/maven-compiler-plugin/src/it/non-english-warnings/pom.xml (added)
+++ maven/plugins/trunk/maven-compiler-plugin/src/it/non-english-warnings/pom.xml Sun Aug 29 19:16:21 2010
@@ -0,0 +1,58 @@
+<?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.its.compiler</groupId>
+  <artifactId>non-english-warnings</artifactId>
+  <version>1.0-SNAPSHOT</version>
+
+  <name>MCOMPILER-109</name>
+  <description>
+    Test that warnings in locales other than English are not erroneously classified as errors and fail the build.
+    The particular locales of interest here are Japanese (ja) and Simplified Chinese (zh_CN) for which javac actually
+    is localized.
+  </description>
+
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+  </properties>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <version>@pom.version@</version>
+        <configuration>
+          <fork>false</fork>
+          <source>1.4</source>
+          <target>1.4</target>
+          <showWarnings>true</showWarnings>
+          <showDeprecation>true</showDeprecation>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
+</project>

Propchange: maven/plugins/trunk/maven-compiler-plugin/src/it/non-english-warnings/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-compiler-plugin/src/it/non-english-warnings/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-compiler-plugin/src/it/non-english-warnings/src/main/java/MyClass.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-compiler-plugin/src/it/non-english-warnings/src/main/java/MyClass.java?rev=990633&view=auto
==============================================================================
--- maven/plugins/trunk/maven-compiler-plugin/src/it/non-english-warnings/src/main/java/MyClass.java (added)
+++ maven/plugins/trunk/maven-compiler-plugin/src/it/non-english-warnings/src/main/java/MyClass.java Sun Aug 29 19:16:21 2010
@@ -0,0 +1,10 @@
+public class MyClass
+{
+
+    public static void main( String[] args )
+    {
+        // the date constructor is deprecated and will cause a warning
+        System.out.println( new java.util.Date( 2010, 8, 29 ) );
+    }
+
+}

Propchange: maven/plugins/trunk/maven-compiler-plugin/src/it/non-english-warnings/src/main/java/MyClass.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-compiler-plugin/src/it/non-english-warnings/src/main/java/MyClass.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-compiler-plugin/src/it/non-english-warnings/src/test/java/MyTest.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-compiler-plugin/src/it/non-english-warnings/src/test/java/MyTest.java?rev=990633&view=auto
==============================================================================
--- maven/plugins/trunk/maven-compiler-plugin/src/it/non-english-warnings/src/test/java/MyTest.java (added)
+++ maven/plugins/trunk/maven-compiler-plugin/src/it/non-english-warnings/src/test/java/MyTest.java Sun Aug 29 19:16:21 2010
@@ -0,0 +1,10 @@
+public class MyTest
+{
+
+    public static void main( String[] args )
+    {
+        // the date constructor is deprecated and will cause a warning
+        System.out.println( new java.util.Date( 2010, 8, 29 ) );
+    }
+
+}

Propchange: maven/plugins/trunk/maven-compiler-plugin/src/it/non-english-warnings/src/test/java/MyTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-compiler-plugin/src/it/non-english-warnings/src/test/java/MyTest.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-compiler-plugin/src/it/non-english-warnings/verify.bsh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-compiler-plugin/src/it/non-english-warnings/verify.bsh?rev=990633&view=auto
==============================================================================
--- maven/plugins/trunk/maven-compiler-plugin/src/it/non-english-warnings/verify.bsh (added)
+++ maven/plugins/trunk/maven-compiler-plugin/src/it/non-english-warnings/verify.bsh Sun Aug 29 19:16:21 2010
@@ -0,0 +1,15 @@
+import java.io.*;
+import java.util.*;
+import java.util.regex.*;
+
+File mainClass = new File( basedir, "target/classes/MyClass.class" );
+if ( !mainClass.isFile() )
+{
+    throw new FileNotFoundException( "Main class not existent: " + mainClass );
+}
+
+File testClass = new File( basedir, "target/test-classes/MyTest.class" );
+if ( !testClass.isFile() )
+{
+    throw new FileNotFoundException( "Test class not existent: " + testClass );
+}

Propchange: maven/plugins/trunk/maven-compiler-plugin/src/it/non-english-warnings/verify.bsh
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-compiler-plugin/src/it/non-english-warnings/verify.bsh
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision