[shrinkwrap-issues] [JBoss JIRA] (SHRINKWRAP-492) addPackages method not ever succeeds

Luca Stancapiano (JIRA) issues at jboss.org
Wed Aug 26 18:49:42 EDT 2015


    [ https://issues.jboss.org/browse/SHRINKWRAP-492?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13102266#comment-13102266 ] 

Luca Stancapiano commented on SHRINKWRAP-492:
---------------------------------------------

here a sample:

https://github.com/flashboss/add-packages-test

you can use:

mvn test

The test will start to include two different libraries: drools and h2 with the addPackages("org") method

the first assert succeeds because drools is loaded correctly but the second fails because h2 is not correctly loaded

> addPackages method not ever succeeds
> ------------------------------------
>
>                 Key: SHRINKWRAP-492
>                 URL: https://issues.jboss.org/browse/SHRINKWRAP-492
>             Project: ShrinkWrap
>          Issue Type: Bug
>          Components: impl-base
>         Environment: shrinkwrap-impl-base 1.2.2
>            Reporter: Luca Stancapiano
>
> there are cases where the addPackages method doesn't succeed to load the packages also if they are in the current classloader. An example can be the com.h2database library. This library is registered as resource in the classloader with the name com.h2database and ambigously it contains the package org.h2. 
> If I try to include the library in my shrinkwrap java archive with the expression addPackages(true, "com") or with the expression addPackages(true, "org") , the h2 packages are not loaded because shrinkwrap need the name of the resource starting with the same name of the package. 
> So seems that shrinkwrap can load only something as a resource called com.h2database combined with the package com.h2 or a resource called org.h2database combined with the package org.h2. 
> I presume this ambiguous name should be managed in shrinkwrap 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


More information about the shrinkwrap-issues mailing list