You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@servicemix.apache.org by "Jörg Rade (JIRA)" <ji...@apache.org> on 2016/02/10 10:14:18 UTC

[jira] [Commented] (SM-2860) org.apache.servicemix.bundles.junit-4.12_1.jar exports org.hamcrest.*

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

Jörg Rade commented on SM-2860:
-------------------------------

According to https://github.com/apache/servicemix-bundles/blob/master/junit-4.9/pom.xml it seems to be by purpose - but I would like to know why org.hamcrest* is exported.

> org.apache.servicemix.bundles.junit-4.12_1.jar exports org.hamcrest.*
> ---------------------------------------------------------------------
>
>                 Key: SM-2860
>                 URL: https://issues.apache.org/jira/browse/SM-2860
>             Project: ServiceMix
>          Issue Type: Wish
>            Reporter: Jörg Rade
>            Priority: Minor
>
> Hi,
> im trying to bundelize Apache ISIS #ISIS-1302 and found a bundelized version of junit (isis.* -> jmock -> junit).
> Thanks for providing all these org.apache.servicemix.bundles.* - it is really helpful!
> On that path I'm trying to build a bundelized version of jmock which (after some tweeking) depends on:
> {code}
> [INFO] --- maven-dependency-plugin:2.1:tree (default-cli) @ jmock ---
> [INFO] org.jmock:jmock:bundle:2.8.2
> [INFO] +- org.apache.servicemix.bundles:org.apache.servicemix.bundles.junit:jar:4.12_1:compile
> [INFO] |  \- org.hamcrest:hamcrest-core:jar:1.3:compile
> [INFO] +- org.jmock:jmock-testjar:jar:2.8.2:compile
> [INFO] +- org.apache.servicemix.bundles:org.apache.servicemix.bundles.cglib:jar:3.2.0_1:compile
> [INFO] +- org.ow2.asm:asm:jar:5.0.4:compile
> [INFO] +- org.beanshell:bsh:jar:1.3.0:compile
> [INFO] \- org.apache.servicemix.bundles:org.apache.servicemix.bundles.hamcrest:jar:1.3_1:compile
> {code} 
> But when building it results in a split-package message:
> {code}
> [INFO] --- maven-bundle-plugin:3.0.1:bundle (default-bundle) @ jmock ---
> [WARNING] Bundle org.jmock:jmock:bundle:2.8.2 : Split package, multiple jars provide the same package:org/hamcrest/internal
> Use Import/Export Package directive -split-package:=(merge-first|merge-last|error|first) to get rid of this warning
> Package found in   [Jar:org.apache.servicemix.bundles.junit, Jar:hamcrest-core, Jar:org.apache.servicemix.bundles.hamcrest]
> Class path         [Jar:., Jar:org.apache.servicemix.bundles.junit, Jar:hamcrest-core, Jar:jmock-testjar, Jar:org.apache.servicemix.bundles.cglib, Jar:asm, Jbsh, Jar:org.apache.servicemix.bundles.hamcrest]
> {code}
> org.apache.servicemix.bundles.junit-4.12_1.jar exports:
> * org.hamcrest
> * org.hamcrest.internal
> * org.hamcrest.core
> Is this by purpose or just a default setting?
> * Would it be possible to omit hamcrest exporting and explicitly importing org.apache.servicemix.bundles.hamcrest-1.3_1 where required?
> * How about using org.apache.servicemix.bundles:org.apache.servicemix.bundles.hamcrest:jar:1.3_1 instead of org.hamcrest:hamcrest-core:jar:1.3 ?
> Thanks in advance
> Jörg



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)