org.javagen.revgen
Class Main

java.lang.Object
  extended by org.javagen.agile.core.ioc.spring.SpringMain
      extended by org.javagen.revgen.Main

public class Main
extends org.javagen.agile.core.ioc.spring.SpringMain

Loads RevGen configuration and executes code generation pipeline using Spring framework IoC BeanFactory.

This class excepts two arguments: revgen.properties and RevGenSpringConfig.xml.

revgen.properties is meant to be the first (ie easiest) level of RevGen configuration specifying:

Any type of configuration can be achieved using RevGenSpringConfig.xml including:

Properties inputs have the following precedence from lowest to highest:

  1. Properties specified in the GlobalPropertyHolder bean within the RevGenSpringConfig.xml file.
  2. Properties specified in the external propertyFile. Note: this can be specified as a GlobalPropertyHolder property and overridden here.
  3. Properties specified in the properties instance. Note: these are usually set by the invoking tool (i.e. Maven).
This is an extremely flexible way to configure the code generator, avoiding a one-size-fits-all approach.

Author:
Richard Easterling

Field Summary
 
Fields inherited from class org.javagen.agile.core.ioc.spring.SpringMain
beanFactory, configFile, DEFAULT_CONFIG_FILE, DEFAULT_CONFIGURER_BEAN_ID, DEFAULT_PIPELINE_BEAN_ID, DEFAULT_ROOT_BEAN_NAME_ID, DEFAULT_TEMPLATE_GENERATOR_BEAN_ID, properties, propertyFile, startModelBeanId
 
Constructor Summary
Main()
           
 
Method Summary
static void main(String[] args)
          Loads and runs RevGen using Spring configuration file.
 
Methods inherited from class org.javagen.agile.core.ioc.spring.SpringMain
getBean, getBeanFactory, getConfigFile, getConfigurerBeanId, getPipelineBeanId, getStartModelBeanId, runPipeline, setArgs, setConfigFile, setProperties, setPropertyFile, setStartModelBeanId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Main

public Main()
Method Detail

main

public static void main(String[] args)
                 throws Exception
Loads and runs RevGen using Spring configuration file. RevGen is started by invoking the pipeline bean.

Parameters:
args - takes an optional Spring XML configuration file location and/or a properties file. Files can be any valid URL or classpath location. File types are recognized by their extension, names and order are not important. Here are some valid examples:
  • file:src/revgen/RevGenSpringConfig.xml
  • classpath:RevGenSpringConfig.xml
  • file:src/revgen/revgen.properties
  • classpath:revgen.properties
Throws:
Exception


Copyright 2006-2006-2007 Outsource Cafe Inc.. All Rights Reserved.