}
File fileToInstall = new File(srcPathOfFileToInstall, fileMeta.getName());
if (!fileToInstall.exists())
{
throw new PackageManagerException(fileToInstall.getAbsolutePath() + " does not exist, package: " + pkgCtx
+ " being installed from " + pkgCtx.getPackageRoot()
+ " is probably corrupt!");
}
if (fileMeta.getDestPath() == null)
{
throw new PackageManagerException("File " + fileMeta.getName() + " in package: " + pkgCtx
+ " does not specify a destination");
}
String destServerHome = this.packageMgrContext.getJBossServerHome();
File locationToInstall = new File(destServerHome, fileMeta.getDestPath());
// TODO: Provide an option on <file> to allow for creating missing destination folders
// Till then just throw an exception if dest-path is not actually available
if (!locationToInstall.exists() || !locationToInstall.isDirectory())
{
throw new PackageManagerException("dest-path " + locationToInstall.getAbsolutePath() + " for file: "
+ fileMeta.getName() + " in package: " + pkgCtx
+ " is either not present or is not a directory");
}
try
{