From cxf-commits-return-3730-apmail-incubator-cxf-commits-archive=incubator.apache.org@incubator.apache.org Fri Nov 16 16:20:45 2007 Return-Path: Delivered-To: apmail-incubator-cxf-commits-archive@locus.apache.org Received: (qmail 82886 invoked from network); 16 Nov 2007 16:20:45 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 16 Nov 2007 16:20:45 -0000 Received: (qmail 50682 invoked by uid 500); 16 Nov 2007 16:20:32 -0000 Delivered-To: apmail-incubator-cxf-commits-archive@incubator.apache.org Received: (qmail 50556 invoked by uid 500); 16 Nov 2007 16:20:32 -0000 Mailing-List: contact cxf-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cxf-dev@incubator.apache.org Delivered-To: mailing list cxf-commits@incubator.apache.org Received: (qmail 50547 invoked by uid 99); 16 Nov 2007 16:20:32 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Nov 2007 08:20:32 -0800 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Nov 2007 16:20:30 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 2F4901A9832; Fri, 16 Nov 2007 08:20:24 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r595720 - in /incubator/cxf/branches/2.0.x-fixes: ./ maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WSDL2JavaMojo.java Date: Fri, 16 Nov 2007 16:20:23 -0000 To: cxf-commits@incubator.apache.org From: dkulp@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20071116162024.2F4901A9832@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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()) {