You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by mm...@apache.org on 2007/11/16 06:14:20 UTC
svn commit: r595556 -
/incubator/cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WSDL2JavaMojo.java
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()) {
Re: svn commit: r595556 -
/incubator/cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WSDL2JavaMojo.java
Posted by Glen Mazza <gl...@verizon.net>.
Am Freitag, den 16.11.2007, 05:14 +0000 schrieb mmao@apache.org:
> 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
classpath
> + * usefull if the test dependencies clash with thoes of wsdl2java
useful, those
> + * @parameter
> + */
> + boolean useCompileClasspath;
> +