Is it possible to use the maven-bundle-plugin on a WAR project?

View: Old framed views
9 Messages — Rating Filter:   Alert me  
mraible
Is it possible to use the maven-bundle-plugin on a WAR project?
Reply More
Rate this Message:
Reply to author
Print
Show in thread view
Show in list view (by date)
Permalink
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>?

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
Niall Pemberton-2
Re: Is it possible to use the maven-bundle-plugin on a WAR project?
Reply More
Rate this Message:
Reply to author
Print
Show in thread view
Show in list view (by date)
Permalink
On Fri, Apr 18, 2008 at 4:07 PM, mraible <matt@...> 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: users-unsubscribe@...
>  For additional commands, e-mail: users-help@...
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...

Niall Pemberton-2
Re: Is it possible to use the maven-bundle-plugin on a WAR project?
Reply More
Rate this Message:
Reply to author
Print
Show in thread view
Show in list view (by date)
Permalink
On Fri, Apr 18, 2008 at 5:34 PM, Niall Pemberton
<niall.pemberton@...> wrote:

> On Fri, Apr 18, 2008 at 4:07 PM, mraible <matt@...> 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".

See http://tinyurl.com/6kaqyy

>  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: users-unsubscribe@...
>  >  For additional commands, e-mail: users-help@...
>  >
>  >
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...

Stuart McCulloch-3
Re: Is it possible to use the maven-bundle-plugin on a WAR project?
Reply More
Rate this Message:
Reply to author
Print
Show in thread view
Show in list view (by date)
Permalink
On 19/04/2008, Niall Pemberton <niall.pemberton@...> wrote:

>
> On Fri, Apr 18, 2008 at 4:07 PM, mraible <matt@...> 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".


btw, if you want to avoid manually setting the Bundle-ClassPath then you
could
use something like the following to match the bnd generated classpath
against
the actual WAR content:

  <configuration>
    <instructions>

<Embed-Dependency>*;scope=compile|runtime;inline=false</Embed-Dependency>
      <Embed-Directory>WEB-INF/lib</Embed-Directory>
      <Embed-Transitive>true</Embed-Transitive>
    </instructions>
  </configuration>

which will mimic the maven WAR layout of
"WEB-INF/lib/artifactId-version.jar"

HTH

--
Cheers, Stuart
mraible
Re: Is it possible to use the maven-bundle-plugin on a WAR project?
Reply More
Rate this Message:
Reply to author
Print
Show in thread view
Show in list view (by date)
Permalink
(This post was updated on )
Stuart McCulloch-3 wrote:
On 19/04/2008, Niall Pemberton <niall.pemberton@gmail.com> wrote:
>
> On Fri, Apr 18, 2008 at 4:07 PM, mraible <matt@raibledesigns.com> 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".


btw, if you want to avoid manually setting the Bundle-ClassPath then you
could
use something like the following to match the bnd generated classpath
against
the actual WAR content:

  <configuration>
    <instructions>

<Embed-Dependency>*;scope=compile|runtime;inline=false</Embed-Dependency>
      <Embed-Directory>WEB-INF/lib</Embed-Directory>
      <Embed-Transitive>true</Embed-Transitive>
    </instructions>
  </configuration>

which will mimic the maven WAR layout of
"WEB-INF/lib/artifactId-version.jar"

HTH

--
Cheers, Stuart
For some reason, the following doesn't work for me:

<plugin>
  <artifactId>maven-war-plugin</artifactId>
  <configuration>
    <archive>
      <!--manifestFile>src/main/webapp/META-INF/MANIFEST.MF</manifestFile-->
      <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
    </archive>
  </configuration>
</plugin>
<plugin>
  <groupId>org.apache.felix</groupId>
  <artifactId>maven-bundle-plugin</artifactId>
  <extensions>true</extensions>
  <version>1.4.0</version>
  <configuration>
    <instructions>
      <!-- bundle specific conf -->
      <Bundle-Name>${artifactId}</Bundle-Name>
      <Bundle-SymbolicName>${osgi.symbolic.name}</Bundle-SymbolicName>
      <Export-Package>${osgi.export.pkg}</Export-Package>
      <Import-Package>${osgi.import.pkg}</Import-Package>
      <Private-Package>${osgi.private.pkg}</Private-Package>
      <!-- jar entries -->
      <Embed-Dependency>*;scope=compile|runtime;inline=false</Embed-Dependency>
      <Embed-Directory>WEB-INF/lib</Embed-Directory>
      <Embed-Transitive>true</Embed-Transitive>

      <Implementation-Title>MyApp</Implementation-Title>
      <Implementation-Version>${pom.version}</Implementation-Version>
      <Implementation-Vendor>AppFuse</Implementation-Vendor>
      <Implementation-Vendor-Id>org.appfuse</Implementation-Vendor-Id>
      <!-- Spring specific entries -->
      <Spring-DM-Version>${spring.dm.version}</Spring-DM-Version>
      <Spring-Version>${spring.version}</Spring-Version>
    </instructions>
  </configuration>
  <executions>
    <execution>
      <id>bundle-manifest</id>
      <phase>process-classes</phase>
      <goals>
        <goal>manifest</goal>
      </goals>
    </execution>
  </executions>
</plugin>

The plugin looks like it's running:

[INFO] [bundle:manifest {execution: bundle-manifest}]

But no manifest is created. If I change <packaging> to jar and maven-war-plugin to maven-jar-plugin, it works fine.

Any ideas?

Here's the manifest I'm trying to auto-generate:

Manifest-Version: 1
Bundle-ManifestVersion: 2
Spring-DM-Version: 1.1.0-m2-SNAPSHOT
Spring-Version: 2.5.2
Bundle-Name: Simple OSGi War
Bundle-SymbolicName: myapp
Bundle-Classpath: .,WEB-INF/classes,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,
 org.springframework.osgi.web.context.support,
 org.springframework.context.support,
 org.springframework.web.context,
 org.springframework.web.context.support,
 org.springframework.web.servlet,
 org.springframework.web.servlet.mvc,
 org.springframework.web.servlet.mvc.support,
 org.springframework.web.servlet.view,
 org.springframework.ui,
 org.springframework.web.servlet.view.freemarker

Thanks,

Matt
Stuart McCulloch-3
Re: Is it possible to use the maven-bundle-plugin on a WAR project?
Reply More
Rate this Message:
Reply to author
Print
Show in thread view
Show in list view (by date)
Permalink
On 24/04/2008, mraible <matt@...> wrote:

>
> For some reason, the following doesn't work for me:
>
> <plugin>
>   <artifactId>maven-war-plugin</artifactId>
>   <configuration>
>     <archive>
>
>       <!--manifestFile>src/main/webapp/META-INF/MANIFEST.MF</manifestFile-->
>
>
> <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
>     </archive>
>   </configuration>
> </plugin>
> <plugin>
>   <groupId>org.apache.felix</groupId>
>   <artifactId>maven-bundle-plugin</artifactId>
>   <extensions>true</extensions>
>   <version>1.4.0</version>
>   <configuration>
>     <instructions>
>       <!-- bundle specific conf -->
>       <Bundle-Name>${artifactId}</Bundle-Name>
>       <Bundle-SymbolicName>${osgi.symbolic.name}</Bundle-SymbolicName>
>       <Export-Package>${osgi.export.pkg}</Export-Package>
>       <Import-Package>${osgi.import.pkg}</Import-Package>
>       <Private-Package>${osgi.private.pkg}</Private-Package>
>       <!-- jar entries -->
>
>
> <Embed-Dependency>*;scope=compile|runtime;inline=false</Embed-Dependency>
>       <Embed-Directory>WEB-INF/lib</Embed-Directory>
>       <Embed-Transitive>true</Embed-Transitive>
>
>
>       <Implementation-Title>MyApp</Implementation-Title>
>       <Implementation-Version>${pom.version}</Implementation-Version>
>       <Implementation-Vendor>AppFuse</Implementation-Vendor>
>       <Implementation-Vendor-Id>org.appfuse</Implementation-Vendor-Id>
>       <!-- Spring specific entries -->
>       <Spring-DM-Version>${spring.dm.version}</Spring-DM-Version>
>       <Spring-Version>${spring.version}</Spring-Version>
>     </instructions>
>   </configuration>
>   <executions>
>     <execution>
>       <id>bundle-manifest</id>
>       <phase>process-classes</phase>
>       <goals>
>         <goal>manifest</goal>
>       </goals>
>     </execution>
>   </executions>
> </plugin>
>
> The plugin looks like it's running:
>
> [INFO] [bundle:manifest {execution: bundle-manifest}]
>
> But no manifest is created.
>
> Any ideas?


yep, by default the bundleplugin ignores project types that are not bundle
or jar
(this feature was requested by people using bundleall with multi-module
builds)

a debug message was printed to show when this happened (-X) which wasn't
that useful, so in 1.4.1-SNAPSHOT I changed this to be a warning message:

  [WARNING] Ignoring project type war - supportedProjectTypes = [jar,
bundle]

you can then configure the bundleplugin supportedProjectTypes to include
war:

 <configuration>
   <supportedProjectTypes>
     <param>jar</param>
     <param>bundle</param>
     <param>war</param>
   </supportedProjectTypes>
   <instructions>
     <!-- etc... -->
   </instructions>
  </configuration>

I hope to release 1.4.1 rsn...

HTH

Here's the manifest I'm trying to auto-generate:

>
>
> Manifest-Version: 1
> Bundle-ManifestVersion: 2
>
> Spring-DM-Version: 1.1.0-m2-SNAPSHOT
> Spring-Version: 2.5.2
>
> Bundle-Name: Simple OSGi War
> Bundle-SymbolicName: myapp
>
> Bundle-Classpath: .,WEB-INF/classes,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,
>   org.springframework.osgi.web.context.support,
>   org.springframework.context.support,
>   org.springframework.web.context,
>   org.springframework.web.context.support,
>   org.springframework.web.servlet,
>   org.springframework.web.servlet.mvc,
>   org.springframework.web.servlet.mvc.support,
>   org.springframework.web.servlet.view,
>   org.springframework.ui,
>   org.springframework.web.servlet.view.freemarker
>
> Thanks,
>
> Matt
>
> --
> View this message in context:
> http://www.nabble.com/Is-it-possible-to-use-the-maven-bundle-plugin-on-a-WAR-project--tp16763483p16834883.html
>
> Sent from the Apache Felix - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@...
> For additional commands, e-mail: users-help@...
>
> --
Cheers, Stuart
mraible
Re: Is it possible to use the maven-bundle-plugin on a WAR project?
Reply More
Rate this Message:
Reply to author
Print
Show in thread view
Show in list view (by date)
Permalink

Stuart McCulloch-3 wrote:
On 24/04/2008, mraible <matt@raibledesigns.com> wrote:
>
> For some reason, the following doesn't work for me:
>
> <plugin>
>   <artifactId>maven-war-plugin</artifactId>
>   <configuration>
>     <archive>
>
>       <!--manifestFile>src/main/webapp/META-INF/MANIFEST.MF</manifestFile-->
>
>
> <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
>     </archive>
>   </configuration>
> </plugin>
> <plugin>
>   <groupId>org.apache.felix</groupId>
>   <artifactId>maven-bundle-plugin</artifactId>
>   <extensions>true</extensions>
>   <version>1.4.0</version>
>   <configuration>
>     <instructions>
>       <!-- bundle specific conf -->
>       <Bundle-Name>${artifactId}</Bundle-Name>
>       <Bundle-SymbolicName>${osgi.symbolic.name}</Bundle-SymbolicName>
>       <Export-Package>${osgi.export.pkg}</Export-Package>
>       <Import-Package>${osgi.import.pkg}</Import-Package>
>       <Private-Package>${osgi.private.pkg}</Private-Package>
>       <!-- jar entries -->
>
>
> <Embed-Dependency>*;scope=compile|runtime;inline=false</Embed-Dependency>
>       <Embed-Directory>WEB-INF/lib</Embed-Directory>
>       <Embed-Transitive>true</Embed-Transitive>
>
>
>       <Implementation-Title>MyApp</Implementation-Title>
>       <Implementation-Version>${pom.version}</Implementation-Version>
>       <Implementation-Vendor>AppFuse</Implementation-Vendor>
>       <Implementation-Vendor-Id>org.appfuse</Implementation-Vendor-Id>
>       <!-- Spring specific entries -->
>       <Spring-DM-Version>${spring.dm.version}</Spring-DM-Version>
>       <Spring-Version>${spring.version}</Spring-Version>
>     </instructions>
>   </configuration>
>   <executions>
>     <execution>
>       <id>bundle-manifest</id>
>       <phase>process-classes</phase>
>       <goals>
>         <goal>manifest</goal>
>       </goals>
>     </execution>
>   </executions>
> </plugin>
>
> The plugin looks like it's running:
>
> [INFO] [bundle:manifest {execution: bundle-manifest}]
>
> But no manifest is created.
>
> Any ideas?


yep, by default the bundleplugin ignores project types that are not bundle
or jar
(this feature was requested by people using bundleall with multi-module
builds)

a debug message was printed to show when this happened (-X) which wasn't
that useful, so in 1.4.1-SNAPSHOT I changed this to be a warning message:

  [WARNING] Ignoring project type war - supportedProjectTypes = [jar,
bundle]

you can then configure the bundleplugin supportedProjectTypes to include
war:

 <configuration>
   <supportedProjectTypes>
     jar
     bundle
     war
   </supportedProjectTypes>
   <instructions>
     <!-- etc... -->
   </instructions>
  </configuration>

I hope to release 1.4.1 rsn...

HTH

Cheers, Stuart
Is there a published SNAPSHOT of 1.4.1 that I can try? Is "rsn" this week? ;-)

Thanks,

Matt
Mike Smoot-3
Re: Is it possible to use the maven-bundle-plugin on a WAR project?
Reply More
Rate this Message:
Reply to author
Print
Show in thread view
Show in list view (by date)
Permalink
There's a snapshot here:

http://people.apache.org/maven-snapshot-repository

Although I'm not sure if contains the fix you're looking for.


Mike

On Tue, May 6, 2008 at 1:24 PM, mraible <matt@...> wrote:

>
>
>
> Stuart McCulloch-3 wrote:
> >
> > On 24/04/2008, mraible <matt@...> wrote:
> >>
> >> For some reason, the following doesn't work for me:
> >>
> >> <plugin>
> >>   <artifactId>maven-war-plugin</artifactId>
> >>   <configuration>
> >>     <archive>
> >>
> >>
> >> <!--manifestFile>src/main/webapp/META-INF/MANIFEST.MF</manifestFile-->
> >>
> >>
> >>
> <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
> >>     </archive>
> >>   </configuration>
> >> </plugin>
> >> <plugin>
> >>   <groupId>org.apache.felix</groupId>
> >>   <artifactId>maven-bundle-plugin</artifactId>
> >>   <extensions>true</extensions>
> >>   <version>1.4.0</version>
> >>   <configuration>
> >>     <instructions>
> >>       <!-- bundle specific conf -->
> >>       <Bundle-Name>${artifactId}</Bundle-Name>
> >>       <Bundle-SymbolicName>${osgi.symbolic.name}</Bundle-SymbolicName>
> >>       <Export-Package>${osgi.export.pkg}</Export-Package>
> >>       <Import-Package>${osgi.import.pkg}</Import-Package>
> >>       <Private-Package>${osgi.private.pkg}</Private-Package>
> >>       <!-- jar entries -->
> >>
> >>
> >>
> <Embed-Dependency>*;scope=compile|runtime;inline=false</Embed-Dependency>
> >>       <Embed-Directory>WEB-INF/lib</Embed-Directory>
> >>       <Embed-Transitive>true</Embed-Transitive>
> >>
> >>
> >>       <Implementation-Title>MyApp</Implementation-Title>
> >>       <Implementation-Version>${pom.version}</Implementation-Version>
> >>       <Implementation-Vendor>AppFuse</Implementation-Vendor>
> >>       <Implementation-Vendor-Id>org.appfuse</Implementation-Vendor-Id>
> >>       <!-- Spring specific entries -->
> >>       <Spring-DM-Version>${spring.dm.version}</Spring-DM-Version>
> >>       <Spring-Version>${spring.version}</Spring-Version>
> >>     </instructions>
> >>   </configuration>
> >>   <executions>
> >>     <execution>
> >>       <id>bundle-manifest</id>
> >>       <phase>process-classes</phase>
> >>       <goals>
> >>         <goal>manifest</goal>
> >>       </goals>
> >>     </execution>
> >>   </executions>
> >> </plugin>
> >>
> >> The plugin looks like it's running:
> >>
> >> [INFO] [bundle:manifest {execution: bundle-manifest}]
> >>
> >> But no manifest is created.
> >>
> >> Any ideas?
> >
> >
> > yep, by default the bundleplugin ignores project types that are not
> bundle
> > or jar
> > (this feature was requested by people using bundleall with multi-module
> > builds)
> >
> > a debug message was printed to show when this happened (-X) which wasn't
> > that useful, so in 1.4.1-SNAPSHOT I changed this to be a warning
> message:
> >
> >   [WARNING] Ignoring project type war - supportedProjectTypes = [jar,
> > bundle]
> >
> > you can then configure the bundleplugin supportedProjectTypes to include
> > war:
> >
> >  <configuration>
> >    <supportedProjectTypes>
> >      jar
> >      bundle
> >      war
> >    </supportedProjectTypes>
> >    <instructions>
> >      <!-- etc... -->
> >    </instructions>
> >   </configuration>
> >
> > I hope to release 1.4.1 rsn...
> >
> > HTH
> >
> > Cheers, Stuart
> >
> >
>
> Is there a published SNAPSHOT of 1.4.1 that I can try? Is "rsn" this week?
> ;-)
>
> Thanks,
>
> Matt
>
> --
> View this message in context:
> http://www.nabble.com/Is-it-possible-to-use-the-maven-bundle-plugin-on-a-WAR-project--tp16763483p17091071.html
> Sent from the Apache Felix - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@...
> For additional commands, e-mail: users-help@...
>
>


--
____________________________________________________________
Michael Smoot, Ph.D. Bioengineering Department
tel: 858-822-4756 University of California San Diego
Stuart McCulloch-3
Re: Is it possible to use the maven-bundle-plugin on a WAR project?
Reply More
Rate this Message:
Reply to author
Print
Show in thread view
Show in list view (by date)
Permalink
2008/5/7 mraible <matt@...>:

>
>
>
> Stuart McCulloch-3 wrote:
> >
> > On 24/04/2008, mraible <matt@...> wrote:
> >>
> >> For some reason, the following doesn't work for me:
> >>
> >> <plugin>
> >>   <artifactId>maven-war-plugin</artifactId>
> >>   <configuration>
> >>     <archive>
> >>
> >>
> >> <!--manifestFile>src/main/webapp/META-INF/MANIFEST.MF</manifestFile-->
> >>
> >>
> >>
> <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
> >>     </archive>
> >>   </configuration>
> >> </plugin>
> >> <plugin>
> >>   <groupId>org.apache.felix</groupId>
> >>   <artifactId>maven-bundle-plugin</artifactId>
> >>   <extensions>true</extensions>
> >>   <version>1.4.0</version>
> >>   <configuration>
> >>     <instructions>
> >>       <!-- bundle specific conf -->
> >>       <Bundle-Name>${artifactId}</Bundle-Name>
> >>       <Bundle-SymbolicName>${osgi.symbolic.name}</Bundle-SymbolicName>
> >>       <Export-Package>${osgi.export.pkg}</Export-Package>
> >>       <Import-Package>${osgi.import.pkg}</Import-Package>
> >>       <Private-Package>${osgi.private.pkg}</Private-Package>
> >>       <!-- jar entries -->
> >>
> >>
> >>
> <Embed-Dependency>*;scope=compile|runtime;inline=false</Embed-Dependency>
> >>       <Embed-Directory>WEB-INF/lib</Embed-Directory>
> >>       <Embed-Transitive>true</Embed-Transitive>
> >>
> >>
> >>       <Implementation-Title>MyApp</Implementation-Title>
> >>       <Implementation-Version>${pom.version}</Implementation-Version>
> >>       <Implementation-Vendor>AppFuse</Implementation-Vendor>
> >>       <Implementation-Vendor-Id>org.appfuse</Implementation-Vendor-Id>
> >>       <!-- Spring specific entries -->
> >>       <Spring-DM-Version>${spring.dm.version}</Spring-DM-Version>
> >>       <Spring-Version>${spring.version}</Spring-Version>
> >>     </instructions>
> >>   </configuration>
> >>   <executions>
> >>     <execution>
> >>       <id>bundle-manifest</id>
> >>       <phase>process-classes</phase>
> >>       <goals>
> >>         <goal>manifest</goal>
> >>       </goals>
> >>     </execution>
> >>   </executions>
> >> </plugin>
> >>
> >> The plugin looks like it's running:
> >>
> >> [INFO] [bundle:manifest {execution: bundle-manifest}]
> >>
> >> But no manifest is created.
> >>
> >> Any ideas?
> >
> >
> > yep, by default the bundleplugin ignores project types that are not
> bundle
> > or jar
> > (this feature was requested by people using bundleall with multi-module
> > builds)
> >
> > a debug message was printed to show when this happened (-X) which wasn't
> > that useful, so in 1.4.1-SNAPSHOT I changed this to be a warning
> message:
> >
> >   [WARNING] Ignoring project type war - supportedProjectTypes = [jar,
> > bundle]
> >
> > you can then configure the bundleplugin supportedProjectTypes to include
> > war:
> >
> >  <configuration>
> >    <supportedProjectTypes>
> >      jar
> >      bundle
> >      war
> >    </supportedProjectTypes>
> >    <instructions>
> >      <!-- etc... -->
> >    </instructions>
> >   </configuration>
> >
> > I hope to release 1.4.1 rsn...
> >
> > HTH
> >
> > Cheers, Stuart
> >
> >
>
> Is there a published SNAPSHOT of 1.4.1 that I can try? Is "rsn" this week?
> ;-)
>

the 1.4.1 release candidate that's currently being voted on is here:

    http://people.apache.org/~mcculls/releases/felix/maven-bundle-plugin

(maven-repository structure - the actual bundle jar is beneath org/...)

but 1.4.0 has the <supportedProjectTypes> option already, the fix in 1.4.1
is to surface the message about unsupported project types as a warning,
whereas in 1.4.0 it was just a debug message

Thanks,

>
> Matt
>
> --
> View this message in context:
> http://www.nabble.com/Is-it-possible-to-use-the-maven-bundle-plugin-on-a-WAR-project--tp16763483p17091071.html
> Sent from the Apache Felix - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@...
> For additional commands, e-mail: users-help@...
>
>


--
Cheers, Stuart