cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1133058 - in /cxf/branches/2.3.x-fixes: ./ common/common/src/main/java/org/apache/cxf/common/util/Compiler.java rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/ext/codegen/CodeGeneratorProviderTest.java
Date Tue, 07 Jun 2011 15:58:30 GMT
Author: dkulp
Date: Tue Jun  7 15:58:30 2011
New Revision: 1133058

URL: http://svn.apache.org/viewvc?rev=1133058&view=rev
Log:
Merged revisions 1130181 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r1130181 | dkulp | 2011-06-01 11:10:09 -0400 (Wed, 01 Jun 2011) | 1 line
  
  Use the methods in Compiler class to find javac
........

Modified:
    cxf/branches/2.3.x-fixes/   (props changed)
    cxf/branches/2.3.x-fixes/common/common/src/main/java/org/apache/cxf/common/util/Compiler.java
    cxf/branches/2.3.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/ext/codegen/CodeGeneratorProviderTest.java

Propchange: cxf/branches/2.3.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.3.x-fixes/common/common/src/main/java/org/apache/cxf/common/util/Compiler.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/common/common/src/main/java/org/apache/cxf/common/util/Compiler.java?rev=1133058&r1=1133057&r2=1133058&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/common/common/src/main/java/org/apache/cxf/common/util/Compiler.java
(original)
+++ cxf/branches/2.3.x-fixes/common/common/src/main/java/org/apache/cxf/common/util/Compiler.java
Tue Jun  7 15:58:30 2011
@@ -100,7 +100,20 @@ public class Compiler {
         }
 
     }
-    
+    public boolean compileFiles(File[] files) {
+        List<String> f = new ArrayList<String>(files.length);
+        for (File file : files) {
+            f.add(file.getAbsolutePath());
+        }
+        return compileFiles(f.toArray(new String[files.length]));
+    }
+    public boolean compileFiles(List<File> files) {
+        List<String> f = new ArrayList<String>(files.size());
+        for (File file : files) {
+            f.add(file.getAbsolutePath());
+        }
+        return compileFiles(f.toArray(new String[files.size()]));
+    }
     public boolean compileFiles(String[] files) {
         String endorsed = System.getProperty("java.endorsed.dirs");
         if (!forceFork) {

Modified: cxf/branches/2.3.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/ext/codegen/CodeGeneratorProviderTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/ext/codegen/CodeGeneratorProviderTest.java?rev=1133058&r1=1133057&r2=1133058&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/ext/codegen/CodeGeneratorProviderTest.java
(original)
+++ cxf/branches/2.3.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/ext/codegen/CodeGeneratorProviderTest.java
Tue Jun  7 15:58:30 2011
@@ -197,24 +197,13 @@ public class CodeGeneratorProviderTest e
     }
     
     protected boolean compileJavaSrc(String classPath, List<File> srcList, String dest)
{
-        String[] javacCommand = new String[srcList.size() + 7];
-        
-        javacCommand[0] = "javac";
-        javacCommand[1] = "-classpath";
-        javacCommand[2] = classPath;        
-        javacCommand[3] = "-d";
-        javacCommand[4] = dest;
-        javacCommand[5] = "-target";
-        javacCommand[6] = "1.5";
-        
-        int i = 7;
-        for (File f : srcList) {
-            javacCommand[i++] = f.getAbsolutePath();            
-        }
+
         org.apache.cxf.common.util.Compiler javaCompiler 
             = new org.apache.cxf.common.util.Compiler();
-        
-        return javaCompiler.internalCompile(javacCommand, 7); 
+        javaCompiler.setTarget("1.5");
+        javaCompiler.setClassPath(classPath);
+        javaCompiler.setOutputDir(dest);
+        return javaCompiler.compileFiles(srcList); 
     }
     
     static void setupClasspath(StringBuilder classPath, ClassLoader classLoader)



Mime
View raw message