summaryrefslogtreecommitdiff
path: root/qpid/gentools/src
diff options
context:
space:
mode:
authorKim van der Riet <kpvdr@apache.org>2007-01-08 15:22:05 +0000
committerKim van der Riet <kpvdr@apache.org>2007-01-08 15:22:05 +0000
commit366b25ae136c83238e94ac6dfd670990fa1d8375 (patch)
treec66952e34e4d742adf67da9bc527806b7be04ce1 /qpid/gentools/src
parent6c462407cb00bfe87737ee6ae99682eebb335090 (diff)
downloadqpid-python-366b25ae136c83238e94ac6dfd670990fa1d8375.tar.gz
Fixed: [QPID-253] Existing classpath breaks codegen; [QPID-254] Build failure does not prevent timestamp from being generated. Also moved all required properties into ant build file, allowing the generation to be completed independently of Maven from the common directory.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@494092 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/gentools/src')
-rw-r--r--qpid/gentools/src/org/apache/qpid/gentools/Main.java32
1 files changed, 21 insertions, 11 deletions
diff --git a/qpid/gentools/src/org/apache/qpid/gentools/Main.java b/qpid/gentools/src/org/apache/qpid/gentools/Main.java
index 189d3eb5ae..7e6248817c 100644
--- a/qpid/gentools/src/org/apache/qpid/gentools/Main.java
+++ b/qpid/gentools/src/org/apache/qpid/gentools/Main.java
@@ -261,19 +261,30 @@ public class Main
public static void main(String[] args)
{
+ int exitCode = 1;
// TODO: This is a simple and klunky way of hangling command-line args, and could be improved upon.
if (args.length < 2)
+ {
usage();
- try { new Main().run(args); }
- catch (IOException e) { e.printStackTrace(); }
- catch (ParserConfigurationException e) { e.printStackTrace(); }
- catch (SAXException e) { e.printStackTrace(); }
- catch (AmqpParseException e) { e.printStackTrace(); }
- catch (AmqpTypeMappingException e) { e.printStackTrace(); }
- catch (AmqpTemplateException e) { e.printStackTrace(); }
- catch (TargetDirectoryException e) { e.printStackTrace(); }
- catch (IllegalAccessException e) { e.printStackTrace(); }
- catch (InvocationTargetException e) { e.printStackTrace(); }
+ }
+ else
+ {
+ try
+ {
+ new Main().run(args);
+ exitCode = 0;
+ }
+ catch (IOException e) { e.printStackTrace(); }
+ catch (ParserConfigurationException e) { e.printStackTrace(); }
+ catch (SAXException e) { e.printStackTrace(); }
+ catch (AmqpParseException e) { e.printStackTrace(); }
+ catch (AmqpTypeMappingException e) { e.printStackTrace(); }
+ catch (AmqpTemplateException e) { e.printStackTrace(); }
+ catch (TargetDirectoryException e) { e.printStackTrace(); }
+ catch (IllegalAccessException e) { e.printStackTrace(); }
+ catch (InvocationTargetException e) { e.printStackTrace(); }
+ }
+ System.exit(exitCode);
}
public static void usage()
@@ -287,7 +298,6 @@ public class Main
System.out.println(" Defaults: \"" + defaultCppTemplateDir + "\" for C++;");
System.out.println(" \"" + defaultJavaTemplateDir + "\" for java.");
System.out.println(" XMLfile is a space-separated list of AMQP XML files to be parsed.");
- System.exit(0);
}
public static String ListTemplateList(File[] list)