geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r781175 - /geronimo/server/branches/2.1/plugins/jaxws/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/WsdlGenerator.java
Date Tue, 02 Jun 2009 21:20:11 GMT
Author: gawor
Date: Tue Jun  2 21:20:09 2009
New Revision: 781175

URL: http://svn.apache.org/viewvc?rev=781175&view=rev
Log:
log wsgen output when it fails in non-fork mode (GERONIMO-4664)

Modified:
    geronimo/server/branches/2.1/plugins/jaxws/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/WsdlGenerator.java

Modified: geronimo/server/branches/2.1/plugins/jaxws/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/WsdlGenerator.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/plugins/jaxws/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/WsdlGenerator.java?rev=781175&r1=781174&r2=781175&view=diff
==============================================================================
--- geronimo/server/branches/2.1/plugins/jaxws/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/WsdlGenerator.java
(original)
+++ geronimo/server/branches/2.1/plugins/jaxws/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/WsdlGenerator.java
Tue Jun  2 21:20:09 2009
@@ -356,16 +356,22 @@
         ByteArrayOutputStream os = new ByteArrayOutputStream();
         boolean rs = this.jaxwsTools.invokeWsgen(jars, os, arguments);
         os.close();
-        
-        if (LOG.isDebugEnabled()) {
-            byte [] arr = os.toByteArray();
-            String wsgenOutput = new String(arr, 0, arr.length);
-            LOG.debug("wsgen output: " + wsgenOutput);
+     
+        if (!rs) {
+            LOG.error("WSDL generation failed");
+            LOG.error(getOutput(os));
+        } else if (LOG.isDebugEnabled()) {
+            LOG.debug("wsgen output: " + getOutput(os));
         }
         
         return rs;
     }
     
+    private static String getOutput(ByteArrayOutputStream os) {
+        byte [] arr = os.toByteArray();
+        return new String(arr, 0, arr.length);
+    }
+
     private boolean forkWsgen(StringBuilder classPath, String[] arguments) throws Exception
{           
         List<String> cmd = new ArrayList<String>();
         String javaHome = System.getProperty("java.home");                       



Mime
View raw message