You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by as...@apache.org on 2013/01/25 11:41:13 UTC
svn commit: r1438434 - in /cxf/branches/2.6.x-fixes: ./
api/src/main/java/org/apache/cxf/common/util/
tools/common/src/main/java/org/apache/cxf/tools/common/
Author: asoldano
Date: Fri Jan 25 10:41:13 2013
New Revision: 1438434
URL: http://svn.apache.org/viewvc?rev=1438434&view=rev
Log:
Merged revisions 1438101 via svnmerge from
https://svn.apache.org/repos/asf/cxf/branches/2.7.x-fixes
................
r1438101 | asoldano | 2013-01-24 18:45:06 +0100 (Thu, 24 Jan 2013) | 13 lines
Merged revisions 1438059,1438084 via svnmerge from
https://svn.apache.org/repos/asf/cxf/trunk
........
r1438059 | asoldano | 2013-01-24 17:20:15 +0100 (Thu, 24 Jan 2013) | 2 lines
[CXF-4777] Allow providing CXF compiler instance to be used in WSDLToJava
........
r1438084 | asoldano | 2013-01-24 18:22:02 +0100 (Thu, 24 Jan 2013) | 2 lines
[CXF-4777] Further externalize Compiler methods
........
................
Modified:
cxf/branches/2.6.x-fixes/ (props changed)
cxf/branches/2.6.x-fixes/api/src/main/java/org/apache/cxf/common/util/Compiler.java
cxf/branches/2.6.x-fixes/tools/common/src/main/java/org/apache/cxf/tools/common/ClassUtils.java
cxf/branches/2.6.x-fixes/tools/common/src/main/java/org/apache/cxf/tools/common/ToolConstants.java
Propchange: cxf/branches/2.6.x-fixes/
------------------------------------------------------------------------------
Merged /cxf/branches/2.7.x-fixes:r1438101
Merged /cxf/trunk:r1438059,1438084
Propchange: cxf/branches/2.6.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.
Modified: cxf/branches/2.6.x-fixes/api/src/main/java/org/apache/cxf/common/util/Compiler.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/api/src/main/java/org/apache/cxf/common/util/Compiler.java?rev=1438434&r1=1438433&r2=1438434&view=diff
==============================================================================
--- cxf/branches/2.6.x-fixes/api/src/main/java/org/apache/cxf/common/util/Compiler.java (original)
+++ cxf/branches/2.6.x-fixes/api/src/main/java/org/apache/cxf/common/util/Compiler.java Fri Jan 25 10:41:13 2013
@@ -68,7 +68,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");
}
@@ -174,7 +174,7 @@ public class Compiler {
return internalCompile(list.toArray(new String[list.size()]), idx);
}
- private boolean useJava6Compiler(String[] files)
+ protected boolean useJava6Compiler(String[] files)
throws Exception {
Object compiler = Class.forName("javax.tools.ToolProvider")
@@ -200,6 +200,7 @@ public class Compiler {
args, null, fileList);
Boolean ret = (Boolean)task.getClass().getMethod("call").invoke(task);
fileManager.getClass().getMethod("close").invoke(fileManager);
+
return ret;
}
Modified: cxf/branches/2.6.x-fixes/tools/common/src/main/java/org/apache/cxf/tools/common/ClassUtils.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/tools/common/src/main/java/org/apache/cxf/tools/common/ClassUtils.java?rev=1438434&r1=1438433&r2=1438434&view=diff
==============================================================================
--- cxf/branches/2.6.x-fixes/tools/common/src/main/java/org/apache/cxf/tools/common/ClassUtils.java (original)
+++ cxf/branches/2.6.x-fixes/tools/common/src/main/java/org/apache/cxf/tools/common/ClassUtils.java Fri Jan 25 10:41:13 2013
@@ -40,8 +40,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/branches/2.6.x-fixes/tools/common/src/main/java/org/apache/cxf/tools/common/ToolConstants.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/tools/common/src/main/java/org/apache/cxf/tools/common/ToolConstants.java?rev=1438434&r1=1438433&r2=1438434&view=diff
==============================================================================
--- cxf/branches/2.6.x-fixes/tools/common/src/main/java/org/apache/cxf/tools/common/ToolConstants.java (original)
+++ cxf/branches/2.6.x-fixes/tools/common/src/main/java/org/apache/cxf/tools/common/ToolConstants.java Fri Jan 25 10:41:13 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";