diff options
author | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2009-07-31 16:48:12 +0000 |
---|---|---|
committer | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2009-07-31 16:48:12 +0000 |
commit | 6652222bed88ba16aa01fb848b4ab688d98f080e (patch) | |
tree | eefe7c9698a3138ddf7d1db98fa096237f2ab7b9 /maven-plugins/trunk/maven-bundle-plugin/src/main | |
parent | 470c2b1c67c73ddaa2e74b91e045d6c8b1835427 (diff) |
Check the partial attr to decide if the bundle needs to be required
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@799657 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'maven-plugins/trunk/maven-bundle-plugin/src/main')
2 files changed, 3 insertions, 2 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 c82e10a928..6f7f6d245c 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 @@ -60,6 +60,7 @@ import org.osgi.framework.Version; * @version $Rev$ $Date$ */ final class BundleUtil { + static final String META_INF_SERVICES = "META-INF.services;partial=true;mandatory:=partial"; private final static Logger logger = Logger.getLogger(BundleUtil.class.getName()); /** * Returns the name of a bundle, or null if the given file is not a bundle. @@ -321,7 +322,7 @@ final class BundleUtil { String entryName = entry.getName(); // Export split packages for META-INF/services if(entryName.startsWith("META-INF/services/")) { - packages.add("META-INF.services" + ";partial=true;mandatory:=partial"); + packages.add(META_INF_SERVICES); } if (!entry.isDirectory() && entryName != null && entryName.length() > 0 diff --git a/maven-plugins/trunk/maven-bundle-plugin/src/main/java/org/apache/tuscany/maven/bundle/plugin/ModuleBundlesBuildMojo.java b/maven-plugins/trunk/maven-bundle-plugin/src/main/java/org/apache/tuscany/maven/bundle/plugin/ModuleBundlesBuildMojo.java index 2bf6c1bdeb..e5d88f5f2e 100644 --- a/maven-plugins/trunk/maven-bundle-plugin/src/main/java/org/apache/tuscany/maven/bundle/plugin/ModuleBundlesBuildMojo.java +++ b/maven-plugins/trunk/maven-bundle-plugin/src/main/java/org/apache/tuscany/maven/bundle/plugin/ModuleBundlesBuildMojo.java @@ -689,7 +689,7 @@ public class ModuleBundlesBuildMojo extends AbstractMojo { private static boolean isServiceProvider(Manifest mf) { if (mf != null) { String export = (String)mf.getMainAttributes().getValue(Constants.EXPORT_PACKAGE); - if (export != null && export.contains("META-INF.services")) { + if (export != null && export.contains(BundleUtil.META_INF_SERVICES)) { return true; } } |