You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2010/02/02 18:33:08 UTC
svn commit: r905720 - in /cxf/branches/2.2.x-fixes: ./
tools/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/WSDLToJavaContainer.java
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);