public static void main ( String [ ] args ) throws Exception { Logger logger = Logger . getLogger ( "MASReader.main" ) ; Properties beastConfigProperties = new Properties ( ) ; String beastConfigPropertiesFile = null ; if ( args . length > 0 ) { beastConfigPropertiesFile = args [ 0 ] ; beastConfigProperties . load ( new FileInputStream ( beastConfigPropertiesFile ) ) ; logger . info ( "Properties file selected -> " + beastConfigPropertiesFile ) ; } else { logger . severe ( "No properties file found. Set the path of properties file as argument." ) ; throw new BeastException ( "No properties file found. Set the path of properties file as argument." ) ; } String loggerConfigPropertiesFile ; if ( args . length > 1 ) { Properties loggerConfigProperties = new Properties ( ) ; loggerConfigPropertiesFile = args [ 1 ] ; try { FileInputStream loggerConfigFile = new FileInputStream ( loggerConfigPropertiesFile ) ; loggerConfigProperties . load ( loggerConfigFile ) ; LogManager . getLogManager ( ) . readConfiguration ( loggerConfigFile ) ; logger . info ( "Logging properties configured successfully. Logger config file: " + loggerConfigPropertiesFile ) ; } catch ( IOException ex ) { logger . warning ( "WARNING: Could not open configuration file" ) ; logger . warning ( "WARNING: Logging not configured (console output only)" ) ; } } else { loggerConfigPropertiesFile = null ; } MASReader . generateJavaFiles ( beastConfigProperties . getProperty ( "requirementsFolder" ) , "\"" + beastConfigProperties . getProperty ( "MASPlatform" ) + "\"" , beastConfigProperties . getProperty ( "srcTestRootFolder" ) , beastConfigProperties . getProperty ( "storiesPackage" ) , beastConfigProperties . getProperty ( "caseManagerPackage" ) , loggerConfigPropertiesFile , beastConfigProperties . getProperty ( "specificationPhase" ) ) ; }
Main method to start reading the plain text given by the client