Author: alessio.soldano(a)jboss.com
Date: 2012-08-06 08:36:45 -0400 (Mon, 06 Aug 2012)
New Revision: 16570
Modified:
stack/cxf/branches/jbossws-cxf-4.0.x/
stack/cxf/branches/jbossws-cxf-4.0.x/modules/client/src/main/java/org/jboss/wsf/stack/cxf/tools/CXFConsumerImpl.java
stack/cxf/branches/jbossws-cxf-4.0.x/modules/testsuite/shared-tests/
Log:
[JBPAPP-9648] WSConsume generates sources in current dir even if -keep option is not
specified
Merged revisions 16530,16532 via svnmerge from
https://svn.jboss.org/repos/jbossws/stack/cxf/trunk
.......
r16530 | alessio.soldano(a)jboss.com | 2012-07-25 12:48:18 +0200 (Wed, 25 Jul 2012) | 2
lines
[JBWS-3519] Remove generated sources when -k (keep/generateSource) option is not used +
fix wrong impl of JBWS-3193
.......
r16532 | alessio.soldano(a)jboss.com | 2012-07-25 12:49:50 +0200 (Wed, 25 Jul 2012) | 2
lines
Fixing wrong svn:ignore
.......
Property changes on: stack/cxf/branches/jbossws-cxf-4.0.x
___________________________________________________________________
Modified: svnmerge-integrated
-
https://svn.jboss.org/repos/jbossws/stack/cxf/trunk:1-15635,15658,15668,1...
+
https://svn.jboss.org/repos/jbossws/stack/cxf/trunk:1-15635,15658,15668,1...
Modified: svn:mergeinfo
- /stack/cxf/branches/asoldano:14032-14050,14068
/stack/cxf/trunk:15658,15668,15674-15675,15682,15695-15697,15708,15711,15713,15719,15723-15730,15738,15743,15748,15750-15751,15754-15757,15765-15766,15768,15773,15780-15781,15784,15794,15806-15808,15824,15835,15837-15857,15859,15866,15879-15881,15886-15889,15896,15900-15920,15936,15965,15967,15973,16067,16071,16086-16087,16096,16176,16183,16204-16205,16227,16230,16244-16245,16323
+ /stack/cxf/branches/asoldano:14032-14050,14068
/stack/cxf/trunk:15658,15668,15674-15675,15682,15695-15697,15708,15711,15713,15719,15723-15730,15738,15743,15748,15750-15751,15754-15757,15765-15766,15768,15773,15780-15781,15784,15794,15806-15808,15824,15835,15837-15857,15859,15866,15879-15881,15886-15889,15896,15900-15920,15936,15965,15967,15973,16067,16071,16086-16087,16096,16176,16183,16204-16205,16227,16230,16244-16245,16323,16530-16532
Modified:
stack/cxf/branches/jbossws-cxf-4.0.x/modules/client/src/main/java/org/jboss/wsf/stack/cxf/tools/CXFConsumerImpl.java
===================================================================
---
stack/cxf/branches/jbossws-cxf-4.0.x/modules/client/src/main/java/org/jboss/wsf/stack/cxf/tools/CXFConsumerImpl.java 2012-08-06
12:35:40 UTC (rev 16569)
+++
stack/cxf/branches/jbossws-cxf-4.0.x/modules/client/src/main/java/org/jboss/wsf/stack/cxf/tools/CXFConsumerImpl.java 2012-08-06
12:36:45 UTC (rev 16570)
@@ -28,6 +28,7 @@
import java.util.List;
import java.util.ResourceBundle;
+import org.apache.cxf.helpers.FileUtils;
import org.apache.cxf.tools.common.ToolContext;
import org.apache.cxf.tools.wsdlto.WSDLToJava;
import org.jboss.ws.api.tools.WSContractConsumer;
@@ -162,27 +163,31 @@
args.add("-exsh");
args.add(additionalHeaders ? "true" : "false");
-
- if (generateSource && sourceDir == null)
+
+ if (targetPackage != null)
{
- sourceDir = outputDir;
+ args.add("-p");
+ args.add(targetPackage);
}
- if (sourceDir != null && generateSource)
- {
+ File sourceTempDir = null;
+ if (generateSource) {
+ if (sourceDir == null)
+ {
+ sourceDir = outputDir;
+ }
if (!sourceDir.exists() && !sourceDir.mkdirs())
throw new IllegalStateException(BundleUtils.getMessage(bundle,
"COULD_NOT_MAKE_DIRECTORY", sourceDir.getName()));
args.add("-d");
args.add(sourceDir.getAbsolutePath());
+ } else {
+ sourceTempDir = new File(outputDir, "tmp" + Math.round(Math.random() *
10000000));
+ FileUtils.mkDir(sourceTempDir);
+ args.add("-d");
+ args.add(sourceTempDir.getAbsolutePath());
}
- if (targetPackage != null)
- {
- args.add("-p");
- args.add(targetPackage);
- }
-
if (wsdlLocation != null)
{
args.add("-wsdlLocation");
@@ -213,11 +218,6 @@
args.add("-classdir");
args.add(outputDir.getAbsolutePath());
}
- if (nocompile && !generateSource)
- {
- args.add("-d");
- args.add(outputDir.getAbsolutePath());
- }
// Always set the target
if (target != null)
@@ -261,5 +261,12 @@
t.printStackTrace();
}
}
+ finally
+ {
+ if (sourceTempDir != null)
+ {
+ FileUtils.removeDir(sourceTempDir);
+ }
+ }
}
}
Property changes on: stack/cxf/branches/jbossws-cxf-4.0.x/modules/testsuite/shared-tests
___________________________________________________________________
Modified: svn:ignore
- .classpath
.project
.settings
target
org
+ .classpath
.project
.settings
target