felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Bosschaert (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FELIX-3238) Unable to filter out classes from identical package in a dependency
Date Mon, 21 Nov 2011 16:50:51 GMT

    [ https://issues.apache.org/jira/browse/FELIX-3238?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13154291#comment-13154291
] 

David Bosschaert commented on FELIX-3238:
-----------------------------------------

I fabricated a small test setup here:

https://github.com/bosschaert/coderthoughts (branch: split-package)

The bundle ascii-pics-api-bundle-mbp contains org.coderthoughts.asciipics.impl.RogueClass
The bundle ascii-pics-provider-bundle-mbp contains the rest of the org.coderthoughts.asciipics.impl
package and depends on the ascii-pics-api-bundle-mbp bundle.

To reproduce simply run 'mvn install' in the AsciiGraphicsService_MBP directory. 
Then look at the bundle in ascii-pics-provider-bundle-mbp/target/ascii-pics-provider-bundle-mbp-1.0.0-SNAPSHOT.jar
and you will find the RogueClass inside the bundle.
                
> Unable to filter out classes from identical package in a dependency
> -------------------------------------------------------------------
>
>                 Key: FELIX-3238
>                 URL: https://issues.apache.org/jira/browse/FELIX-3238
>             Project: Felix
>          Issue Type: Bug
>          Components: Maven Bundle Plugin
>    Affects Versions: maven-bundle-plugin-2.3.5
>            Reporter: David Bosschaert
>
> I as part of a refactoring a project is moving some classes from a package org.acme.foo
from bundle A to a separate bundle B.
> Unfortunately its not possible to move all the classes to the separate bundle so this
introduces a split package. Both bundle A and bundle B export package org.acme.foo.
> Bundle A has a maven dependency on bundle B.
> What happens at the moment with the Maven Bundle Plugin 2.3.4 (we can't use 2.3.5 as
it has FELIX-3058 ) is that all the classes from org.acme.foo that exist in bundle B are copied
into the resulting bundle A.
> Below the pom.xml of a test-setup that I created. Both the current project as well as
ascii-pics-api-bundle-mbp dependency contain the org.coderthouhts.asciipics.impl package.
> <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>org.coderthoughts</groupId>
>     <artifactId>ascii-pics-parent-mbp</artifactId>
>     <version>1.0.0-SNAPSHOT</version>
>   </parent>
>   <artifactId>ascii-pics-provider-bundle-mbp</artifactId>
>   <packaging>bundle</packaging>
>   
>   <dependencies>
>     <dependency>
>       <groupId>org.coderthoughts</groupId>
>       <artifactId>ascii-pics-api-bundle-mbp</artifactId>
>       <version>1.0.0</version>
>       <scope>provided</scope>
>     </dependency>
>     <dependency>
>       <groupId>org.osgi</groupId>
>       <artifactId>org.osgi.core</artifactId>
>       <version>4.2.0</version>
>       <scope>provided</scope>
>     </dependency>
>   </dependencies>
>   
>   <build>
>     <plugins>
>       <plugin>
>         <groupId>org.apache.felix</groupId>
>         <artifactId>maven-bundle-plugin</artifactId>
>         <extensions>true</extensions>
>         <configuration>
>           <instructions>
>             <Bundle-SymbolicName>${project.name}</Bundle-SymbolicName>
>             <Bundle-Activator>org.coderthoughts.asciipics.Activator</Bundle-Activator>
>             <Export-Package>org.coderthoughts.asciipics.impl;-split-package:=first</Export-Package>
>           </instructions>
>         </configuration>
>       </plugin>
>     </plugins>
>   </build>
> </project>

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message