You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by co...@apache.org on 2018/04/23 11:35:32 UTC

[cxf] branch 3.1.x-fixes updated (229c92e -> 141f25a)

This is an automated email from the ASF dual-hosted git repository.

coheigea pushed a change to branch 3.1.x-fixes
in repository https://gitbox.apache.org/repos/asf/cxf.git.


    from 229c92e  Recording .gitmergeinfo Changes
     new 19172d4  Recording .gitmergeinfo Changes
     new 141f25a  add master's compile instance changes to JavaToWS to branch 3.1.x-fixes. This closes #410.

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .gitmergeinfo                                            |  2 ++
 .../main/java/org/apache/cxf/tools/java2ws/JavaToWS.java | 16 +++++++++++++---
 .../org/apache/cxf/tools/java2ws/JavaToWSContainer.java  |  6 ++++++
 .../tools/java2wsdl/generator/wsdl11/BeanGenerator.java  | 16 +++++++---------
 4 files changed, 28 insertions(+), 12 deletions(-)

-- 
To stop receiving notification emails like this one, please contact
coheigea@apache.org.

[cxf] 01/02: Recording .gitmergeinfo Changes

Posted by co...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

coheigea pushed a commit to branch 3.1.x-fixes
in repository https://gitbox.apache.org/repos/asf/cxf.git

commit 19172d4af34eab853557b0b47e1ddab5e4251f98
Author: Colm O hEigeartaigh <co...@apache.org>
AuthorDate: Mon Apr 23 11:54:05 2018 +0100

    Recording .gitmergeinfo Changes
---
 .gitmergeinfo | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/.gitmergeinfo b/.gitmergeinfo
index 11d2e33..d72acc8 100644
--- a/.gitmergeinfo
+++ b/.gitmergeinfo
@@ -154,6 +154,7 @@ B 29fcf793aa6f0182d66930aaf9f5d1ebdccd3241
 B 2a6144f5600160e285d6dda35b1355a8995f388a
 B 2b1b6fa7445f4b5acfc49c5891d7d9cad1440a62
 B 2b5c45ebd897745c83d78a125ea554b0489f6262
+B 2b83d5f3872c08507e10fcad928f09c846e0991a
 B 2b9c671a1aca1c8514f3c4935ec06145ea6e7cef
 B 2cbcb539494120034bd7184601465f41d4230747
 B 2cd77bae06fc51ef2bc6d7679db1fdf6e9476af1
@@ -627,6 +628,7 @@ B c6d4592a8a5d31429333c0e539ae56f517c2523f
 B c757b6d5bbacc1019cef229661360818b26f7d49
 B c783e60a8bcea76b9fecb75364b120d39c8ea28a
 B c864ba30b1278c6288c7a8af3c3829940bc5e31e
+B c870778a809bd12c31993f6056e5d62862b90724
 B c8731a9dd3e26341eeefc3042f64f159e1d2c1c8
 B c8828ed16a2af43471c07490389abc211bc10571
 B c886dc72fc4d714e9a28f17a1adbd641eaa5744e

-- 
To stop receiving notification emails like this one, please contact
coheigea@apache.org.

[cxf] 02/02: add master's compile instance changes to JavaToWS to branch 3.1.x-fixes. This closes #410.

Posted by co...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

coheigea pushed a commit to branch 3.1.x-fixes
in repository https://gitbox.apache.org/repos/asf/cxf.git

commit 141f25abe50bb1e34d0bc3545ec9e87d17a5fe2f
Author: rsearls <rs...@localhost.localdomain>
AuthorDate: Fri Apr 20 09:26:35 2018 -0400

    add master's compile instance changes to JavaToWS to branch 3.1.x-fixes. This closes #410.
---
 .../main/java/org/apache/cxf/tools/java2ws/JavaToWS.java | 16 +++++++++++++---
 .../org/apache/cxf/tools/java2ws/JavaToWSContainer.java  |  6 ++++++
 .../tools/java2wsdl/generator/wsdl11/BeanGenerator.java  | 16 +++++++---------
 3 files changed, 26 insertions(+), 12 deletions(-)

diff --git a/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2ws/JavaToWS.java b/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2ws/JavaToWS.java
index 888e28f..db3c6a0 100644
--- a/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2ws/JavaToWS.java
+++ b/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2ws/JavaToWS.java
@@ -24,6 +24,7 @@ import java.util.List;
 
 import org.apache.cxf.common.util.StringUtils;
 import org.apache.cxf.tools.common.CommandInterfaceUtils;
+import org.apache.cxf.tools.common.ToolContext;
 import org.apache.cxf.tools.common.toolspec.ToolRunner;
 
 public class JavaToWS {
@@ -83,7 +84,18 @@ public class JavaToWS {
         ToolRunner.runTool(JavaToWSContainer.class, JavaToWSContainer.class
                            .getResourceAsStream("java2ws.xml"), false, args, os);      
     }
-    
+
+    /**
+     * Pass user app's (compiler) information in the context.
+     * @param context
+     * @param os
+     * @throws Exception
+     */
+    public void run(ToolContext context, OutputStream os) throws Exception {
+        ToolRunner.runTool(JavaToWSContainer.class,
+                JavaToWSContainer.class.getResourceAsStream("java2ws.xml"),
+                false, args, isExitOnFinish(), context, os);
+    }
 
     private boolean isExitOnFinish() {
         String exit = System.getProperty("exitOnFinish");
@@ -92,7 +104,5 @@ public class JavaToWS {
         }
         return "YES".equalsIgnoreCase(exit) || "TRUE".equalsIgnoreCase(exit);
     }
-    
-    
 
 }
diff --git a/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2ws/JavaToWSContainer.java b/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2ws/JavaToWSContainer.java
index 3e4d030..666d38d 100644
--- a/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2ws/JavaToWSContainer.java
+++ b/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2ws/JavaToWSContainer.java
@@ -52,6 +52,12 @@ public class JavaToWSContainer extends AbstractCXFToolContainer {
             if (!hasInfoOption()) {
                 ToolContext env = new ToolContext();
                 env.setParameters(getParametersMap(new HashSet<String>()));
+
+                // check for custom compiler object to pass on
+                if (getContext() != null && getContext().get(ToolConstants.COMPILER) != null) {
+                    env.put(ToolConstants.COMPILER, getContext().get(ToolConstants.COMPILER));
+                }
+
                 if (env.get(ToolConstants.CFG_OUTPUTDIR) == null) {
                     env.put(ToolConstants.CFG_OUTPUTDIR, ".");
                 }
diff --git a/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/BeanGenerator.java b/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/BeanGenerator.java
index ca5683f..3a03af5 100644
--- a/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/BeanGenerator.java
+++ b/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/BeanGenerator.java
@@ -80,20 +80,18 @@ public class BeanGenerator extends AbstractGenerator<File> {
             
                 generator.clearAttributes();
             }
-        
-                //compile the classes
-            Compiler compiler = new Compiler();
+
+            //compile the classes
+            Compiler compiler = (Compiler)getToolContext().get(ToolConstants.COMPILER);
+            if (compiler == null) {
+                compiler = new Compiler();
+            }
             compiler.setOutputDir(compileToDir);
             List<String> files = new ArrayList<String>(generatedFiles.size());
             for (File file : generatedFiles) {
                 files.add(file.getAbsolutePath());
             }
-            if (!compiler.compileFiles(files.toArray(new String[files.size()]))) {
-                // TODO - compile issue
-            }
-
-            
-            
+            compiler.compileFiles(files.toArray(new String[files.size()]));
         } catch (Exception e) {
             e.printStackTrace();
         }

-- 
To stop receiving notification emails like this one, please contact
coheigea@apache.org.