01: /*
02: * Copyright (c) 2002-2003 by OpenSymphony
03: * All rights reserved.
04: */
05: package com.opensymphony.webwork.views.jasperreports;
06:
07: import net.sf.jasperreports.engine.JRException;
08: import net.sf.jasperreports.engine.JasperCompileManager;
09:
10: /**
11: * Ported to WebWork2:
12: *
13: * @author <a href="hermanns@aixcept.de">Rainer Hermanns</a>
14: * @version $Id: CompileReport.java 2335 2006-03-08 18:09:29Z rainerh $
15: */
16: public class CompileReport {
17:
18: public static void main(String[] args) {
19: if (args.length < 1) {
20: System.out
21: .println("Please supply the name of the report(s) source to compile.");
22: System.exit(-1);
23: }
24:
25: try {
26: for (int i = 0; i < args.length; i++) {
27: System.out.println("JasperReports Compiling: "
28: + args[i]);
29: JasperCompileManager.compileReportToFile(args[i]);
30: }
31: } catch (JRException e) {
32: e.printStackTrace();
33: System.exit(-1);
34: }
35:
36: System.exit(0);
37: }
38: }
|