def install_cas_war(self):
        if self.installCas:
            casWar = 'oxcas.war'
            distCasPath = '%s/%s' % (self.distFolder, casWar)
            tmpCasDir = '%s/tmp_cas' % self.distFolder

            self.logIt("Unpacking %s..." % casWar)
            self.removeDirs(tmpCasDir)
            self.createDirs(tmpCasDir)

            self.run([self.jarCommand,
                      'xf',
                      distCasPath], tmpCasDir)

            self.logIt("Configuring CAS...")
            casTemplatePropertiesPath = '%s/cas.properties' % self.outputFolder
            casWarPropertiesPath = '%s/WEB-INF/cas.properties' % tmpCasDir

            self.copyFile(casTemplatePropertiesPath, casWarPropertiesPath)

            self.logIt("Generating cas.war...")
            self.run([self.jarCommand,
                      'cmf',
                      'tmp_cas/META-INF/MANIFEST.MF',
                      'cas.war',
                      '-C',
                      '%s/' % tmpCasDir,
                      '.'], self.distFolder)

            self.logIt("Copying cas.war into tomcat webapps folder...")
            self.copyFile('%s/cas.war' % self.distFolder, self.tomcatWebAppFolder)

            self.removeDirs(tmpCasDir)
            self.removeFile('%s/cas.war' % self.distFolder)
dataset/ETHPy150Open GluuFederation/community-edition-setup/setup.py/Setup.install_cas_war/original