From 6652222bed88ba16aa01fb848b4ab688d98f080e Mon Sep 17 00:00:00 2001 From: rfeng Date: Fri, 31 Jul 2009 16:48:12 +0000 Subject: 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 --- .../main/java/org/apache/tuscany/maven/bundle/plugin/BundleUtil.java | 3 ++- .../org/apache/tuscany/maven/bundle/plugin/ModuleBundlesBuildMojo.java | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'maven-plugins') 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; } } -- cgit v1.2.3