public void install ( ) throws InstallationFailedException { installDir . mkdirs ( ) ; // Write out the install options used to a properties file in the install directory try { OutputStream out = new FileOutputStream ( new File ( installDir , "install.properties" ) ) ; _opts . dump ( out ) ; out . close ( ) ; } catch ( Exception e ) { throw new InstallationFailedException ( e . getMessage ( ) , e ) ; } new FedoraHome ( _dist , _opts ) . install ( ) ; if ( ! _opts . getValue ( InstallOptions . INSTALL_TYPE ) . equals ( InstallOptions . INSTALL_CLIENT ) ) { Container container = ContainerFactory . getContainer ( _dist , _opts ) ; container . install ( ) ; container . deploy ( buildWAR ( ) ) ; if ( _opts . getBooleanValue ( InstallOptions . DEPLOY_LOCAL_SERVICES , true ) ) { deployLocalService ( container , Distribution . FOP_WAR ) ; deployLocalService ( container , Distribution . IMAGEMANIP_WAR ) ; deployLocalService ( container , Distribution . SAXON_WAR ) ; deployLocalService ( container , Distribution . DEMO_WAR ) ; } Database database = new Database ( _dist , _opts ) ; database . install ( ) ; } System . out . println ( "Installation complete." ) ; if ( ! _opts . getValue ( InstallOptions . INSTALL_TYPE ) . equals ( InstallOptions . INSTALL_CLIENT ) && _opts . getValue ( InstallOptions . SERVLET_ENGINE ) . equals ( InstallOptions . OTHER ) ) { System . out . println ( "\n" + "----------------------------------------------------------------------\n" + "The Fedora Installer cannot automatically deploy the Web ARchives to \n" + "the selected servlet container. You must deploy the WAR files \n" + "manually. You can find fedora.war plus several sample back-end \n" + "services and a demonstration object package in: \n" + "\t" + fedoraHome . getAbsolutePath ( ) + File . separator + "install" ) ; } System . out . println ( "\n" + "----------------------------------------------------------------------\n" + "Before starting Fedora, please ensure that any required environment\n" + "variables are correctly defined\n" + "\t(e.g. FEDORA_HOME, JAVA_HOME, JAVA_OPTS, CATALINA_HOME).\n" + "For more information, please consult the Installation & Configuration\n" + "Guide in the online documentation.\n" + "----------------------------------------------------------------------\n" ) ; }
Install the distribution based on the options .