Author: antelder
Date: Tue Mar 3 07:39:20 2009
New Revision: 749550
URL: http://svn.apache.org/viewvc?rev=749550&view=rev
Log:
TUSCANY-2872: Apply patch from Hasan Ceylan for Maven Bundle Plugin throws NPE
when a dependent non-OSGI jar has no manifest
Modified:
tuscany/maven-plugins/trunk/maven-bundle-plugin/src/main/java/org/apache/tuscany/maven/bundle/plugin/BundleUtil.java
Modified:
tuscany/maven-plugins/trunk/maven-bundle-plugin/src/main/java/org/apache/tuscany/maven/bundle/plugin/BundleUtil.java
URL:
http://svn.apache.org/viewvc/tuscany/maven-plugins/trunk/maven-bundle-plugin/src/main/java/org/apache/tuscany/maven/bundle/plugin/BundleUtil.java?rev=749550&r1=749549&r2=749550&view=diff
==============================================================================
---
tuscany/maven-plugins/trunk/maven-bundle-plugin/src/main/java/org/apache/tuscany/maven/bundle/plugin/BundleUtil.java
(original)
+++
tuscany/maven-plugins/trunk/maven-bundle-plugin/src/main/java/org/apache/tuscany/maven/bundle/plugin/BundleUtil.java
Tue Mar 3 07:39:20 2009
@@ -74,7 +74,9 @@
} 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) {