You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by rgubler2 <rg...@init-ka.de> on 2011/05/26 11:44:56 UTC

Felix maven bundle plugin

Hello,

i have the following entries in my pom.xml:

            <plugin>
              <groupId>org.apache.felix</groupId>
              <artifactId>maven-bundle-plugin</artifactId>
              <version>1.4.0</version>
              <extensions>true</extensions>
              <configuration>
                  <instructions>
                     
<Bundle-SymbolicName>${pom.groupId}.${pom.artifactId}</Bundle-SymbolicName>
                      <Bundle-Name>${pom.name}</Bundle-Name>
                      <Bundle-Version>${pom.version}</Bundle-Version>
                     
<Bundle-Activator>com.initka.bprocess.kernel_osgi.base.impl.Activator</Bundle-Activator>
                     
<Private-Package>com.initka.bprocess.kernel_osgi.base.impl</Private-Package>
                     
<Embed-Dependency>*;scope=compile|runtime</Embed-Dependency>
                  </instructions>
              </configuration>
          </plugin>

I want to add all dependencies in my bundle and setoup the bundle classpath. 
It looks like the plugin add all imports of my dependencies which are not
"reachable" to the bundle import statement. 

How can i aviod this entries? Our softrware is running several years without
this additional jars and felix don't load the bundle because it can't
resolve the imported packages from a huge count of third party jars. We want
to generate the Manifest during the maven build without any hand work.


Yours Rüdiger
-- 
View this message in context: http://old.nabble.com/Felix-maven-bundle-plugin-tp31706136p31706136.html
Sent from the Apache Felix - Users mailing list archive at Nabble.com.


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


Re: Felix maven bundle plugin

Posted by sam lee <sk...@gmail.com>.
Yup. It took me the entire day to find that it's resoultion:=optional
not   resolution=optional   :P

I cursed almost every second that day.

On Thu, May 26, 2011 at 8:36 AM, rgubler2 <rg...@init-ka.de> wrote:

>
> Hello,
>
> i added only the following line:
>
>    <Import-Package>*;resolution:=optional</Import-Package>
>
> Now it works as expected.
>
>
> Thank you very much.
>
> Rüdiger
>
> --
> View this message in context:
> http://old.nabble.com/Felix-maven-bundle-plugin-tp31706136p31707518.html
> Sent from the Apache Felix - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>

Re: Felix maven bundle plugin

Posted by rgubler2 <rg...@init-ka.de>.
Hello,

i added only the following line:

    <Import-Package>*;resolution:=optional</Import-Package>

Now it works as expected. 


Thank you very much.

Rüdiger

-- 
View this message in context: http://old.nabble.com/Felix-maven-bundle-plugin-tp31706136p31707518.html
Sent from the Apache Felix - Users mailing list archive at Nabble.com.


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


Re: Felix maven bundle plugin

Posted by sam lee <sk...@gmail.com>.
can you try this?

<plugin>
    <groupId>org.apache.felix</groupId>
    <artifactId>maven-bundle-plugin</artifactId>
    <extensions>true</extensions>
    <version>2.3.4</version>
    <configuration>
        <instructions>
            <Export-Package>FOO,BAR</Export-Package>
            <Private-Package>PACKAGES,USED,IN,YOUR,BUNDLE</Private-Package>
            <Import-Package>*;resolution:=optional</Import-Package>
            <Embed-Dependency>
                DEPENDENCIES,NOT,IN,FELIX;scope=compile|runtime
            </Embed-Dependency>
            <Embed-Transitive>true</Embed-Transitive>
            <Bundle-Version>1.0</Bundle-Version>
        </instructions>
    </configuration>
</plugin>


On Thu, May 26, 2011 at 5:44 AM, rgubler2 <rg...@init-ka.de> wrote:

>
> Hello,
>
> i have the following entries in my pom.xml:
>
>            <plugin>
>              <groupId>org.apache.felix</groupId>
>              <artifactId>maven-bundle-plugin</artifactId>
>              <version>1.4.0</version>
>              <extensions>true</extensions>
>              <configuration>
>                  <instructions>
>
> <Bundle-SymbolicName>${pom.groupId}.${pom.artifactId}</Bundle-SymbolicName>
>                      <Bundle-Name>${pom.name}</Bundle-Name>
>                      <Bundle-Version>${pom.version}</Bundle-Version>
>
>
> <Bundle-Activator>com.initka.bprocess.kernel_osgi.base.impl.Activator</Bundle-Activator>
>
>
> <Private-Package>com.initka.bprocess.kernel_osgi.base.impl</Private-Package>
>
> <Embed-Dependency>*;scope=compile|runtime</Embed-Dependency>
>                  </instructions>
>              </configuration>
>          </plugin>
>
> I want to add all dependencies in my bundle and setoup the bundle
> classpath.
> It looks like the plugin add all imports of my dependencies which are not
> "reachable" to the bundle import statement.
>
> How can i aviod this entries? Our softrware is running several years
> without
> this additional jars and felix don't load the bundle because it can't
> resolve the imported packages from a huge count of third party jars. We
> want
> to generate the Manifest during the maven build without any hand work.
>
>
> Yours Rüdiger
> --
> View this message in context:
> http://old.nabble.com/Felix-maven-bundle-plugin-tp31706136p31706136.html
> Sent from the Apache Felix - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>