cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1211934 - in /cxf/branches/2.4.x-fixes: ./ maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WSDL2JavaMojo.java maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WsdlOption.java parent/pom.xml
Date Thu, 08 Dec 2011 15:31:03 GMT
Author: dkulp
Date: Thu Dec  8 15:31:02 2011
New Revision: 1211934

URL: http://svn.apache.org/viewvc?rev=1211934&view=rev
Log:
Merged revisions 1211729 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r1211729 | bimargulies | 2011-12-07 20:26:06 -0500 (Wed, 07 Dec 2011) | 1 line
  
  CXF-3964: Diagnose missing artifact wsdls, and compensate for apparent resolver bug.
........

Modified:
    cxf/branches/2.4.x-fixes/   (props changed)
    cxf/branches/2.4.x-fixes/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WSDL2JavaMojo.java
    cxf/branches/2.4.x-fixes/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WsdlOption.java
    cxf/branches/2.4.x-fixes/parent/pom.xml

Propchange: cxf/branches/2.4.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.4.x-fixes/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WSDL2JavaMojo.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WSDL2JavaMojo.java?rev=1211934&r1=1211933&r2=1211934&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WSDL2JavaMojo.java
(original)
+++ cxf/branches/2.4.x-fixes/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WSDL2JavaMojo.java
Thu Dec  8 15:31:02 2011
@@ -375,7 +375,13 @@ public class WSDL2JavaMojo extends Abstr
                                                                    Artifact.SCOPE_COMPILE,
wsdlA.getType());
             wsdlArtifact = resolveRemoteWsdlArtifact(remoteRepos, wsdlArtifact);
             if (wsdlArtifact != null) {
-                String path = wsdlArtifact.getFile().getAbsolutePath();
+                File supposedFile = wsdlArtifact.getFile();
+                if (!supposedFile.exists() || !supposedFile.isFile()) {
+                    getLog().info("Apparent Maven bug: wsdl artifact 'resolved' to " 
+                        + supposedFile.getAbsolutePath() + " for " + wsdlArtifact.toString());
+                    continue;
+                }
+                String path = supposedFile.getAbsolutePath();
                 getLog().info("Resolved WSDL artifact to file " + path);
                 wsdlOption.setWsdl(path);
             }

Modified: cxf/branches/2.4.x-fixes/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WsdlOption.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WsdlOption.java?rev=1211934&r1=1211933&r2=1211934&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WsdlOption.java
(original)
+++ cxf/branches/2.4.x-fixes/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WsdlOption.java
Thu Dec  8 15:31:02 2011
@@ -26,6 +26,7 @@ import java.util.List;
 
 import org.apache.cxf.tools.common.ToolConstants;
 import org.apache.cxf.tools.util.URIParserUtil;
+import org.apache.maven.plugin.MojoExecutionException;
 
 public class WsdlOption extends Option {
 
@@ -83,8 +84,11 @@ public class WsdlOption extends Option {
         return file;
     }
     
-    public URI getWsdlURI(URI baseURI) {
+    public URI getWsdlURI(URI baseURI) throws MojoExecutionException {
         String wsdlLocation = getWsdl();
+        if (wsdlLocation == null) {
+            throw new MojoExecutionException("No wsdl available for base URI " + baseURI);
+        }
         File wsdlFile = new File(wsdlLocation);
         return wsdlFile.exists() ? wsdlFile.toURI() 
             : baseURI.resolve(URIParserUtil.escapeChars(wsdlLocation));

Modified: cxf/branches/2.4.x-fixes/parent/pom.xml
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/parent/pom.xml?rev=1211934&r1=1211933&r2=1211934&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/parent/pom.xml (original)
+++ cxf/branches/2.4.x-fixes/parent/pom.xml Thu Dec  8 15:31:02 2011
@@ -75,6 +75,7 @@
 
         <cxf.jdom.version>1.0</cxf.jdom.version>
         <cxf.jetty.version>7.4.5.v20110725</cxf.jetty.version>
+	<cxf.maven.core.version>2.2.1</cxf.maven.core.version>
         <cxf.msv.version>2011.1</cxf.msv.version>
         <cxf.rhino.version>1.7R2</cxf.rhino.version>
         <cxf.saaj.version>1.3.4</cxf.saaj.version>
@@ -450,7 +451,7 @@
             <dependency>
                 <groupId>org.apache.maven</groupId>
                 <artifactId>maven-plugin-api</artifactId>
-                <version>2.0.4</version>
+                <version>${cxf.maven.core.version}</version>
                 <scope>provided</scope>
                 <exclusions>
                     <exclusion>
@@ -463,7 +464,7 @@
             <dependency>
                 <groupId>org.apache.maven</groupId>
                 <artifactId>maven-project</artifactId>
-                <version>2.0.4</version>
+                <version>${cxf.maven.core.version}</version>
                 <scope>provided</scope>
                 <exclusions>
                     <exclusion>
@@ -476,13 +477,13 @@
                 <groupId>org.apache.maven</groupId>
                 <artifactId>maven-artifact</artifactId>
                 <scope>provided</scope>
-                <version>2.0.4</version>
+                <version>${cxf.maven.core.version}</version>
             </dependency>
             <dependency>
                 <groupId>org.apache.maven</groupId>
                 <artifactId>maven-core</artifactId>
                 <scope>provided</scope>
-                <version>2.0.4</version>
+                <version>${cxf.maven.core.version}</version>
             </dependency>
             <dependency>
                 <groupId>httpunit</groupId>



Mime
View raw message