From e54695ddba6941d1bda23631e7a70cf2cc0a3df2 Mon Sep 17 00:00:00 2001 From: Kenney Westerhof Date: Fri, 22 Jun 2007 23:54:45 +0000 Subject: [PATCH] Move osgi bundle manifest generation to osgi profile. The generated manifests are incorrect, for instance, maven-project's manifest misses the package-import org.apache.maven.artifact.transform which should come from maven-artifact CacheAware*.java. Further, this doesn't work in an osgi environment, since if each artifact is a bundle, then maven-embedder must have access to all component.xml files in all maven core artifacts, and in all dependencies (which aren't bundles but that can be fixed). Osgi import/exports for packages work for resources too, but META-INF/ isn't a package so this doesn't work. This may work with 'Require-Bundle' (it does in my implementation although i don't think i follow the spec entirely ;)). The next problem you get is classcasts for wagon (httplightweightwagon). This has to be included in a bundle too and get proper exports. The same goes for all other dependencies (plexus-*). Maven and plexus are not suited for osgi yet - too much changing is required in both the metadata structure, the code, and all dependencies and/or packaging and binary inclusion of dependencies to make this work. The best bet is to use the one-artifact embedder. git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@549982 13f79535-47bb-0310-9956-ffa450edef68 --- pom.xml | 57 +++++++++++++++++++++++++++++++++------------------------ 1 file changed, 33 insertions(+), 24 deletions(-) diff --git a/pom.xml b/pom.xml index 43ca3745ca..2a8e45204f 100644 --- a/pom.xml +++ b/pom.xml @@ -103,30 +103,6 @@ under the License. - - - org.apache.felix - maven-bundle-plugin - 0.9.0-incubator-SNAPSHOT - - - - manifest - - - - - - - org.apache.maven.plugins - maven-jar-plugin - 2.1 - - - ${project.build.outputDirectory}/META-INF/MANIFEST.MF - - - maven-surefire-plugin 2.3 @@ -258,6 +234,39 @@ under the License. + + osgi + + + + + + org.apache.felix + maven-bundle-plugin + 0.9.0-incubator-SNAPSHOT + + + + manifest + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 2.1 + + + ${project.build.outputDirectory}/META-INF/MANIFEST.MF + + + + + + + release