Author: rineholt
Date: Mon Apr 24 10:42:33 2006
New Revision: 396618
URL: http://svn.apache.org/viewcvs?rev=396618&view=rev
Log:
If the WSDL file is not present the check on gen mark is false and falls
through to marker.createNewFile
if the path is not there it just fails with a miserable message.
Modified:
incubator/tuscany/java/sdo/plugin/src/main/java/org/apache/tuscany/sdo/plugin/GeneratorMojo.java
Modified:
incubator/tuscany/java/sdo/plugin/src/main/java/org/apache/tuscany/sdo/plugin/GeneratorMojo.java
URL:
http://svn.apache.org/viewcvs/incubator/tuscany/java/sdo/plugin/src/main/java/org/apache/tuscany/sdo/plugin/GeneratorMojo.java?rev=396618&r1=396617&r2=396618&view=diff
==============================================================================
---
incubator/tuscany/java/sdo/plugin/src/main/java/org/apache/tuscany/sdo/plugin/GeneratorMojo.java
(original)
+++
incubator/tuscany/java/sdo/plugin/src/main/java/org/apache/tuscany/sdo/plugin/GeneratorMojo.java
Mon Apr 24 10:42:33 2006
@@ -138,15 +138,17 @@
for (int i = 0; i < files.length; i++) {
File file = files[i];
+ if(!file.exists())
+ throw new MojoExecutionException("The following WSDL file not
found '" +file.getAbsolutePath()+"'.");
File marker = new File(targetDirectory, ".gen#" + file.getName());
- if (file.lastModified() > marker.lastModified()) {
+ if ( file.lastModified() > marker.lastModified()) {
getLog().info("Generating SDO interfaces from " + file);
JavaGenerator.generateFromXMLSchema(file.toString(),
targetDirectory, javaPackage, prefix, genOptions);
}
try {
marker.createNewFile();
} catch (IOException e) {
- throw new MojoExecutionException(e.getMessage(), e);
+ throw new MojoExecutionException(e.getMessage() + "'"+
marker.getAbsolutePath()+ "'", e);
}
marker.setLastModified(System.currentTimeMillis());
}