Issue #1924 - standardize build.properties files
Former-commit-id:ab045a7ce1
[formerly874c93146c
] [formerlycebb5f8d5f
] [formerlyec78ee1838
[formerlycebb5f8d5f
[formerly 739e93988616fefbb235ab3e023b7a7e0394b5e9]]] Former-commit-id:ec78ee1838
Former-commit-id: 97bb0430a3e680ec6666816e15471172d37a62ca [formerlyc5c6d1d4d4
] Former-commit-id:78c52ebb5a
This commit is contained in:
parent
493a8edd2a
commit
f951c5d78a
5 changed files with 94 additions and 1 deletions
|
@ -1,3 +1,2 @@
|
|||
output.. = bin/
|
||||
bin.includes = META-INF/,\
|
||||
commons-cli-1.2.jar
|
||||
|
|
91
edexOsgi/com.raytheon.edex.plugin.gfe/plugin-deploy.groovy
Normal file
91
edexOsgi/com.raytheon.edex.plugin.gfe/plugin-deploy.groovy
Normal file
|
@ -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__)
|
|
@ -1,4 +1,5 @@
|
|||
source.. = src/
|
||||
output.. = bin/
|
||||
bin.includes = .project,\
|
||||
component-deploy.xml,\
|
||||
.classpath,\
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
source.. = src/
|
||||
output.. = bin/
|
||||
bin.includes = META-INF/,\
|
||||
.,\
|
||||
res/
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
source.. = src/
|
||||
output.. = bin/
|
||||
bin.includes = .project,\
|
||||
.classpath,\
|
||||
META-INF/,\
|
||||
|
|
Loading…
Add table
Reference in a new issue