mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Can now read a MANIFEST from the file system. e.g. from an exploded share.war using inputstream
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@42834 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -109,9 +109,12 @@ public class WarHelperImpl implements WarHelper
|
||||
* @throws ModuleManagementToolException
|
||||
*/
|
||||
protected String findManifestArtibute(TFile war, String attributeName) throws ModuleManagementToolException {
|
||||
|
||||
InputStream is = null;
|
||||
|
||||
try
|
||||
{
|
||||
InputStream is = new TFileInputStream(war+MANIFEST_FILE);
|
||||
is = new TFileInputStream(war+MANIFEST_FILE);
|
||||
Manifest manifest = new Manifest(is);
|
||||
Attributes attribs = manifest.getMainAttributes();
|
||||
return attribs.getValue(attributeName);
|
||||
@@ -120,6 +123,13 @@ public class WarHelperImpl implements WarHelper
|
||||
{
|
||||
throw new ModuleManagementToolException("Unabled to read a manifest for the war file: "+ war);
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (is != null)
|
||||
{
|
||||
try { is.close(); } catch (Throwable e ) {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user