Author: dkulp
Date: Fri Nov 16 08:20:21 2007
New Revision: 595720
URL: http://svn.apache.org/viewvc?rev=595720&view=rev
Log:
Merged revisions 595556 via svnmerge from
https://svn.apache.org/repos/asf/incubator/cxf/trunk
........
r595556 | mmao | 2007-11-16 00:14:19 -0500 (Fri, 16 Nov 2007) | 4 lines
CXF-1212 Apply patch for the wsdl2javamojo, new options to chose the classpath
Thanks Gary
........
Modified:
incubator/cxf/branches/2.0.x-fixes/ (props changed)
incubator/cxf/branches/2.0.x-fixes/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WSDL2JavaMojo.java
Propchange: incubator/cxf/branches/2.0.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.
Modified:
incubator/cxf/branches/2.0.x-fixes/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WSDL2JavaMojo.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WSDL2JavaMojo.java?rev=595720&r1=595719&r2=595720&view=diff
==============================================================================
---
incubator/cxf/branches/2.0.x-fixes/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WSDL2JavaMojo.java
(original)
+++
incubator/cxf/branches/2.0.x-fixes/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WSDL2JavaMojo.java
Fri Nov 16 08:20:21 2007
@@ -72,6 +72,13 @@
*/
WsdlOption wsdlOptions[];
+ /**
+ * Use the compile classspath rather than the test classpath for execution
+ * usefull if the test dependencies clash with thoes of wsdl2java
+ * @parameter
+ */
+ boolean useCompileClasspath;
+
public void execute() throws MojoExecutionException {
String outputDir = testSourceRoot == null ? sourceRoot :
testSourceRoot;
File outputDirFile = new File(outputDir);
@@ -97,7 +104,9 @@
buf.append(classesDir.getAbsolutePath());
buf.append(File.pathSeparatorChar);
- for (Artifact a : CastUtils.cast(project.getTestArtifacts(),
Artifact.class)) {
+
+ List artifacts = useCompileClasspath ? project.getCompileArtifacts() :
project.getTestArtifacts();
+ for (Artifact a : CastUtils.cast(artifacts, Artifact.class)) {
try {
if (a.getFile() != null
&& a.getFile().exists()) {