You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2011/01/08 03:22:22 UTC
svn commit: r1056600 -
/cxf/xjc-utils/trunk/cxf-xjc-plugin/src/main/java/org/apache/cxf/maven_plugin/AbstractXSDToJavaMojo.java
Author: dkulp
Date: Sat Jan 8 02:22:22 2011
New Revision: 1056600
URL: http://svn.apache.org/viewvc?rev=1056600&view=rev
Log:
[CXF-3138] Validate the extension is in the right form
Modified:
cxf/xjc-utils/trunk/cxf-xjc-plugin/src/main/java/org/apache/cxf/maven_plugin/AbstractXSDToJavaMojo.java
Modified: cxf/xjc-utils/trunk/cxf-xjc-plugin/src/main/java/org/apache/cxf/maven_plugin/AbstractXSDToJavaMojo.java
URL: http://svn.apache.org/viewvc/cxf/xjc-utils/trunk/cxf-xjc-plugin/src/main/java/org/apache/cxf/maven_plugin/AbstractXSDToJavaMojo.java?rev=1056600&r1=1056599&r2=1056600&view=diff
==============================================================================
--- cxf/xjc-utils/trunk/cxf-xjc-plugin/src/main/java/org/apache/cxf/maven_plugin/AbstractXSDToJavaMojo.java (original)
+++ cxf/xjc-utils/trunk/cxf-xjc-plugin/src/main/java/org/apache/cxf/maven_plugin/AbstractXSDToJavaMojo.java Sat Jan 8 02:22:22 2011
@@ -250,6 +250,11 @@ public abstract class AbstractXSDToJavaM
for (String ext : extensions) {
String[] s = ext.split(":");
+ if (s.length != 3) {
+ throw new MojoExecutionException("Extension should be defined as"
+ + " groupId:artifactId:version. "
+ + ext + " does not meet that pattern.");
+ }
Artifact artifact = artifactFactory.createBuildArtifact(s[0], s[1], s[2], "jar");
artifacts.add(artifact);
@@ -270,6 +275,8 @@ public abstract class AbstractXSDToJavaM
list.add(f.getAbsolutePath());
newCp.add(f.toURI().toURL());
}
+ } catch (MojoExecutionException mojo) {
+ throw mojo;
} catch (Exception ex) {
throw new MojoExecutionException("Could not download extension artifact", ex);
}