You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@archiva.apache.org by ol...@apache.org on 2012/12/07 23:35:02 UTC

svn commit: r1418527 - in /archiva/redback/redback-components/trunk/spring-registry/modello-plugin-redback-registry: pom.xml src/test/java/org/apache/archiva/redback/components/registry/modello/AbstractRegistryGeneratorTestCase.java

Author: olamy
Date: Fri Dec  7 22:35:01 2012
New Revision: 1418527

URL: http://svn.apache.org/viewvc?rev=1418527&view=rev
Log:
use last plexus compiler version

Modified:
    archiva/redback/redback-components/trunk/spring-registry/modello-plugin-redback-registry/pom.xml
    archiva/redback/redback-components/trunk/spring-registry/modello-plugin-redback-registry/src/test/java/org/apache/archiva/redback/components/registry/modello/AbstractRegistryGeneratorTestCase.java

Modified: archiva/redback/redback-components/trunk/spring-registry/modello-plugin-redback-registry/pom.xml
URL: http://svn.apache.org/viewvc/archiva/redback/redback-components/trunk/spring-registry/modello-plugin-redback-registry/pom.xml?rev=1418527&r1=1418526&r2=1418527&view=diff
==============================================================================
--- archiva/redback/redback-components/trunk/spring-registry/modello-plugin-redback-registry/pom.xml (original)
+++ archiva/redback/redback-components/trunk/spring-registry/modello-plugin-redback-registry/pom.xml Fri Dec  7 22:35:01 2012
@@ -79,7 +79,13 @@
     <dependency>
       <groupId>org.codehaus.plexus</groupId>
       <artifactId>plexus-compiler-api</artifactId>
-      <version>1.8.6</version>
+      <version>2.1</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.codehaus.plexus</groupId>
+      <artifactId>plexus-compiler-javac</artifactId>
+      <version>2.1</version>
       <scope>test</scope>
     </dependency>
     <dependency>

Modified: archiva/redback/redback-components/trunk/spring-registry/modello-plugin-redback-registry/src/test/java/org/apache/archiva/redback/components/registry/modello/AbstractRegistryGeneratorTestCase.java
URL: http://svn.apache.org/viewvc/archiva/redback/redback-components/trunk/spring-registry/modello-plugin-redback-registry/src/test/java/org/apache/archiva/redback/components/registry/modello/AbstractRegistryGeneratorTestCase.java?rev=1418527&r1=1418526&r2=1418527&view=diff
==============================================================================
--- archiva/redback/redback-components/trunk/spring-registry/modello-plugin-redback-registry/src/test/java/org/apache/archiva/redback/components/registry/modello/AbstractRegistryGeneratorTestCase.java (original)
+++ archiva/redback/redback-components/trunk/spring-registry/modello-plugin-redback-registry/src/test/java/org/apache/archiva/redback/components/registry/modello/AbstractRegistryGeneratorTestCase.java Fri Dec  7 22:35:01 2012
@@ -121,7 +121,7 @@ public abstract class AbstractRegistryGe
         }
 
         String[] sourceDirectories =
-            new String[]{getTestPath( "src/test/verifiers/" + getName() ), generatedSources.getAbsolutePath()};
+            new String[]{ getTestPath( "src/test/verifiers/" + getName() ), generatedSources.getAbsolutePath() };
 
         org.codehaus.plexus.compiler.Compiler compiler = new JavacCompiler();
 
@@ -133,16 +133,20 @@ public abstract class AbstractRegistryGe
         configuration.setSourceVersion( "1.5" );
         configuration.setTargetVersion( "1.5" );
 
-        List messages = compiler.compile( configuration );
+        List<CompilerMessage> messages = compiler.performCompile( configuration ).getCompilerMessages();
 
-        for ( Iterator it = messages.iterator(); it.hasNext(); )
-        {
-            CompilerError message = (CompilerError) it.next();
+        int error = 0;
 
+        for ( CompilerMessage message : messages )
+        {
             System.out.println( message.getFile() + "[" + message.getStartLine() + "," + message.getStartColumn() +
                                     "]: " + message.getMessage() );
+            if ( message.getKind() == CompilerMessage.Kind.ERROR )
+            {
+                error++;
+            }
         }
 
-        assertEquals( "There was compilation errors.", 0, messages.size() );
+        assertEquals( "There was compilation errors.", 0, error );
     }
 }