"Path to deploy (deployDirectory) may not reference the parent directory. Path specified: "
+ deployDirectory);
}
// Perform the deployment
FileContentDelegate deployer = new FileContentDelegate(new File(getConfigurationPath(), deployDirectory),
"", details.getPackageTypeName());
PropertySimple zipProperty = deployTimeConfiguration.getSimple("deployZipped");
if (zipProperty != null && zipProperty.getBooleanValue() != null) {
boolean zip = zipProperty.getBooleanValue();
File tempDir = resourceContext.getTemporaryDirectory();
File tempFile = new File(tempDir.getAbsolutePath(), "esb.bin");
OutputStream osForTempDir = new BufferedOutputStream(new FileOutputStream(tempFile));
contentContext = resourceContext.getContentContext();
ContentServices contentServices = contentContext.getContentServices();
contentServices
.downloadPackageBitsForChildResource(contentContext, resourceTypeName, key, osForTempDir);
osForTempDir.close();
InputStream isForTempDir = new BufferedInputStream(new FileInputStream(tempFile));
deployer.createContent(details, isForTempDir, !zip, false);
// Resource key should match the following:
// ESB: jboss.esb:deployment=jbossesb.esb
String resourceKey;