1 /*
2 * Created on 2003-5-23 15:24:19 by joel guo
3 *
4 * vTradEx Information Technology Inc.
5 */
6 package com.cyclops.albumbuilder;
7 import java.io.File;
8 import java.io.FileInputStream;
9
10 import org.apache.commons.configuration.ConfigurationConverter;
11 import org.apache.commons.configuration.PropertiesConfiguration;
12 import org.apache.log4j.PropertyConfigurator;
13 import org.apache.velocity.app.Velocity;
14 /***
15 * TODO Still need a loader to invode AlbumBuilder here, not just use a main method
16 * <big><font face="黑体">惩前毖后,治病救人</font></big>
17 *
18 * @author <a href="mailto:joeblack.guo@vtradex.com">joel guo</a>
19 * @company <a href="http://www.vtradex.com">vTradEx</a>
20 * @since 2003-5-23 15:24:19
21 */
22 public class Main {
23 /*** Method main() in class Main
24 * @param args Command args
25 * @throws Exception Any thing could happen here
26 */
27 public static void main(String[] args) throws Exception {
28 new File("target/logs/").mkdirs();
29 PropertyConfigurator.configure("project.properties");
30 PropertiesConfiguration pc = new PropertiesConfiguration();
31 pc.load(new FileInputStream("project.properties"));
32 /*
33 Properties additionalProperties = cli.getAdditionalProperties();
34 for (Iterator i = additionalProperties.keySet().iterator();
35 i.hasNext();
36 ) {
37 String key = (String) i.next();
38 pc.setProperty(key, additionalProperties.getProperty(key));
39 }*/
40 Velocity.init(
41 ConfigurationConverter.getProperties(pc.subset("velocity")));
42 ComponentLoader albumLoader =
43 new ComponentLoader(pc.subset("albumbuilder"));
44 AlbumBuilder ab = new AlbumBuilder();
45 for (int i = 0; i < args.length; i++) {
46 String arg = args[i];
47 albumLoader.executeComponent(arg);
48 }
49 }
50 }
This page was automatically generated by Maven