[shrinkwrap-issues] [JBoss JIRA] (SHRINKRES-100) Allow Maven resource filtering to be applied for resources imported via MavenImporter

Yannick Majoros (JIRA) issues at jboss.org
Thu May 7 03:49:46 EDT 2015


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

Yannick Majoros edited comment on SHRINKRES-100 at 5/7/15 3:49 AM:
-------------------------------------------------------------------

Here is a simpler version, that I suggest adding to the Arquillian API (ResourceContainer).

{code:java}

    public static <T extends Archive<T>> T addClassPathResourceToArchive(ResourceContainer<T> webArchive, String resourceName) throws IOException {

        ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader();
        URL testPropertiesURL = contextClassLoader.getResource(resourceName);
        return webArchive.addAsResource(testPropertiesURL, resourceName);

    }
{code}


was (Author: ymajoros):
Here is a simpler version, that I suggest adding to the Arquillian API (ResourceContainer).

    public static <T extends Archive<T>> T addClassPathResourceToArchive(ResourceContainer<T> webArchive, String resourceName) throws IOException {

        ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader();
        URL testPropertiesURL = contextClassLoader.getResource(resourceName);
        return webArchive.addAsResource(testPropertiesURL, resourceName);

    }


> Allow Maven resource filtering to be applied for resources imported via MavenImporter
> -------------------------------------------------------------------------------------
>
>                 Key: SHRINKRES-100
>                 URL: https://issues.jboss.org/browse/SHRINKRES-100
>             Project: ShrinkWrap Resolvers
>          Issue Type: Feature Request
>          Components: maven
>            Reporter: Karel Piwko
>              Labels: api-change
>
> When packaging resources to via MavenImporter, any filters defined on the path are ignored. Add support for applying filters.



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


More information about the shrinkwrap-issues mailing list