On Fri, Apr 18, 2008 at 4:07 PM, mraible <[EMAIL PROTECTED]> wrote:
>
>  I have a Maven 2 project with <packaging>war</packaging>. I've hand-written a
>  MANIFEST.MF to make my WAR OSGi-aware and have proven it works with Spring
>  DM.
>
>  Now I want to get away from maintaining my MANIFEST and use the
>  maven-bundle-plugin to generate it. Is it possible to use this plugin in a
>  "war" project or does it only work with <packaging>bundle</packaging>?

You can use the bundle plugin to just generate the MANIFEST (using the
"manifest" goal) - this is what we've done in Apache Commons (thru's
the parent pom) -

http://svn.apache.org/repos/asf/commons/proper/commons-parent/tags/commons-parent-9/pom.xml

The generated OSGi manifest is then merged in by the maven-jar-plugin.
This is an alternative to using packaging "bundle".

Niall

>  Below is my hand-written MANIFEST.MF. Will the plugin be able to generate
>  this?
>
>  Manifest-Version: 1
>  Bundle-ManifestVersion: 2
>  Bundle-Name: Simple OSGi War
>  Bundle-SymbolicName: myapp
>  Bundle-Classpath:
>  
> .,WEB-INF/classes,WEB-INF/lib/commons-logging-1.1.1.jar,WEB-INF/lib/spring-beans-2.5.3.jar,WEB-INF/lib/spring-context-2.5.3.jar,WEB-INF/lib/spring-context-support-2.5.3.jar,WEB-INF/lib/spring-core-2.5.3.jar,WEB-INF/lib/spring-web-2.5.3.jar,WEB-INF/lib/spring-webmvc-2.5.3.jar,WEB-INF/lib/freemarker-2.3.12.jar,WEB-INF/lib/sitemesh-2.3.jar,WEB-INF/lib/urlrewritefilter-3.0.4.jar
>  Import-Package:
>  
> javax.servlet,javax.servlet.http,javax.servlet.resources,javax.swing.tree,javax.naming,org.w3c.dom,org.apache.commons.logging,javax.xml.parsers;resolution:=optional,org.xml.sax;resolution:=optional,org.xml.sax.helpers;resolution:=optional
>
>  Thanks,
>
>  Matt
>  --
>  View this message in context: 
> http://www.nabble.com/Is-it-possible-to-use-the-maven-bundle-plugin-on-a-WAR-project--tp16763483p16763483.html
>  Sent from the Apache Felix - Users mailing list archive at Nabble.com.
>
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to