[shrinkwrap-issues] [JBoss JIRA] Resolved: (SHRINKWRAP-229) Should be able to add Packages based on String name

Andrew Rubinger (JIRA) jira-events at lists.jboss.org
Tue Mar 15 06:27:46 EDT 2011


     [ https://issues.jboss.org/browse/SHRINKWRAP-229?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrew Rubinger resolved SHRINKWRAP-229.
----------------------------------------

    Fix Version/s: 1.0.0-alpha-12
       Resolution: Done


> Should be able to add Packages based on String name
> ---------------------------------------------------
>
>                 Key: SHRINKWRAP-229
>                 URL: https://issues.jboss.org/browse/SHRINKWRAP-229
>             Project: ShrinkWrap
>          Issue Type: Feature Request
>          Components: api, impl-base
>            Reporter: Aslak Knutsen
>            Assignee: Aslak Knutsen
>             Fix For: 1.0.0-alpha-12
>
>
> Problem:
> Adding all classes to a parent package that does not contain a class is not possible. The Parent Package is never created by the jvm etc. You have to manually add all sub packages instead.
> Adding classes from a package where no Classes have been loaded from yet is not possible, jvm lazy creates the packages.
> e.g. Pakcage.getPackage("my.package") does not exist until a class in "my.package" has been loaded. Workaround is to force load a class e.g. my.package.MyClass.class.getPackage()
> Solution:
> Add method to ClassContainer API 
>  - addPackage(String packageName)
>  - addPackages(boolean recursive, String... packageNames)
>  - addPackages(boolean recursive, Filter<ArchivePath> filter, String... packageNames)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the shrinkwrap-issues mailing list