You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Jaime Osgi <jj...@gmail.com> on 2007/12/13 20:47:34 UTC

maven-bundle-plugin problem

I've just started with this maven plugin to develop OSGi bundles, but I
cannot make it work.
I've followed this document:
http://cwiki.apache.org/confluence/display/FELIX/Maven+Bundle+Plugin+%28BND%29

Whenever I include: <packaging>bundle</packaging> in the pom.xml, the build
plan is empty and it doesn't do anything (although the build says to be
successful). If I replace it by: <packaging>jar</packaging> the JAR file is
created (although with the typical manifest file that is useless for OSGi).

This is the pom.xml that I've used for a very simple example:

=======================================================
<?xml version="1.0" encoding="UTF-8"?><project>
  <modelVersion>4.0.0</modelVersion>
  <groupId>PruebaMvn</groupId>
  <artifactId>PruebaMvn</artifactId>
  <packaging>bundle</packaging>
  <name>Prueba de OSGi Maven</name>
  <version>0.0.1-SNAPSHOT</version>
  <description></description>
  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.4</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.osgi</groupId>
      <artifactId>osgi_R4_core</artifactId>
      <version>1.0</version>
    </dependency>
  </dependencies>
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <version>1.0.0</version>
        <extensions>true</extensions>
        <configuration>
          <instructions>
            <Export-Package>prueba.api</Export-Package>
            <Private-Package>prueba.impl</Private-Package>
            <Bundle-Activator>prueba.impl.PruebaActivator</Bundle-Activator>
          </instructions>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>
=======================================================

And this is the maven output:

=======================================================
[DEBUG] Reading global settings from: E:\java\apache-
maven-2.0.8\conf\settings.xml
[DEBUG] Reading user settings from: null
[DEBUG] Settings file is null. Returning null.
[DEBUG] Reading global settings from: E:\java\apache-
maven-2.0.8\conf\settings.xml
[DEBUG] Reading user settings from: null
[DEBUG] Settings file is null. Returning null.
[DEBUG] Pre-scanning POM lineage of:
E:\java\eclipse_new\eclipse\pruebaMvn\PruebaMvn\pom.xml for build
extensions.
[DEBUG] Building model-lineage for:
E:\java\eclipse_new\eclipse\pruebaMvn\PruebaMvn\pom.xml to pre-scan for
extensions.
[DEBUG] Checking for external profiles in:
E:\java\eclipse_new\eclipse\pruebaMvn\profiles.xml
[DEBUG] Checking: PruebaMvn:PruebaMvn:bundle:0.0.1-SNAPSHOT for extensions.
(It has 0 modules.)
[DEBUG] Basedir is: E:\java\eclipse_new\eclipse\pruebaMvn\PruebaMvn
[DEBUG] Finished pre-scanning:
E:\java\eclipse_new\eclipse\pruebaMvn\PruebaMvn\pom.xml for build
extensions.
[DEBUG] Building profile manager for model: [inherited]:null:jar:[inherited]
with pom file: E:\java\eclipse_new\eclipse\pruebaMvn\PruebaMvn\pom.xml
[DEBUG] Checking for external profiles in:
E:\java\eclipse_new\eclipse\pruebaMvn\PruebaMvn\profiles.xml
[DEBUG] Checking for external profiles in:
E:\java\eclipse_new\eclipse\pruebaMvn\PruebaMvn\profiles.xml
[DEBUG] Building profile manager for model: PruebaMvn:PruebaMvn:bundle:
0.0.1-SNAPSHOT with pom file:
E:\java\eclipse_new\eclipse\pruebaMvn\PruebaMvn\pom.xml
[DEBUG] Checking for external profiles in:
E:\java\eclipse_new\eclipse\pruebaMvn\PruebaMvn\profiles.xml
[DEBUG] Building profile manager for model: PruebaMvn:PruebaMvn:bundle:
0.0.1-SNAPSHOT with external profile manager including profiles: {}
[INFO] Scanning for projects...
[INFO]
----------------------------------------------------------------------------
[INFO] Building Prueba de OSGi Maven
[INFO]    task-segment: [install]
[INFO]
----------------------------------------------------------------------------
[DEBUG]

Our build plan is:



[INFO]
----------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL PruebaMvn:PruebaMvn:bundle:0.0.1-SNAPSHOT (
task-segment: [install] )
[INFO]
----------------------------------------------------------------------------
[INFO] Total time: 0 second
[INFO] Finished at: Thu Dec 13 20:35:02 CET 2007
[INFO] Memory 2M/4M
[INFO]
----------------------------------------------------------------------------
=======================================================


Thanks in advance,
Jaime

Re: maven-bundle-plugin problem

Posted by Jaime Osgi <jj...@gmail.com>.
Thank you very much for your support.

I've just created the issue at JIRA:
https://issues.apache.org/jira/browse/FELIX-436


2007/12/14, Stuart McCulloch <st...@jayway.net>:
>
> On 14/12/2007, Jaime Osgi <jj...@gmail.com> wrote:
> >
> > Thank you for your suggestion.
> >
> > I have tested Q4E plugin. I liked Q4E more than M2Eclipse.
> >
> > However, the results are exactly the same. If I execute the "Maven
> bundle
> > plugin" from console, it works. If I execute it from Eclipse, it fails.
>
>
> righto, could you raise an issue over at JIRA:
>
>    https://issues.apache.org/jira/browse/FELIX/component/12311143
>
> as this sounds like something we should fix :)
>
> BR,
> > Jorge
> >
> > 2007/12/14, Stuart McCulloch <st...@jayway.net>:
> > >
> > > On 14/12/2007, Jaime Osgi <jj...@gmail.com> wrote:
> > > >
> > > > Hi Stuart,
> > > >
> > > > Thank you for your feedback. I've tested what you say and it works
> if
> > I
> > > > use
> > > > the console. The problem appears when I use the Maven plugin for
> > > Eclipse:
> > > > http://m2eclipse.codehaus.org ; then it looks like there is no plan
> > and
> > > > the
> > > > project doesn't do anything.
> > > >
> > > > Has anyone tried to use the Maven bundle plugin with m2eclipse
> > > > successfully?
> > >
> > >
> > > not personally, I mostly use the command line to initiate builds
> > > have you tried the Q4E plugin? ( http://code.google.com/p/q4e )
> > >
> > > Thanks in advance,
> > > > Jaime
> > > >
> > > > 2007/12/14, Stuart McCulloch < stuart.mcculloch@jayway.net>:
> > > > >
> > > > > On 14/12/2007, Jaime Osgi <jj...@gmail.com> wrote:
> > > > > >
> > > > > > I've just started with this maven plugin to develop OSGi
> bundles,
> > > but
> > > > I
> > > > > > cannot make it work.
> > > > > > I've followed this document:
> > > > > >
> > > > > >
> > > > >
> > >
> >
> http://cwiki.apache.org/confluence/display/FELIX/Maven+Bundle+Plugin+%28BND%29
> > > >
> > > > > >
> > > > > > Whenever I include: <packaging>bundle</packaging> in the pom.xml
> ,
> > > the
> > > > > > build
> > > > > > plan is empty and it doesn't do anything (although the build
> says
> > to
> > > > be
> > > > > > successful). If I replace it by: <packaging>jar</packaging> the
> > JAR
> > > > file
> > > > > > is
> > > > > > created (although with the typical manifest file that is useless
> > for
> > > > > > OSGi).
> > > > >
> > > > >
> > > > > could you post the output from running "mvn clean install" in the
> > > > project
> > > > > directory
> > > > > because when I do this with your POM (copied from your post) I do
> > see
> > > > the
> > > > > bundle
> > > > > goal run, whereas I can't see this in the output you attached:
> > > > >
> > > > > [INFO] Scanning for projects...
> > > > > [INFO]
> > > > >
> > > > >
> > > >
> > >
> >
> ----------------------------------------------------------------------------
> > > > > [INFO] Building Prueba de OSGi Maven
> > > > > [INFO]    task-segment: [clean, install]
> > > > > [INFO]
> > > > >
> > > > >
> > > >
> > >
> >
> ----------------------------------------------------------------------------
> > > > > [INFO] [clean:clean]
> > > > > [INFO] Deleting directory /tmp/foo/target
> > > > > [INFO] [resources:resources]
> > > > > [INFO] Using default encoding to copy filtered resources.
> > > > > [INFO] [compiler:compile]
> > > > > [INFO] No sources to compile
> > > > > [INFO] [resources:testResources]
> > > > > [INFO] Using default encoding to copy filtered resources.
> > > > > [INFO] [compiler:testCompile]
> > > > > [INFO] No sources to compile
> > > > > [INFO] [surefire:test]
> > > > > [INFO] No tests to run.
> > > > > [INFO] [bundle:bundle]         <---- this is where the bundle and
> > > > manifest
> > > > > should be created
> > > > >
> > > > > also have you tried this with Maven 2.0.7? (in case it's caused by
> a
> > > > > regression in 2.0.8)
> > > > >
> > > > > This is the pom.xml that I've used for a very simple example:
> > > > > >
> > > > > > =======================================================
> > > > > > <?xml version="1.0" encoding="UTF-8"?><project>
> > > > > >   <modelVersion>4.0.0</modelVersion>
> > > > > >   <groupId>PruebaMvn</groupId>
> > > > > >   <artifactId>PruebaMvn</artifactId>
> > > > > >   <packaging>bundle</packaging>
> > > > > >   <name>Prueba de OSGi Maven</name>
> > > > > >   <version>0.0.1-SNAPSHOT</version>
> > > > > >   <description></description>
> > > > > >   <dependencies>
> > > > > >     <dependency>
> > > > > >       <groupId>junit</groupId>
> > > > > >       <artifactId>junit</artifactId>
> > > > > >       <version>4.4</version>
> > > > > >       <scope>test</scope>
> > > > > >     </dependency>
> > > > > >     <dependency>
> > > > > >       <groupId>org.osgi</groupId>
> > > > > >       <artifactId>osgi_R4_core</artifactId>
> > > > > >       <version>1.0</version>
> > > > > >     </dependency>
> > > > > >   </dependencies>
> > > > > >   <build>
> > > > > >     <plugins>
> > > > > >       <plugin>
> > > > > >         <groupId>org.apache.felix</groupId>
> > > > > >         <artifactId>maven-bundle-plugin</artifactId>
> > > > > >         <version>1.0.0</version>
> > > > > >         <extensions>true</extensions>
> > > > > >         <configuration>
> > > > > >           <instructions>
> > > > > >             <Export-Package> prueba.api</Export-Package>
> > > > > >             <Private-Package>prueba.impl</Private-Package>
> > > > > >             <Bundle-Activator>prueba.impl.PruebaActivator
> > > > > > </Bundle-Activator>
> > > > > >           </instructions>
> > > > > >         </configuration>
> > > > > >       </plugin>
> > > > > >     </plugins>
> > > > > >   </build>
> > > > > > </project>
> > > > > > =======================================================
> > > > > >
> > > > > > And this is the maven output:
> > > > > >
> > > > > > =======================================================
> > > > > > [DEBUG] Reading global settings from: E:\java\apache-
> > > > > > maven-2.0.8\conf\settings.xml
> > > > > > [DEBUG] Reading user settings from: null
> > > > > > [DEBUG] Settings file is null. Returning null.
> > > > > > [DEBUG] Reading global settings from: E:\java\apache-
> > > > > > maven-2.0.8\conf\settings.xml
> > > > > > [DEBUG] Reading user settings from: null
> > > > > > [DEBUG] Settings file is null. Returning null.
> > > > > > [DEBUG] Pre-scanning POM lineage of:
> > > > > > E:\java\eclipse_new\eclipse\pruebaMvn\PruebaMvn\pom.xml for
> build
> > > > > > extensions.
> > > > > > [DEBUG] Building model-lineage for:
> > > > > > E:\java\eclipse_new\eclipse\pruebaMvn\PruebaMvn\pom.xml to
> > pre-scan
> > > > for
> > > > > > extensions.
> > > > > > [DEBUG] Checking for external profiles in:
> > > > > > E:\java\eclipse_new\eclipse\pruebaMvn\profiles.xml
> > > > > > [DEBUG] Checking: PruebaMvn:PruebaMvn:bundle:0.0.1-SNAPSHOT for
> > > > > > extensions.
> > > > > > (It has 0 modules.)
> > > > > > [DEBUG] Basedir is:
> > E:\java\eclipse_new\eclipse\pruebaMvn\PruebaMvn
> > > > > > [DEBUG] Finished pre-scanning:
> > > > > > E:\java\eclipse_new\eclipse\pruebaMvn\PruebaMvn\pom.xml for
> build
> > > > > > extensions.
> > > > > > [DEBUG] Building profile manager for model:
> > > > > > [inherited]:null:jar:[inherited]
> > > > > > with pom file:
> > > E:\java\eclipse_new\eclipse\pruebaMvn\PruebaMvn\pom.xml
> > > > > > [DEBUG] Checking for external profiles in:
> > > > > > E:\java\eclipse_new\eclipse\pruebaMvn\PruebaMvn\profiles.xml
> > > > > > [DEBUG] Checking for external profiles in:
> > > > > > E:\java\eclipse_new\eclipse\pruebaMvn\PruebaMvn\profiles.xml
> > > > > > [DEBUG] Building profile manager for model:
> > > > PruebaMvn:PruebaMvn:bundle:
> > > > > > 0.0.1-SNAPSHOT with pom file:
> > > > > > E:\java\eclipse_new\eclipse\pruebaMvn\PruebaMvn\pom.xml
> > > > > > [DEBUG] Checking for external profiles in:
> > > > > > E:\java\eclipse_new\eclipse\pruebaMvn\PruebaMvn\profiles.xml
> > > > > > [DEBUG] Building profile manager for model:
> > > > PruebaMvn:PruebaMvn:bundle:
> > > > > > 0.0.1-SNAPSHOT with external profile manager including profiles:
> > {}
> > > > > > [INFO] Scanning for projects...
> > > > > > [INFO]
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> ----------------------------------------------------------------------------
> > > >
> > > > > > [INFO] Building Prueba de OSGi Maven
> > > > > > [INFO]    task-segment: [install]
> > > > > > [INFO]
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> ----------------------------------------------------------------------------
> > > >
> > > > > > [DEBUG]
> > > > > >
> > > > > > Our build plan is:
> > > > > >
> > > > > >
> > > > > >
> > > > > > [INFO]
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> ----------------------------------------------------------------------------
> > > >
> > > > > > [INFO] BUILD SUCCESSFUL PruebaMvn:PruebaMvn:bundle:
> 0.0.1-SNAPSHOT(
> > > > > > task-segment: [install] )
> > > > > > [INFO]
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> ----------------------------------------------------------------------------
> > > >
> > > > > > [INFO] Total time: 0 second
> > > > > > [INFO] Finished at: Thu Dec 13 20:35:02 CET 2007
> > > > > > [INFO] Memory 2M/4M
> > > > > > [INFO]
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> ----------------------------------------------------------------------------
> > > >
> > > > > > =======================================================
> > > > > >
> > > > > >
> > > > > > Thanks in advance,
> > > > > > Jaime
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Cheers, Stuart
> > > > >
> > > >
> > >
> > >
> > >
> > > --
> > > Cheers, Stuart
> > >
> >
>
>
>
> --
> Cheers, Stuart
>

Re: maven-bundle-plugin problem

Posted by Stuart McCulloch <st...@jayway.net>.
On 14/12/2007, Jaime Osgi <jj...@gmail.com> wrote:
>
> Thank you for your suggestion.
>
> I have tested Q4E plugin. I liked Q4E more than M2Eclipse.
>
> However, the results are exactly the same. If I execute the "Maven bundle
> plugin" from console, it works. If I execute it from Eclipse, it fails.


righto, could you raise an issue over at JIRA:

   https://issues.apache.org/jira/browse/FELIX/component/12311143

as this sounds like something we should fix :)

BR,
> Jorge
>
> 2007/12/14, Stuart McCulloch <st...@jayway.net>:
> >
> > On 14/12/2007, Jaime Osgi <jj...@gmail.com> wrote:
> > >
> > > Hi Stuart,
> > >
> > > Thank you for your feedback. I've tested what you say and it works if
> I
> > > use
> > > the console. The problem appears when I use the Maven plugin for
> > Eclipse:
> > > http://m2eclipse.codehaus.org ; then it looks like there is no plan
> and
> > > the
> > > project doesn't do anything.
> > >
> > > Has anyone tried to use the Maven bundle plugin with m2eclipse
> > > successfully?
> >
> >
> > not personally, I mostly use the command line to initiate builds
> > have you tried the Q4E plugin? ( http://code.google.com/p/q4e )
> >
> > Thanks in advance,
> > > Jaime
> > >
> > > 2007/12/14, Stuart McCulloch < stuart.mcculloch@jayway.net>:
> > > >
> > > > On 14/12/2007, Jaime Osgi <jj...@gmail.com> wrote:
> > > > >
> > > > > I've just started with this maven plugin to develop OSGi bundles,
> > but
> > > I
> > > > > cannot make it work.
> > > > > I've followed this document:
> > > > >
> > > > >
> > > >
> >
> http://cwiki.apache.org/confluence/display/FELIX/Maven+Bundle+Plugin+%28BND%29
> > >
> > > > >
> > > > > Whenever I include: <packaging>bundle</packaging> in the pom.xml,
> > the
> > > > > build
> > > > > plan is empty and it doesn't do anything (although the build says
> to
> > > be
> > > > > successful). If I replace it by: <packaging>jar</packaging> the
> JAR
> > > file
> > > > > is
> > > > > created (although with the typical manifest file that is useless
> for
> > > > > OSGi).
> > > >
> > > >
> > > > could you post the output from running "mvn clean install" in the
> > > project
> > > > directory
> > > > because when I do this with your POM (copied from your post) I do
> see
> > > the
> > > > bundle
> > > > goal run, whereas I can't see this in the output you attached:
> > > >
> > > > [INFO] Scanning for projects...
> > > > [INFO]
> > > >
> > > >
> > >
> >
> ----------------------------------------------------------------------------
> > > > [INFO] Building Prueba de OSGi Maven
> > > > [INFO]    task-segment: [clean, install]
> > > > [INFO]
> > > >
> > > >
> > >
> >
> ----------------------------------------------------------------------------
> > > > [INFO] [clean:clean]
> > > > [INFO] Deleting directory /tmp/foo/target
> > > > [INFO] [resources:resources]
> > > > [INFO] Using default encoding to copy filtered resources.
> > > > [INFO] [compiler:compile]
> > > > [INFO] No sources to compile
> > > > [INFO] [resources:testResources]
> > > > [INFO] Using default encoding to copy filtered resources.
> > > > [INFO] [compiler:testCompile]
> > > > [INFO] No sources to compile
> > > > [INFO] [surefire:test]
> > > > [INFO] No tests to run.
> > > > [INFO] [bundle:bundle]         <---- this is where the bundle and
> > > manifest
> > > > should be created
> > > >
> > > > also have you tried this with Maven 2.0.7? (in case it's caused by a
> > > > regression in 2.0.8)
> > > >
> > > > This is the pom.xml that I've used for a very simple example:
> > > > >
> > > > > =======================================================
> > > > > <?xml version="1.0" encoding="UTF-8"?><project>
> > > > >   <modelVersion>4.0.0</modelVersion>
> > > > >   <groupId>PruebaMvn</groupId>
> > > > >   <artifactId>PruebaMvn</artifactId>
> > > > >   <packaging>bundle</packaging>
> > > > >   <name>Prueba de OSGi Maven</name>
> > > > >   <version>0.0.1-SNAPSHOT</version>
> > > > >   <description></description>
> > > > >   <dependencies>
> > > > >     <dependency>
> > > > >       <groupId>junit</groupId>
> > > > >       <artifactId>junit</artifactId>
> > > > >       <version>4.4</version>
> > > > >       <scope>test</scope>
> > > > >     </dependency>
> > > > >     <dependency>
> > > > >       <groupId>org.osgi</groupId>
> > > > >       <artifactId>osgi_R4_core</artifactId>
> > > > >       <version>1.0</version>
> > > > >     </dependency>
> > > > >   </dependencies>
> > > > >   <build>
> > > > >     <plugins>
> > > > >       <plugin>
> > > > >         <groupId>org.apache.felix</groupId>
> > > > >         <artifactId>maven-bundle-plugin</artifactId>
> > > > >         <version>1.0.0</version>
> > > > >         <extensions>true</extensions>
> > > > >         <configuration>
> > > > >           <instructions>
> > > > >             <Export-Package> prueba.api</Export-Package>
> > > > >             <Private-Package>prueba.impl</Private-Package>
> > > > >             <Bundle-Activator>prueba.impl.PruebaActivator
> > > > > </Bundle-Activator>
> > > > >           </instructions>
> > > > >         </configuration>
> > > > >       </plugin>
> > > > >     </plugins>
> > > > >   </build>
> > > > > </project>
> > > > > =======================================================
> > > > >
> > > > > And this is the maven output:
> > > > >
> > > > > =======================================================
> > > > > [DEBUG] Reading global settings from: E:\java\apache-
> > > > > maven-2.0.8\conf\settings.xml
> > > > > [DEBUG] Reading user settings from: null
> > > > > [DEBUG] Settings file is null. Returning null.
> > > > > [DEBUG] Reading global settings from: E:\java\apache-
> > > > > maven-2.0.8\conf\settings.xml
> > > > > [DEBUG] Reading user settings from: null
> > > > > [DEBUG] Settings file is null. Returning null.
> > > > > [DEBUG] Pre-scanning POM lineage of:
> > > > > E:\java\eclipse_new\eclipse\pruebaMvn\PruebaMvn\pom.xml for build
> > > > > extensions.
> > > > > [DEBUG] Building model-lineage for:
> > > > > E:\java\eclipse_new\eclipse\pruebaMvn\PruebaMvn\pom.xml to
> pre-scan
> > > for
> > > > > extensions.
> > > > > [DEBUG] Checking for external profiles in:
> > > > > E:\java\eclipse_new\eclipse\pruebaMvn\profiles.xml
> > > > > [DEBUG] Checking: PruebaMvn:PruebaMvn:bundle:0.0.1-SNAPSHOT for
> > > > > extensions.
> > > > > (It has 0 modules.)
> > > > > [DEBUG] Basedir is:
> E:\java\eclipse_new\eclipse\pruebaMvn\PruebaMvn
> > > > > [DEBUG] Finished pre-scanning:
> > > > > E:\java\eclipse_new\eclipse\pruebaMvn\PruebaMvn\pom.xml for build
> > > > > extensions.
> > > > > [DEBUG] Building profile manager for model:
> > > > > [inherited]:null:jar:[inherited]
> > > > > with pom file:
> > E:\java\eclipse_new\eclipse\pruebaMvn\PruebaMvn\pom.xml
> > > > > [DEBUG] Checking for external profiles in:
> > > > > E:\java\eclipse_new\eclipse\pruebaMvn\PruebaMvn\profiles.xml
> > > > > [DEBUG] Checking for external profiles in:
> > > > > E:\java\eclipse_new\eclipse\pruebaMvn\PruebaMvn\profiles.xml
> > > > > [DEBUG] Building profile manager for model:
> > > PruebaMvn:PruebaMvn:bundle:
> > > > > 0.0.1-SNAPSHOT with pom file:
> > > > > E:\java\eclipse_new\eclipse\pruebaMvn\PruebaMvn\pom.xml
> > > > > [DEBUG] Checking for external profiles in:
> > > > > E:\java\eclipse_new\eclipse\pruebaMvn\PruebaMvn\profiles.xml
> > > > > [DEBUG] Building profile manager for model:
> > > PruebaMvn:PruebaMvn:bundle:
> > > > > 0.0.1-SNAPSHOT with external profile manager including profiles:
> {}
> > > > > [INFO] Scanning for projects...
> > > > > [INFO]
> > > > >
> > > > >
> > > >
> > >
> >
> ----------------------------------------------------------------------------
> > >
> > > > > [INFO] Building Prueba de OSGi Maven
> > > > > [INFO]    task-segment: [install]
> > > > > [INFO]
> > > > >
> > > > >
> > > >
> > >
> >
> ----------------------------------------------------------------------------
> > >
> > > > > [DEBUG]
> > > > >
> > > > > Our build plan is:
> > > > >
> > > > >
> > > > >
> > > > > [INFO]
> > > > >
> > > > >
> > > >
> > >
> >
> ----------------------------------------------------------------------------
> > >
> > > > > [INFO] BUILD SUCCESSFUL PruebaMvn:PruebaMvn:bundle:0.0.1-SNAPSHOT(
> > > > > task-segment: [install] )
> > > > > [INFO]
> > > > >
> > > > >
> > > >
> > >
> >
> ----------------------------------------------------------------------------
> > >
> > > > > [INFO] Total time: 0 second
> > > > > [INFO] Finished at: Thu Dec 13 20:35:02 CET 2007
> > > > > [INFO] Memory 2M/4M
> > > > > [INFO]
> > > > >
> > > > >
> > > >
> > >
> >
> ----------------------------------------------------------------------------
> > >
> > > > > =======================================================
> > > > >
> > > > >
> > > > > Thanks in advance,
> > > > > Jaime
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > Cheers, Stuart
> > > >
> > >
> >
> >
> >
> > --
> > Cheers, Stuart
> >
>



-- 
Cheers, Stuart

Re: maven-bundle-plugin problem

Posted by Jaime Osgi <jj...@gmail.com>.
Thank you for your suggestion.

I have tested Q4E plugin. I liked Q4E more than M2Eclipse.

However, the results are exactly the same. If I execute the "Maven bundle
plugin" from console, it works. If I execute it from Eclipse, it fails.

BR,
Jorge

2007/12/14, Stuart McCulloch <st...@jayway.net>:
>
> On 14/12/2007, Jaime Osgi <jj...@gmail.com> wrote:
> >
> > Hi Stuart,
> >
> > Thank you for your feedback. I've tested what you say and it works if I
> > use
> > the console. The problem appears when I use the Maven plugin for
> Eclipse:
> > http://m2eclipse.codehaus.org ; then it looks like there is no plan and
> > the
> > project doesn't do anything.
> >
> > Has anyone tried to use the Maven bundle plugin with m2eclipse
> > successfully?
>
>
> not personally, I mostly use the command line to initiate builds
> have you tried the Q4E plugin? ( http://code.google.com/p/q4e )
>
> Thanks in advance,
> > Jaime
> >
> > 2007/12/14, Stuart McCulloch < stuart.mcculloch@jayway.net>:
> > >
> > > On 14/12/2007, Jaime Osgi <jj...@gmail.com> wrote:
> > > >
> > > > I've just started with this maven plugin to develop OSGi bundles,
> but
> > I
> > > > cannot make it work.
> > > > I've followed this document:
> > > >
> > > >
> > >
> http://cwiki.apache.org/confluence/display/FELIX/Maven+Bundle+Plugin+%28BND%29
> >
> > > >
> > > > Whenever I include: <packaging>bundle</packaging> in the pom.xml,
> the
> > > > build
> > > > plan is empty and it doesn't do anything (although the build says to
> > be
> > > > successful). If I replace it by: <packaging>jar</packaging> the JAR
> > file
> > > > is
> > > > created (although with the typical manifest file that is useless for
> > > > OSGi).
> > >
> > >
> > > could you post the output from running "mvn clean install" in the
> > project
> > > directory
> > > because when I do this with your POM (copied from your post) I do see
> > the
> > > bundle
> > > goal run, whereas I can't see this in the output you attached:
> > >
> > > [INFO] Scanning for projects...
> > > [INFO]
> > >
> > >
> >
> ----------------------------------------------------------------------------
> > > [INFO] Building Prueba de OSGi Maven
> > > [INFO]    task-segment: [clean, install]
> > > [INFO]
> > >
> > >
> >
> ----------------------------------------------------------------------------
> > > [INFO] [clean:clean]
> > > [INFO] Deleting directory /tmp/foo/target
> > > [INFO] [resources:resources]
> > > [INFO] Using default encoding to copy filtered resources.
> > > [INFO] [compiler:compile]
> > > [INFO] No sources to compile
> > > [INFO] [resources:testResources]
> > > [INFO] Using default encoding to copy filtered resources.
> > > [INFO] [compiler:testCompile]
> > > [INFO] No sources to compile
> > > [INFO] [surefire:test]
> > > [INFO] No tests to run.
> > > [INFO] [bundle:bundle]         <---- this is where the bundle and
> > manifest
> > > should be created
> > >
> > > also have you tried this with Maven 2.0.7? (in case it's caused by a
> > > regression in 2.0.8)
> > >
> > > This is the pom.xml that I've used for a very simple example:
> > > >
> > > > =======================================================
> > > > <?xml version="1.0" encoding="UTF-8"?><project>
> > > >   <modelVersion>4.0.0</modelVersion>
> > > >   <groupId>PruebaMvn</groupId>
> > > >   <artifactId>PruebaMvn</artifactId>
> > > >   <packaging>bundle</packaging>
> > > >   <name>Prueba de OSGi Maven</name>
> > > >   <version>0.0.1-SNAPSHOT</version>
> > > >   <description></description>
> > > >   <dependencies>
> > > >     <dependency>
> > > >       <groupId>junit</groupId>
> > > >       <artifactId>junit</artifactId>
> > > >       <version>4.4</version>
> > > >       <scope>test</scope>
> > > >     </dependency>
> > > >     <dependency>
> > > >       <groupId>org.osgi</groupId>
> > > >       <artifactId>osgi_R4_core</artifactId>
> > > >       <version>1.0</version>
> > > >     </dependency>
> > > >   </dependencies>
> > > >   <build>
> > > >     <plugins>
> > > >       <plugin>
> > > >         <groupId>org.apache.felix</groupId>
> > > >         <artifactId>maven-bundle-plugin</artifactId>
> > > >         <version>1.0.0</version>
> > > >         <extensions>true</extensions>
> > > >         <configuration>
> > > >           <instructions>
> > > >             <Export-Package> prueba.api</Export-Package>
> > > >             <Private-Package>prueba.impl</Private-Package>
> > > >             <Bundle-Activator>prueba.impl.PruebaActivator
> > > > </Bundle-Activator>
> > > >           </instructions>
> > > >         </configuration>
> > > >       </plugin>
> > > >     </plugins>
> > > >   </build>
> > > > </project>
> > > > =======================================================
> > > >
> > > > And this is the maven output:
> > > >
> > > > =======================================================
> > > > [DEBUG] Reading global settings from: E:\java\apache-
> > > > maven-2.0.8\conf\settings.xml
> > > > [DEBUG] Reading user settings from: null
> > > > [DEBUG] Settings file is null. Returning null.
> > > > [DEBUG] Reading global settings from: E:\java\apache-
> > > > maven-2.0.8\conf\settings.xml
> > > > [DEBUG] Reading user settings from: null
> > > > [DEBUG] Settings file is null. Returning null.
> > > > [DEBUG] Pre-scanning POM lineage of:
> > > > E:\java\eclipse_new\eclipse\pruebaMvn\PruebaMvn\pom.xml for build
> > > > extensions.
> > > > [DEBUG] Building model-lineage for:
> > > > E:\java\eclipse_new\eclipse\pruebaMvn\PruebaMvn\pom.xml to pre-scan
> > for
> > > > extensions.
> > > > [DEBUG] Checking for external profiles in:
> > > > E:\java\eclipse_new\eclipse\pruebaMvn\profiles.xml
> > > > [DEBUG] Checking: PruebaMvn:PruebaMvn:bundle:0.0.1-SNAPSHOT for
> > > > extensions.
> > > > (It has 0 modules.)
> > > > [DEBUG] Basedir is: E:\java\eclipse_new\eclipse\pruebaMvn\PruebaMvn
> > > > [DEBUG] Finished pre-scanning:
> > > > E:\java\eclipse_new\eclipse\pruebaMvn\PruebaMvn\pom.xml for build
> > > > extensions.
> > > > [DEBUG] Building profile manager for model:
> > > > [inherited]:null:jar:[inherited]
> > > > with pom file:
> E:\java\eclipse_new\eclipse\pruebaMvn\PruebaMvn\pom.xml
> > > > [DEBUG] Checking for external profiles in:
> > > > E:\java\eclipse_new\eclipse\pruebaMvn\PruebaMvn\profiles.xml
> > > > [DEBUG] Checking for external profiles in:
> > > > E:\java\eclipse_new\eclipse\pruebaMvn\PruebaMvn\profiles.xml
> > > > [DEBUG] Building profile manager for model:
> > PruebaMvn:PruebaMvn:bundle:
> > > > 0.0.1-SNAPSHOT with pom file:
> > > > E:\java\eclipse_new\eclipse\pruebaMvn\PruebaMvn\pom.xml
> > > > [DEBUG] Checking for external profiles in:
> > > > E:\java\eclipse_new\eclipse\pruebaMvn\PruebaMvn\profiles.xml
> > > > [DEBUG] Building profile manager for model:
> > PruebaMvn:PruebaMvn:bundle:
> > > > 0.0.1-SNAPSHOT with external profile manager including profiles: {}
> > > > [INFO] Scanning for projects...
> > > > [INFO]
> > > >
> > > >
> > >
> >
> ----------------------------------------------------------------------------
> >
> > > > [INFO] Building Prueba de OSGi Maven
> > > > [INFO]    task-segment: [install]
> > > > [INFO]
> > > >
> > > >
> > >
> >
> ----------------------------------------------------------------------------
> >
> > > > [DEBUG]
> > > >
> > > > Our build plan is:
> > > >
> > > >
> > > >
> > > > [INFO]
> > > >
> > > >
> > >
> >
> ----------------------------------------------------------------------------
> >
> > > > [INFO] BUILD SUCCESSFUL PruebaMvn:PruebaMvn:bundle:0.0.1-SNAPSHOT (
> > > > task-segment: [install] )
> > > > [INFO]
> > > >
> > > >
> > >
> >
> ----------------------------------------------------------------------------
> >
> > > > [INFO] Total time: 0 second
> > > > [INFO] Finished at: Thu Dec 13 20:35:02 CET 2007
> > > > [INFO] Memory 2M/4M
> > > > [INFO]
> > > >
> > > >
> > >
> >
> ----------------------------------------------------------------------------
> >
> > > > =======================================================
> > > >
> > > >
> > > > Thanks in advance,
> > > > Jaime
> > > >
> > >
> > >
> > >
> > > --
> > > Cheers, Stuart
> > >
> >
>
>
>
> --
> Cheers, Stuart
>

Re: maven-bundle-plugin problem

Posted by Stuart McCulloch <st...@jayway.net>.
On 14/12/2007, Jaime Osgi <jj...@gmail.com> wrote:
>
> Hi Stuart,
>
> Thank you for your feedback. I've tested what you say and it works if I
> use
> the console. The problem appears when I use the Maven plugin for Eclipse:
> http://m2eclipse.codehaus.org ; then it looks like there is no plan and
> the
> project doesn't do anything.
>
> Has anyone tried to use the Maven bundle plugin with m2eclipse
> successfully?


not personally, I mostly use the command line to initiate builds
have you tried the Q4E plugin? ( http://code.google.com/p/q4e )

Thanks in advance,
> Jaime
>
> 2007/12/14, Stuart McCulloch < stuart.mcculloch@jayway.net>:
> >
> > On 14/12/2007, Jaime Osgi <jj...@gmail.com> wrote:
> > >
> > > I've just started with this maven plugin to develop OSGi bundles, but
> I
> > > cannot make it work.
> > > I've followed this document:
> > >
> > >
> > http://cwiki.apache.org/confluence/display/FELIX/Maven+Bundle+Plugin+%28BND%29
>
> > >
> > > Whenever I include: <packaging>bundle</packaging> in the pom.xml, the
> > > build
> > > plan is empty and it doesn't do anything (although the build says to
> be
> > > successful). If I replace it by: <packaging>jar</packaging> the JAR
> file
> > > is
> > > created (although with the typical manifest file that is useless for
> > > OSGi).
> >
> >
> > could you post the output from running "mvn clean install" in the
> project
> > directory
> > because when I do this with your POM (copied from your post) I do see
> the
> > bundle
> > goal run, whereas I can't see this in the output you attached:
> >
> > [INFO] Scanning for projects...
> > [INFO]
> >
> >
> ----------------------------------------------------------------------------
> > [INFO] Building Prueba de OSGi Maven
> > [INFO]    task-segment: [clean, install]
> > [INFO]
> >
> >
> ----------------------------------------------------------------------------
> > [INFO] [clean:clean]
> > [INFO] Deleting directory /tmp/foo/target
> > [INFO] [resources:resources]
> > [INFO] Using default encoding to copy filtered resources.
> > [INFO] [compiler:compile]
> > [INFO] No sources to compile
> > [INFO] [resources:testResources]
> > [INFO] Using default encoding to copy filtered resources.
> > [INFO] [compiler:testCompile]
> > [INFO] No sources to compile
> > [INFO] [surefire:test]
> > [INFO] No tests to run.
> > [INFO] [bundle:bundle]         <---- this is where the bundle and
> manifest
> > should be created
> >
> > also have you tried this with Maven 2.0.7? (in case it's caused by a
> > regression in 2.0.8)
> >
> > This is the pom.xml that I've used for a very simple example:
> > >
> > > =======================================================
> > > <?xml version="1.0" encoding="UTF-8"?><project>
> > >   <modelVersion>4.0.0</modelVersion>
> > >   <groupId>PruebaMvn</groupId>
> > >   <artifactId>PruebaMvn</artifactId>
> > >   <packaging>bundle</packaging>
> > >   <name>Prueba de OSGi Maven</name>
> > >   <version>0.0.1-SNAPSHOT</version>
> > >   <description></description>
> > >   <dependencies>
> > >     <dependency>
> > >       <groupId>junit</groupId>
> > >       <artifactId>junit</artifactId>
> > >       <version>4.4</version>
> > >       <scope>test</scope>
> > >     </dependency>
> > >     <dependency>
> > >       <groupId>org.osgi</groupId>
> > >       <artifactId>osgi_R4_core</artifactId>
> > >       <version>1.0</version>
> > >     </dependency>
> > >   </dependencies>
> > >   <build>
> > >     <plugins>
> > >       <plugin>
> > >         <groupId>org.apache.felix</groupId>
> > >         <artifactId>maven-bundle-plugin</artifactId>
> > >         <version>1.0.0</version>
> > >         <extensions>true</extensions>
> > >         <configuration>
> > >           <instructions>
> > >             <Export-Package> prueba.api</Export-Package>
> > >             <Private-Package>prueba.impl</Private-Package>
> > >             <Bundle-Activator>prueba.impl.PruebaActivator
> > > </Bundle-Activator>
> > >           </instructions>
> > >         </configuration>
> > >       </plugin>
> > >     </plugins>
> > >   </build>
> > > </project>
> > > =======================================================
> > >
> > > And this is the maven output:
> > >
> > > =======================================================
> > > [DEBUG] Reading global settings from: E:\java\apache-
> > > maven-2.0.8\conf\settings.xml
> > > [DEBUG] Reading user settings from: null
> > > [DEBUG] Settings file is null. Returning null.
> > > [DEBUG] Reading global settings from: E:\java\apache-
> > > maven-2.0.8\conf\settings.xml
> > > [DEBUG] Reading user settings from: null
> > > [DEBUG] Settings file is null. Returning null.
> > > [DEBUG] Pre-scanning POM lineage of:
> > > E:\java\eclipse_new\eclipse\pruebaMvn\PruebaMvn\pom.xml for build
> > > extensions.
> > > [DEBUG] Building model-lineage for:
> > > E:\java\eclipse_new\eclipse\pruebaMvn\PruebaMvn\pom.xml to pre-scan
> for
> > > extensions.
> > > [DEBUG] Checking for external profiles in:
> > > E:\java\eclipse_new\eclipse\pruebaMvn\profiles.xml
> > > [DEBUG] Checking: PruebaMvn:PruebaMvn:bundle:0.0.1-SNAPSHOT for
> > > extensions.
> > > (It has 0 modules.)
> > > [DEBUG] Basedir is: E:\java\eclipse_new\eclipse\pruebaMvn\PruebaMvn
> > > [DEBUG] Finished pre-scanning:
> > > E:\java\eclipse_new\eclipse\pruebaMvn\PruebaMvn\pom.xml for build
> > > extensions.
> > > [DEBUG] Building profile manager for model:
> > > [inherited]:null:jar:[inherited]
> > > with pom file: E:\java\eclipse_new\eclipse\pruebaMvn\PruebaMvn\pom.xml
> > > [DEBUG] Checking for external profiles in:
> > > E:\java\eclipse_new\eclipse\pruebaMvn\PruebaMvn\profiles.xml
> > > [DEBUG] Checking for external profiles in:
> > > E:\java\eclipse_new\eclipse\pruebaMvn\PruebaMvn\profiles.xml
> > > [DEBUG] Building profile manager for model:
> PruebaMvn:PruebaMvn:bundle:
> > > 0.0.1-SNAPSHOT with pom file:
> > > E:\java\eclipse_new\eclipse\pruebaMvn\PruebaMvn\pom.xml
> > > [DEBUG] Checking for external profiles in:
> > > E:\java\eclipse_new\eclipse\pruebaMvn\PruebaMvn\profiles.xml
> > > [DEBUG] Building profile manager for model:
> PruebaMvn:PruebaMvn:bundle:
> > > 0.0.1-SNAPSHOT with external profile manager including profiles: {}
> > > [INFO] Scanning for projects...
> > > [INFO]
> > >
> > >
> >
> ----------------------------------------------------------------------------
>
> > > [INFO] Building Prueba de OSGi Maven
> > > [INFO]    task-segment: [install]
> > > [INFO]
> > >
> > >
> >
> ----------------------------------------------------------------------------
>
> > > [DEBUG]
> > >
> > > Our build plan is:
> > >
> > >
> > >
> > > [INFO]
> > >
> > >
> >
> ----------------------------------------------------------------------------
>
> > > [INFO] BUILD SUCCESSFUL PruebaMvn:PruebaMvn:bundle:0.0.1-SNAPSHOT (
> > > task-segment: [install] )
> > > [INFO]
> > >
> > >
> >
> ----------------------------------------------------------------------------
>
> > > [INFO] Total time: 0 second
> > > [INFO] Finished at: Thu Dec 13 20:35:02 CET 2007
> > > [INFO] Memory 2M/4M
> > > [INFO]
> > >
> > >
> >
> ----------------------------------------------------------------------------
>
> > > =======================================================
> > >
> > >
> > > Thanks in advance,
> > > Jaime
> > >
> >
> >
> >
> > --
> > Cheers, Stuart
> >
>



-- 
Cheers, Stuart

Re: maven-bundle-plugin problem

Posted by Jaime Osgi <jj...@gmail.com>.
Hi Stuart,

Thank you for your feedback. I've tested what you say and it works if I use
the console. The problem appears when I use the Maven plugin for Eclipse:
http://m2eclipse.codehaus.org; then it looks like there is no plan and the
project doesn't do anything.

Has anyone tried to use the Maven bundle plugin with m2eclipse successfully?

Thanks in advance,
Jaime

2007/12/14, Stuart McCulloch <st...@jayway.net>:
>
> On 14/12/2007, Jaime Osgi <jj...@gmail.com> wrote:
> >
> > I've just started with this maven plugin to develop OSGi bundles, but I
> > cannot make it work.
> > I've followed this document:
> >
> >
> http://cwiki.apache.org/confluence/display/FELIX/Maven+Bundle+Plugin+%28BND%29
> >
> > Whenever I include: <packaging>bundle</packaging> in the pom.xml, the
> > build
> > plan is empty and it doesn't do anything (although the build says to be
> > successful). If I replace it by: <packaging>jar</packaging> the JAR file
> > is
> > created (although with the typical manifest file that is useless for
> > OSGi).
>
>
> could you post the output from running "mvn clean install" in the project
> directory
> because when I do this with your POM (copied from your post) I do see the
> bundle
> goal run, whereas I can't see this in the output you attached:
>
> [INFO] Scanning for projects...
> [INFO]
>
> ----------------------------------------------------------------------------
> [INFO] Building Prueba de OSGi Maven
> [INFO]    task-segment: [clean, install]
> [INFO]
>
> ----------------------------------------------------------------------------
> [INFO] [clean:clean]
> [INFO] Deleting directory /tmp/foo/target
> [INFO] [resources:resources]
> [INFO] Using default encoding to copy filtered resources.
> [INFO] [compiler:compile]
> [INFO] No sources to compile
> [INFO] [resources:testResources]
> [INFO] Using default encoding to copy filtered resources.
> [INFO] [compiler:testCompile]
> [INFO] No sources to compile
> [INFO] [surefire:test]
> [INFO] No tests to run.
> [INFO] [bundle:bundle]         <---- this is where the bundle and manifest
> should be created
>
> also have you tried this with Maven 2.0.7? (in case it's caused by a
> regression in 2.0.8)
>
> This is the pom.xml that I've used for a very simple example:
> >
> > =======================================================
> > <?xml version="1.0" encoding="UTF-8"?><project>
> >   <modelVersion>4.0.0</modelVersion>
> >   <groupId>PruebaMvn</groupId>
> >   <artifactId>PruebaMvn</artifactId>
> >   <packaging>bundle</packaging>
> >   <name>Prueba de OSGi Maven</name>
> >   <version>0.0.1-SNAPSHOT</version>
> >   <description></description>
> >   <dependencies>
> >     <dependency>
> >       <groupId>junit</groupId>
> >       <artifactId>junit</artifactId>
> >       <version>4.4</version>
> >       <scope>test</scope>
> >     </dependency>
> >     <dependency>
> >       <groupId>org.osgi</groupId>
> >       <artifactId>osgi_R4_core</artifactId>
> >       <version>1.0</version>
> >     </dependency>
> >   </dependencies>
> >   <build>
> >     <plugins>
> >       <plugin>
> >         <groupId>org.apache.felix</groupId>
> >         <artifactId>maven-bundle-plugin</artifactId>
> >         <version>1.0.0</version>
> >         <extensions>true</extensions>
> >         <configuration>
> >           <instructions>
> >             <Export-Package>prueba.api</Export-Package>
> >             <Private-Package>prueba.impl</Private-Package>
> >             <Bundle-Activator>prueba.impl.PruebaActivator
> > </Bundle-Activator>
> >           </instructions>
> >         </configuration>
> >       </plugin>
> >     </plugins>
> >   </build>
> > </project>
> > =======================================================
> >
> > And this is the maven output:
> >
> > =======================================================
> > [DEBUG] Reading global settings from: E:\java\apache-
> > maven-2.0.8\conf\settings.xml
> > [DEBUG] Reading user settings from: null
> > [DEBUG] Settings file is null. Returning null.
> > [DEBUG] Reading global settings from: E:\java\apache-
> > maven-2.0.8\conf\settings.xml
> > [DEBUG] Reading user settings from: null
> > [DEBUG] Settings file is null. Returning null.
> > [DEBUG] Pre-scanning POM lineage of:
> > E:\java\eclipse_new\eclipse\pruebaMvn\PruebaMvn\pom.xml for build
> > extensions.
> > [DEBUG] Building model-lineage for:
> > E:\java\eclipse_new\eclipse\pruebaMvn\PruebaMvn\pom.xml to pre-scan for
> > extensions.
> > [DEBUG] Checking for external profiles in:
> > E:\java\eclipse_new\eclipse\pruebaMvn\profiles.xml
> > [DEBUG] Checking: PruebaMvn:PruebaMvn:bundle:0.0.1-SNAPSHOT for
> > extensions.
> > (It has 0 modules.)
> > [DEBUG] Basedir is: E:\java\eclipse_new\eclipse\pruebaMvn\PruebaMvn
> > [DEBUG] Finished pre-scanning:
> > E:\java\eclipse_new\eclipse\pruebaMvn\PruebaMvn\pom.xml for build
> > extensions.
> > [DEBUG] Building profile manager for model:
> > [inherited]:null:jar:[inherited]
> > with pom file: E:\java\eclipse_new\eclipse\pruebaMvn\PruebaMvn\pom.xml
> > [DEBUG] Checking for external profiles in:
> > E:\java\eclipse_new\eclipse\pruebaMvn\PruebaMvn\profiles.xml
> > [DEBUG] Checking for external profiles in:
> > E:\java\eclipse_new\eclipse\pruebaMvn\PruebaMvn\profiles.xml
> > [DEBUG] Building profile manager for model: PruebaMvn:PruebaMvn:bundle:
> > 0.0.1-SNAPSHOT with pom file:
> > E:\java\eclipse_new\eclipse\pruebaMvn\PruebaMvn\pom.xml
> > [DEBUG] Checking for external profiles in:
> > E:\java\eclipse_new\eclipse\pruebaMvn\PruebaMvn\profiles.xml
> > [DEBUG] Building profile manager for model: PruebaMvn:PruebaMvn:bundle:
> > 0.0.1-SNAPSHOT with external profile manager including profiles: {}
> > [INFO] Scanning for projects...
> > [INFO]
> >
> >
> ----------------------------------------------------------------------------
> > [INFO] Building Prueba de OSGi Maven
> > [INFO]    task-segment: [install]
> > [INFO]
> >
> >
> ----------------------------------------------------------------------------
> > [DEBUG]
> >
> > Our build plan is:
> >
> >
> >
> > [INFO]
> >
> >
> ----------------------------------------------------------------------------
> > [INFO] BUILD SUCCESSFUL PruebaMvn:PruebaMvn:bundle:0.0.1-SNAPSHOT (
> > task-segment: [install] )
> > [INFO]
> >
> >
> ----------------------------------------------------------------------------
> > [INFO] Total time: 0 second
> > [INFO] Finished at: Thu Dec 13 20:35:02 CET 2007
> > [INFO] Memory 2M/4M
> > [INFO]
> >
> >
> ----------------------------------------------------------------------------
> > =======================================================
> >
> >
> > Thanks in advance,
> > Jaime
> >
>
>
>
> --
> Cheers, Stuart
>

Re: maven-bundle-plugin problem

Posted by Stuart McCulloch <st...@jayway.net>.
On 14/12/2007, Jaime Osgi <jj...@gmail.com> wrote:
>
> I've just started with this maven plugin to develop OSGi bundles, but I
> cannot make it work.
> I've followed this document:
>
> http://cwiki.apache.org/confluence/display/FELIX/Maven+Bundle+Plugin+%28BND%29
>
> Whenever I include: <packaging>bundle</packaging> in the pom.xml, the
> build
> plan is empty and it doesn't do anything (although the build says to be
> successful). If I replace it by: <packaging>jar</packaging> the JAR file
> is
> created (although with the typical manifest file that is useless for
> OSGi).


could you post the output from running "mvn clean install" in the project
directory
because when I do this with your POM (copied from your post) I do see the
bundle
goal run, whereas I can't see this in the output you attached:

[INFO] Scanning for projects...
[INFO]
----------------------------------------------------------------------------
[INFO] Building Prueba de OSGi Maven
[INFO]    task-segment: [clean, install]
[INFO]
----------------------------------------------------------------------------
[INFO] [clean:clean]
[INFO] Deleting directory /tmp/foo/target
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:compile]
[INFO] No sources to compile
[INFO] [resources:testResources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:testCompile]
[INFO] No sources to compile
[INFO] [surefire:test]
[INFO] No tests to run.
[INFO] [bundle:bundle]         <---- this is where the bundle and manifest
should be created

also have you tried this with Maven 2.0.7? (in case it's caused by a
regression in 2.0.8)

This is the pom.xml that I've used for a very simple example:
>
> =======================================================
> <?xml version="1.0" encoding="UTF-8"?><project>
>   <modelVersion>4.0.0</modelVersion>
>   <groupId>PruebaMvn</groupId>
>   <artifactId>PruebaMvn</artifactId>
>   <packaging>bundle</packaging>
>   <name>Prueba de OSGi Maven</name>
>   <version>0.0.1-SNAPSHOT</version>
>   <description></description>
>   <dependencies>
>     <dependency>
>       <groupId>junit</groupId>
>       <artifactId>junit</artifactId>
>       <version>4.4</version>
>       <scope>test</scope>
>     </dependency>
>     <dependency>
>       <groupId>org.osgi</groupId>
>       <artifactId>osgi_R4_core</artifactId>
>       <version>1.0</version>
>     </dependency>
>   </dependencies>
>   <build>
>     <plugins>
>       <plugin>
>         <groupId>org.apache.felix</groupId>
>         <artifactId>maven-bundle-plugin</artifactId>
>         <version>1.0.0</version>
>         <extensions>true</extensions>
>         <configuration>
>           <instructions>
>             <Export-Package>prueba.api</Export-Package>
>             <Private-Package>prueba.impl</Private-Package>
>             <Bundle-Activator>prueba.impl.PruebaActivator
> </Bundle-Activator>
>           </instructions>
>         </configuration>
>       </plugin>
>     </plugins>
>   </build>
> </project>
> =======================================================
>
> And this is the maven output:
>
> =======================================================
> [DEBUG] Reading global settings from: E:\java\apache-
> maven-2.0.8\conf\settings.xml
> [DEBUG] Reading user settings from: null
> [DEBUG] Settings file is null. Returning null.
> [DEBUG] Reading global settings from: E:\java\apache-
> maven-2.0.8\conf\settings.xml
> [DEBUG] Reading user settings from: null
> [DEBUG] Settings file is null. Returning null.
> [DEBUG] Pre-scanning POM lineage of:
> E:\java\eclipse_new\eclipse\pruebaMvn\PruebaMvn\pom.xml for build
> extensions.
> [DEBUG] Building model-lineage for:
> E:\java\eclipse_new\eclipse\pruebaMvn\PruebaMvn\pom.xml to pre-scan for
> extensions.
> [DEBUG] Checking for external profiles in:
> E:\java\eclipse_new\eclipse\pruebaMvn\profiles.xml
> [DEBUG] Checking: PruebaMvn:PruebaMvn:bundle:0.0.1-SNAPSHOT for
> extensions.
> (It has 0 modules.)
> [DEBUG] Basedir is: E:\java\eclipse_new\eclipse\pruebaMvn\PruebaMvn
> [DEBUG] Finished pre-scanning:
> E:\java\eclipse_new\eclipse\pruebaMvn\PruebaMvn\pom.xml for build
> extensions.
> [DEBUG] Building profile manager for model:
> [inherited]:null:jar:[inherited]
> with pom file: E:\java\eclipse_new\eclipse\pruebaMvn\PruebaMvn\pom.xml
> [DEBUG] Checking for external profiles in:
> E:\java\eclipse_new\eclipse\pruebaMvn\PruebaMvn\profiles.xml
> [DEBUG] Checking for external profiles in:
> E:\java\eclipse_new\eclipse\pruebaMvn\PruebaMvn\profiles.xml
> [DEBUG] Building profile manager for model: PruebaMvn:PruebaMvn:bundle:
> 0.0.1-SNAPSHOT with pom file:
> E:\java\eclipse_new\eclipse\pruebaMvn\PruebaMvn\pom.xml
> [DEBUG] Checking for external profiles in:
> E:\java\eclipse_new\eclipse\pruebaMvn\PruebaMvn\profiles.xml
> [DEBUG] Building profile manager for model: PruebaMvn:PruebaMvn:bundle:
> 0.0.1-SNAPSHOT with external profile manager including profiles: {}
> [INFO] Scanning for projects...
> [INFO]
>
> ----------------------------------------------------------------------------
> [INFO] Building Prueba de OSGi Maven
> [INFO]    task-segment: [install]
> [INFO]
>
> ----------------------------------------------------------------------------
> [DEBUG]
>
> Our build plan is:
>
>
>
> [INFO]
>
> ----------------------------------------------------------------------------
> [INFO] BUILD SUCCESSFUL PruebaMvn:PruebaMvn:bundle:0.0.1-SNAPSHOT (
> task-segment: [install] )
> [INFO]
>
> ----------------------------------------------------------------------------
> [INFO] Total time: 0 second
> [INFO] Finished at: Thu Dec 13 20:35:02 CET 2007
> [INFO] Memory 2M/4M
> [INFO]
>
> ----------------------------------------------------------------------------
> =======================================================
>
>
> Thanks in advance,
> Jaime
>



-- 
Cheers, Stuart