[shrinkwrap-issues] [JBoss JIRA] (SHRINKWRAP-364) API Signature-inconsistency for .addAsManifestResource() and .addAsWebResource()

Hanspeter Gisler (Updated) (JIRA) jira-events at lists.jboss.org
Sat Nov 19 04:27:40 EST 2011


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

Hanspeter Gisler updated SHRINKWRAP-364:
----------------------------------------

    Description: 
If adding for example a beans.xml to a Java-Archives META-INF directory, I have to write:
{code}
...
.addAsManifestResource(beansFile, ArchivePaths.create("beans.xml"))
...
{code} 

If I want to add the beans.xml to a Web-Archives WEB-INF directory, I have to write:
{code}
...
.addAsWebResource(beansFile, ArchivePaths.create("WEB-INF/beans.xml"))
...
{code} 

This is error prone, as I have to remember, that addAsManifestResource puts the file into META-INF on its own, addAsWebResource on the otherhand puts it into root.

  was:
If adding for example a bean.xml to a Java-Archives META-INF directory, I have to write:
{code}
...
.addAsManifestResource(beansFile, ArchivePaths.create("beans.xml"))
...
{code} 

If I want to add the beans.xml to a Web-Archives WEB-INF directory, I have to write:
{code}
...
.addAsWebResource(beansFile, ArchivePaths.create("WEB-INF/beans.xml"))
...
{code} 

This is error prone, as I have to remember, that addAsManifestResource puts the file into META-INF on its own, addAsWebResource on the otherhand puts it into root.


    
> API Signature-inconsistency for .addAsManifestResource() and .addAsWebResource()
> --------------------------------------------------------------------------------
>
>                 Key: SHRINKWRAP-364
>                 URL: https://issues.jboss.org/browse/SHRINKWRAP-364
>             Project: ShrinkWrap
>          Issue Type: Enhancement
>          Components: api
>    Affects Versions: 1.0.0-beta-6
>         Environment: Windows 64bit, Netbeans 7.07, Glassfish 3.1.1, Maven 3.03, testng 6.3, arquillian resolver 1.1.0-alpha-1
>            Reporter: Hanspeter Gisler
>              Labels: API, ArchivePaths, Inconsistency
>
> If adding for example a beans.xml to a Java-Archives META-INF directory, I have to write:
> {code}
> ...
> .addAsManifestResource(beansFile, ArchivePaths.create("beans.xml"))
> ...
> {code} 
> If I want to add the beans.xml to a Web-Archives WEB-INF directory, I have to write:
> {code}
> ...
> .addAsWebResource(beansFile, ArchivePaths.create("WEB-INF/beans.xml"))
> ...
> {code} 
> This is error prone, as I have to remember, that addAsManifestResource puts the file into META-INF on its own, addAsWebResource on the otherhand puts it into root.

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

        


More information about the shrinkwrap-issues mailing list