Author: mmao
Date: Thu Nov 15 21:14:19 2007
New Revision: 595556

URL: http://svn.apache.org/viewvc?rev=595556&view=rev
Log:
CXF-1212 Apply patch for the wsdl2javamojo, new options to chose the classpath
 Thanks Gary


Modified:
    
incubator/cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WSDL2JavaMojo.java

Modified: 
incubator/cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WSDL2JavaMojo.java
URL: 
http://svn.apache.org/viewvc/incubator/cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WSDL2JavaMojo.java?rev=595556&r1=595555&r2=595556&view=diff
==============================================================================
--- 
incubator/cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WSDL2JavaMojo.java
 (original)
+++ 
incubator/cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WSDL2JavaMojo.java
 Thu Nov 15 21:14:19 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()) {


Reply via email to