You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Filippo Balicchia <fb...@gmail.com> on 2012/09/25 12:11:15 UTC

maven-bundle-plugin ignore negation

Hi,
I try repackaging a jar that use org.apache.commons.lang .
I have instruct maven-bundle-plugin to export only some of the packages.
But When I check the jar product i see org.apache.commons.lang as
export package.

I try to instruct maven-bundle-plugin to not export org.apache.commons.lang
with
 <Export-Package>list of my package, !org.apache.commons.lang</Export-Package>

but i ignore me.

What is my mistake ?

Thanks for help

Regards

--Filippo

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


Re: maven-bundle-plugin ignore negation

Posted by Filippo Balicchia <fb...@gmail.com>.
<?xml version="1.0"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>compippoesb.myapp</groupId>
    <artifactId>smix-common</artifactId>
    <version>1.1.2-SNAPSHOT</version>
    <relativePath>../pom.xml</relativePath>
  </parent>
  <packaging>bundle</packaging>
  <version>1.1.2-SNAPSHOT</version>
  <groupId>compippoesb.myapp</groupId>
  <artifactId>myapp-smix-myproduct-bundle</artifactId>
  <name>myapp-smix-myproduct-bundle</name>
  <description>myproduct</description>
  <dependencies>
    <dependency>
      <groupId>compippomyapp</groupId>
      <artifactId>myapp.myproduct.commons</artifactId>
      <version>${myapp.myproduct.version}</version>
    </dependency>
  </dependencies>
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <extensions>true</extensions>
        <configuration>
          <instructions>
            <Import-Package>
                it.pluto.myapp.exceptions.time,
                it.pluto.myapp.dataobjects.time,
                org.apache.commons.lang,!*</Import-Package>
            <Embed-Dependency>*;inline=true</Embed-Dependency>
            <Embed-Transitive>true</Embed-Transitive>
            <Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
            <Export-Package>
              compippomyapp.market.italy.services.nomination,
              compippomyapp.market.italy.services.scheduling,
              compippomyapp.market.italy.services.workflow,
              compippomyapp.market.italy.utils,!*</Export-Package>
          </instructions>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>

Please note that if I delete the package that need commons-lang the
package is not re-exported.

Thanks for help

Regards

--Filippo



2012/9/25 Felix Meschberger <fm...@adobe.com>:
> Hi
>
> Hard to tell without more context (the full pom.xml).
>
> Maybe your are inlining the package somehow tricking the bundle plugin to embed and export.
>
> If you just want to embedd the commons-lang library you might want to use the Embed-Dependency directive:
>
>   <Embed-Dependency>
>     commons-lang
>   </Embed-Dependency>
>
> This puts the library into the bundle and creates a Bundle-ClassPath entry for the library. You might also want to inline the library instead of. See [1] for details.
>
> Regards
> Felix
>
> [1] http://felix.apache.org/site/apache-felix-maven-bundle-plugin-bnd.html#ApacheFelixMavenBundlePlugin%28BND%29-Embeddingdependencies
>
> Am 25.09.2012 um 12:11 schrieb Filippo Balicchia:
>
>> Hi,
>> I try repackaging a jar that use org.apache.commons.lang .
>> I have instruct maven-bundle-plugin to export only some of the packages.
>> But When I check the jar product i see org.apache.commons.lang as
>> export package.
>>
>> I try to instruct maven-bundle-plugin to not export org.apache.commons.lang
>> with
>> <Export-Package>list of my package, !org.apache.commons.lang</Export-Package>
>>
>> but i ignore me.
>>
>> What is my mistake ?
>>
>> Thanks for help
>>
>> Regards
>>
>> --Filippo
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>

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


Re: maven-bundle-plugin ignore negation

Posted by Felix Meschberger <fm...@adobe.com>.
Hi

Hard to tell without more context (the full pom.xml).

Maybe your are inlining the package somehow tricking the bundle plugin to embed and export.

If you just want to embedd the commons-lang library you might want to use the Embed-Dependency directive:

  <Embed-Dependency>
    commons-lang
  </Embed-Dependency>

This puts the library into the bundle and creates a Bundle-ClassPath entry for the library. You might also want to inline the library instead of. See [1] for details.

Regards
Felix

[1] http://felix.apache.org/site/apache-felix-maven-bundle-plugin-bnd.html#ApacheFelixMavenBundlePlugin%28BND%29-Embeddingdependencies

Am 25.09.2012 um 12:11 schrieb Filippo Balicchia:

> Hi,
> I try repackaging a jar that use org.apache.commons.lang .
> I have instruct maven-bundle-plugin to export only some of the packages.
> But When I check the jar product i see org.apache.commons.lang as
> export package.
> 
> I try to instruct maven-bundle-plugin to not export org.apache.commons.lang
> with
> <Export-Package>list of my package, !org.apache.commons.lang</Export-Package>
> 
> but i ignore me.
> 
> What is my mistake ?
> 
> Thanks for help
> 
> Regards
> 
> --Filippo
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
> 


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


Re: maven-bundle-plugin ignore negation

Posted by Stuart McCulloch <mc...@gmail.com>.
On 25 Sep 2012, at 11:11, Filippo Balicchia wrote:

> Hi,
> I try repackaging a jar that use org.apache.commons.lang .
> I have instruct maven-bundle-plugin to export only some of the packages.
> But When I check the jar product i see org.apache.commons.lang as
> export package.
> 
> I try to instruct maven-bundle-plugin to not export org.apache.commons.lang
> with
> <Export-Package>list of my package, !org.apache.commons.lang</Export-Package>
> 
> but i ignore me.
> 
> What is my mistake ?

Could you provide the full maven-bundle-plugin section from your pom.xml? (or even better the entire pom.xml, as long as it doesn't contain confidential material)

> Thanks for help
> 
> Regards
> 
> --Filippo

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