cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From asold...@apache.org
Subject svn commit: r1438059 - in /cxf/trunk: api/src/main/java/org/apache/cxf/common/util/Compiler.java tools/common/src/main/java/org/apache/cxf/tools/common/ClassUtils.java tools/common/src/main/java/org/apache/cxf/tools/common/ToolConstants.java
Date Thu, 24 Jan 2013 16:20:15 GMT
Author: asoldano
Date: Thu Jan 24 16:20:15 2013
New Revision: 1438059

URL: http://svn.apache.org/viewvc?rev=1438059&view=rev
Log:
[CXF-4777] Allow providing CXF compiler instance to be used in WSDLToJava

Modified:
    cxf/trunk/api/src/main/java/org/apache/cxf/common/util/Compiler.java
    cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/ClassUtils.java
    cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/ToolConstants.java

Modified: cxf/trunk/api/src/main/java/org/apache/cxf/common/util/Compiler.java
URL: http://svn.apache.org/viewvc/cxf/trunk/api/src/main/java/org/apache/cxf/common/util/Compiler.java?rev=1438059&r1=1438058&r2=1438059&view=diff
==============================================================================
--- cxf/trunk/api/src/main/java/org/apache/cxf/common/util/Compiler.java (original)
+++ cxf/trunk/api/src/main/java/org/apache/cxf/common/util/Compiler.java Thu Jan 24 16:20:15
2013
@@ -83,7 +83,7 @@ public class Compiler {
         classPath = StringUtils.isEmpty(s) ? null : s;
     }
     
-    private void addArgs(List<String> list) {
+    protected void addArgs(List<String> list) {
         if (verbose) {
             list.add("-verbose");
         }
@@ -184,7 +184,7 @@ public class Compiler {
         return internalCompile(list.toArray(new String[list.size()]), idx);
     }
 
-    private boolean useJava6Compiler(String[] files) {
+    protected boolean useJava6Compiler(String[] files) {
         JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
         StandardJavaFileManager fileManager = compiler.getStandardFileManager(null, null,
null);
         Iterable<? extends JavaFileObject> fileList 

Modified: cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/ClassUtils.java
URL: http://svn.apache.org/viewvc/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/ClassUtils.java?rev=1438059&r1=1438058&r2=1438059&view=diff
==============================================================================
--- cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/ClassUtils.java (original)
+++ cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/ClassUtils.java Thu Jan
24 16:20:15 2013
@@ -41,8 +41,11 @@ public class ClassUtils {
     protected static final Logger LOG = LogUtils.getL7dLogger(ClassUtils.class);
     
     public void compile(ToolContext context) throws ToolException {
-        Compiler compiler = new Compiler();
-        
+        Compiler compiler = (Compiler)context.get(ToolConstants.COMPILER);
+        if (compiler == null) {
+            compiler = new Compiler();
+        }
+
         if (context.isVerbose()) {
             compiler.setVerbose(true);
         }

Modified: cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/ToolConstants.java
URL: http://svn.apache.org/viewvc/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/ToolConstants.java?rev=1438059&r1=1438058&r2=1438059&view=diff
==============================================================================
--- cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/ToolConstants.java (original)
+++ cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/ToolConstants.java Thu
Jan 24 16:20:15 2013
@@ -222,6 +222,7 @@ public final class ToolConstants {
     public static final String FRONTEND_PLUGIN = "frontend";
     public static final String DATABINDING_PLUGIN = "databinding";
     public static final String RUNTIME_DATABINDING_CLASS = "databinding-class";
+    public static final String COMPILER = "compiler";
 
     public static final String CFG_WSDL_VERSION = "wsdlversion";
 



Mime
View raw message