Author: rfeng
Date: Thu May 28 16:47:53 2009
New Revision: 779663
URL: http://svn.apache.org/viewvc?rev=779663&view=rev
Log:
Tolerate the non-existence of META-INF/MANIFEST.MF
Modified:
tuscany/java/sca/modules/node-launcher-equinox/src/main/java/org/apache/tuscany/sca/node/equinox/launcher/NodeLauncherUtil.java
Modified:
tuscany/java/sca/modules/node-launcher-equinox/src/main/java/org/apache/tuscany/sca/node/equinox/launcher/NodeLauncherUtil.java
URL:
http://svn.apache.org/viewvc/tuscany/java/sca/modules/node-launcher-equinox/src/main/java/org/apache/tuscany/sca/node/equinox/launcher/NodeLauncherUtil.java?rev=779663&r1=779662&r2=779663&view=diff
==============================================================================
---
tuscany/java/sca/modules/node-launcher-equinox/src/main/java/org/apache/tuscany/sca/node/equinox/launcher/NodeLauncherUtil.java
(original)
+++
tuscany/java/sca/modules/node-launcher-equinox/src/main/java/org/apache/tuscany/sca/node/equinox/launcher/NodeLauncherUtil.java
Thu May 28 16:47:53 2009
@@ -598,12 +598,18 @@
*/
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);