summaryrefslogtreecommitdiffstats
path: root/maven-plugins/trunk/maven-bundle-plugin/src/main/java
diff options
context:
space:
mode:
authorantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2009-03-03 07:39:20 +0000
committerantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2009-03-03 07:39:20 +0000
commit424717567fba5e86d4ab307d4e0b73e59a1fa84e (patch)
treee7b0c95c7106a9eba9419abbb13dcf97de1ad950 /maven-plugins/trunk/maven-bundle-plugin/src/main/java
parent8559f9eb195ce43e5bd01b04efd4a07417c7a7de (diff)
TUSCANY-2872: Apply patch from Hasan Ceylan for Maven Bundle Plugin throws NPE when a dependent non-OSGI jar has no manifest
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@749550 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'maven-plugins/trunk/maven-bundle-plugin/src/main/java')
-rw-r--r--maven-plugins/trunk/maven-bundle-plugin/src/main/java/org/apache/tuscany/maven/bundle/plugin/BundleUtil.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/maven-plugins/trunk/maven-bundle-plugin/src/main/java/org/apache/tuscany/maven/bundle/plugin/BundleUtil.java b/maven-plugins/trunk/maven-bundle-plugin/src/main/java/org/apache/tuscany/maven/bundle/plugin/BundleUtil.java
index 8636ba30dc..446e407523 100644
--- a/maven-plugins/trunk/maven-bundle-plugin/src/main/java/org/apache/tuscany/maven/bundle/plugin/BundleUtil.java
+++ b/maven-plugins/trunk/maven-bundle-plugin/src/main/java/org/apache/tuscany/maven/bundle/plugin/BundleUtil.java
@@ -74,7 +74,9 @@ final class BundleUtil {
} else {
JarFile jar = new JarFile(file, false);
Manifest manifest = jar.getManifest();
- bundleName = manifest.getMainAttributes().getValue(BUNDLE_SYMBOLICNAME);
+ if (manifest != null){
+ bundleName = manifest.getMainAttributes().getValue(BUNDLE_SYMBOLICNAME);
+ }
jar.close();
}
if (bundleName == null) {