diff --git a/cots/org.apache.commons.cli/build.properties b/cots/org.apache.commons.cli/build.properties index 59ab189d49..c727814ecb 100644 --- a/cots/org.apache.commons.cli/build.properties +++ b/cots/org.apache.commons.cli/build.properties @@ -1,3 +1,2 @@ -output.. = bin/ bin.includes = META-INF/,\ commons-cli-1.2.jar diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/plugin-deploy.groovy b/edexOsgi/com.raytheon.edex.plugin.gfe/plugin-deploy.groovy new file mode 100644 index 0000000000..914cc42c9f --- /dev/null +++ b/edexOsgi/com.raytheon.edex.plugin.gfe/plugin-deploy.groovy @@ -0,0 +1,91 @@ +import groovy.util.logging.* + +@Log +class GFESuiteDeployer +{ + private static final String gfesuite_svcbackup_plugin="com.raytheon.uf.tools.gfesuite.servicebackup" + private String gfesuitePluginPath + + public GFESuiteDeployer(String pluginPath) + { + this.init(pluginPath) + } + + private void init(String pluginPath) + { + // Since both plugins are within the same repository sub-directory, + // they will always be found at the same location in the directory + // tree. + String containingDirectory = new File(pluginPath).getParent() + this.gfesuitePluginPath = containingDirectory + File.separator + + gfesuite_svcbackup_plugin + } + + public void deployGFESuite(String edexRoot) + { + if (new File(this.gfesuitePluginPath).exists() == false) + { + log.log(java.util.logging.Level.WARNING, + "Unable to find GFESuite ServiceBackup plugin!") + return + } + + String containingDirectory = new File(edexRoot).getParent() + final String destinationDirectory = containingDirectory + + File.separator + "GFESuite" + + log.info("Deploying GFESuite ...") + + new File(destinationDirectory).mkdirs() + AntBuilder ant = new AntBuilder() + ant.project.getBuildListeners().firstElement().setMessageOutputLevel(0) + + final String svcBackupDirectory = this.gfesuitePluginPath + File.separator + + "svcBackup" + ant.copy( todir : destinationDirectory, overwrite : true ) + { + fileset( dir : svcBackupDirectory ) + } + + final List sharedDirectories = [ "ISC", "ATBL" ] + final String productsDirectory = destinationDirectory + + File.separator + "products" + for (String sharedDirectory : sharedDirectories) + { + new File(productsDirectory + File.separator + + sharedDirectory).mkdirs() + } + + // add executable permissions to files in bin + final String svcBackupBin = svcBackupDirectory + File.separator + "bin" + final String gfesuiteBin = destinationDirectory + File.separator + "bin" + for (File binFile : new File(svcBackupBin).listFiles()) + { + File gfesuiteBinFile = new File(gfesuiteBin + File.separator + + binFile.getName()) + this.setPermissions777(gfesuiteBinFile) + } + + // add executable permissions to files in ServiceBackup/scripts + final String scriptsDir = svcBackupDirectory + File.separator + + "ServiceBackup" + File.separator + "scripts" + final String gfesuiteScripts = destinationDirectory + File.separator + + "ServiceBackup" + File.separator + "scripts" + for (File binFile : new File(scriptsDir).listFiles()) + { + File gfesuiteScript = new File(gfesuiteScripts + File.separator + + binFile.getName()) + this.setPermissions777(gfesuiteScript) + } + } + + private setPermissions777(File file) + { + file.setWritable(true, false) + file.setReadable(true, false) + file.setExecutable(true, false) + } +} + +GFESuiteDeployer gfesuiteDeployer = new GFESuiteDeployer(__PLUGIN_PATH__) +gfesuiteDeployer.deployGFESuite(__EDEX_ROOT__) \ No newline at end of file diff --git a/edexOsgi/com.raytheon.uf.common.json/build.properties b/edexOsgi/com.raytheon.uf.common.json/build.properties index d36a5ef6ca..eed92de664 100644 --- a/edexOsgi/com.raytheon.uf.common.json/build.properties +++ b/edexOsgi/com.raytheon.uf.common.json/build.properties @@ -1,4 +1,5 @@ source.. = src/ +output.. = bin/ bin.includes = .project,\ component-deploy.xml,\ .classpath,\ diff --git a/edexOsgi/com.raytheon.uf.edex.datadelivery.service/build.properties b/edexOsgi/com.raytheon.uf.edex.datadelivery.service/build.properties index 115a02a034..5791d48d5f 100644 --- a/edexOsgi/com.raytheon.uf.edex.datadelivery.service/build.properties +++ b/edexOsgi/com.raytheon.uf.edex.datadelivery.service/build.properties @@ -1,4 +1,5 @@ source.. = src/ +output.. = bin/ bin.includes = META-INF/,\ .,\ res/ diff --git a/edexOsgi/com.raytheon.uf.edex.ogc.common/build.properties b/edexOsgi/com.raytheon.uf.edex.ogc.common/build.properties index e016089273..2377de7022 100644 --- a/edexOsgi/com.raytheon.uf.edex.ogc.common/build.properties +++ b/edexOsgi/com.raytheon.uf.edex.ogc.common/build.properties @@ -1,4 +1,5 @@ source.. = src/ +output.. = bin/ bin.includes = .project,\ .classpath,\ META-INF/,\