Return-Path: Delivered-To: apmail-cxf-commits-archive@www.apache.org Received: (qmail 42166 invoked from network); 2 Feb 2010 17:33:31 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 2 Feb 2010 17:33:31 -0000 Received: (qmail 34250 invoked by uid 500); 2 Feb 2010 17:33:31 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 34178 invoked by uid 500); 2 Feb 2010 17:33:31 -0000 Mailing-List: contact commits-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list commits@cxf.apache.org Received: (qmail 34169 invoked by uid 99); 2 Feb 2010 17:33:31 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Feb 2010 17:33:31 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Feb 2010 17:33:30 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id DDDE42388A4A; Tue, 2 Feb 2010 17:33:09 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r905720 - in /cxf/branches/2.2.x-fixes: ./ tools/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/WSDLToJavaContainer.java Date: Tue, 02 Feb 2010 17:33:08 -0000 To: commits@cxf.apache.org From: dkulp@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20100202173309.DDDE42388A4A@eris.apache.org> Author: dkulp Date: Tue Feb 2 17:33:07 2010 New Revision: 905720 URL: http://svn.apache.org/viewvc?rev=905720&view=rev Log: Merged revisions 905711 via svnmerge from https://svn.apache.org/repos/asf/cxf/trunk ........ r905711 | dkulp | 2010-02-02 12:13:48 -0500 (Tue, 02 Feb 2010) | 1 line [CXF-2640] Don't create dirs if we aren't actually outputting anything ........ Modified: cxf/branches/2.2.x-fixes/ (props changed) cxf/branches/2.2.x-fixes/tools/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/WSDLToJavaContainer.java Propchange: cxf/branches/2.2.x-fixes/ ('svn:mergeinfo' removed) Propchange: cxf/branches/2.2.x-fixes/ ------------------------------------------------------------------------------ Binary property 'svnmerge-integrated' - no diff available. Modified: cxf/branches/2.2.x-fixes/tools/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/WSDLToJavaContainer.java URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/tools/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/WSDLToJavaContainer.java?rev=905720&r1=905719&r2=905720&view=diff ============================================================================== --- cxf/branches/2.2.x-fixes/tools/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/WSDLToJavaContainer.java (original) +++ cxf/branches/2.2.x-fixes/tools/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/WSDLToJavaContainer.java Tue Feb 2 17:33:07 2010 @@ -385,27 +385,29 @@ public void validate(ToolContext env) throws ToolException { String outdir = (String)env.get(ToolConstants.CFG_OUTPUTDIR); - if (outdir != null) { - File dir = new File(outdir); - if (!dir.exists() && !dir.mkdirs()) { - Message msg = new Message("DIRECTORY_COULD_NOT_BE_CREATED", LOG, outdir); - throw new ToolException(msg); - } - if (!dir.isDirectory()) { - Message msg = new Message("NOT_A_DIRECTORY", LOG, outdir); - throw new ToolException(msg); - } - } - - if (env.optionSet(ToolConstants.CFG_COMPILE)) { - String clsdir = (String)env.get(ToolConstants.CFG_CLASSDIR); - if (clsdir != null) { - File dir = new File(clsdir); + if (!isSuppressCodeGen()) { + if (outdir != null) { + File dir = new File(outdir); if (!dir.exists() && !dir.mkdirs()) { - Message msg = new Message("DIRECTORY_COULD_NOT_BE_CREATED", LOG, clsdir); + Message msg = new Message("DIRECTORY_COULD_NOT_BE_CREATED", LOG, outdir); + throw new ToolException(msg); + } + if (!dir.isDirectory()) { + Message msg = new Message("NOT_A_DIRECTORY", LOG, outdir); throw new ToolException(msg); } } + + if (env.optionSet(ToolConstants.CFG_COMPILE)) { + String clsdir = (String)env.get(ToolConstants.CFG_CLASSDIR); + if (clsdir != null) { + File dir = new File(clsdir); + if (!dir.exists() && !dir.mkdirs()) { + Message msg = new Message("DIRECTORY_COULD_NOT_BE_CREATED", LOG, clsdir); + throw new ToolException(msg); + } + } + } } String wsdl = (String)env.get(ToolConstants.CFG_WSDLURL);