geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r781176 - /geronimo/server/trunk/plugins/jaxws/geronimo-jaxws-sun-tools/src/main/java/org/apache/geronimo/jaxws/builder/WsdlGenerator.java
Date Tue, 02 Jun 2009 21:21:20 GMT
Author: gawor
Date: Tue Jun  2 21:21:19 2009
New Revision: 781176

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

Modified:
    geronimo/server/trunk/plugins/jaxws/geronimo-jaxws-sun-tools/src/main/java/org/apache/geronimo/jaxws/builder/WsdlGenerator.java

Modified: geronimo/server/trunk/plugins/jaxws/geronimo-jaxws-sun-tools/src/main/java/org/apache/geronimo/jaxws/builder/WsdlGenerator.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/jaxws/geronimo-jaxws-sun-tools/src/main/java/org/apache/geronimo/jaxws/builder/WsdlGenerator.java?rev=781176&r1=781175&r2=781176&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/jaxws/geronimo-jaxws-sun-tools/src/main/java/org/apache/geronimo/jaxws/builder/WsdlGenerator.java
(original)
+++ geronimo/server/trunk/plugins/jaxws/geronimo-jaxws-sun-tools/src/main/java/org/apache/geronimo/jaxws/builder/WsdlGenerator.java
Tue Jun  2 21:21:19 2009
@@ -175,15 +175,20 @@
         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 generator failed: {}", getOutput(os));
+        } else if (LOG.isDebugEnabled()) {
+            LOG.debug("WSDL generator 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>();    
         cmd.add("-classpath");



Mime
View raw message