From 8d8e068dde89a44c2428835f5be1df6463ab3f02 Mon Sep 17 00:00:00 2001 From: rfeng Date: Thu, 28 May 2009 16:47:53 +0000 Subject: Tolerate the non-existence of META-INF/MANIFEST.MF git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@779663 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/tuscany/sca/node/equinox/launcher/NodeLauncherUtil.java | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'java/sca/modules') diff --git a/java/sca/modules/node-launcher-equinox/src/main/java/org/apache/tuscany/sca/node/equinox/launcher/NodeLauncherUtil.java b/java/sca/modules/node-launcher-equinox/src/main/java/org/apache/tuscany/sca/node/equinox/launcher/NodeLauncherUtil.java index d51fd0a278..5e7d0c72ad 100644 --- a/java/sca/modules/node-launcher-equinox/src/main/java/org/apache/tuscany/sca/node/equinox/launcher/NodeLauncherUtil.java +++ b/java/sca/modules/node-launcher-equinox/src/main/java/org/apache/tuscany/sca/node/equinox/launcher/NodeLauncherUtil.java @@ -598,12 +598,18 @@ final class NodeLauncherUtil { */ static void fixupBundle(String location) throws BundleException, IOException { File target = file(new URL(location)); + if (!target.exists()) { + return; + } location = target.toURI().toString(); // For development mode, copy the MANIFEST.MF file to the bundle location as it's // initially outside of target/classes, at the root of the project. if (location.endsWith("/target/classes/")) { File targetManifest = new File(target, "META-INF/MANIFEST.MF"); + if (!targetManifest.isFile()) { + return; + } File sourceManifest = new File(target.getParentFile().getParentFile(), "META-INF/MANIFEST.MF"); targetManifest.getParentFile().mkdirs(); OutputStream os = new FileOutputStream(targetManifest); -- cgit v1.2.3