Details

    • Type: Feature Request
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 1.0.0-alpha-11
    • Fix Version/s: 1.0.0-beta-1
    • Component/s: api, impl-base
    • Labels:
      None

      Description

      A common use case is to add multiple Assets from your directory structure:

      addManifestResource("src/main/resources/META-INF/name", "name")
      addManifestResource("src/main/resources/META-INF/name2", "name2")

      This can be quite painful if you have a lot of items, e.g. html/jsp/jsf

      We should support adding of recursive directory content, where target path is resolved as relative to where you add from:

      addManifestResource("src/main/resources/META-INF/")

      The expected target in the archive would be, root + CONTAINER_PATH + ('file.getName()' + parentDirectory if in a subdirectory of specified import source )

      src/main/resources/META-INF/test.html -> (CONTAINER_PATH) + test.html
      src/main/resources/META-INF/images/test.jpg -> (CONTAINER_PATH) + images/test.jpg

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            davided80 Davide D'Alto added a comment -

            Do I have to add it every time a resource is a folder?

            You can find a first prototype on github: https://github.com/DavideD/shrinkwrap/commits/SHRINKWRAP-249

            It's implemented for:
            addAsManifestResource(File resource, String target)
            addAsManifestResource(File resource, ArchivePath target)
            addAsManifestResource(File resource)
            addAsManifestResource(String resource)

            I would appreciate some feedback, just to know if I'm on the right direction.

            Thanks

            Show
            davided80 Davide D'Alto added a comment - Do I have to add it every time a resource is a folder? You can find a first prototype on github: https://github.com/DavideD/shrinkwrap/commits/SHRINKWRAP-249 It's implemented for: addAsManifestResource(File resource, String target) addAsManifestResource(File resource, ArchivePath target) addAsManifestResource(File resource) addAsManifestResource(String resource) I would appreciate some feedback, just to know if I'm on the right direction. Thanks
            Hide
            davided80 Davide D'Alto added a comment - - edited

            I added the content inclusion to:

            • addAsManifestResource
            • addAsResource
            • addAsLibrary

            Do I have to add it in other places?

            • addDirectory(String ..) ?
            • addDirectory(ArchivePath ..) ?

            Thanks

            Show
            davided80 Davide D'Alto added a comment - - edited I added the content inclusion to: addAsManifestResource addAsResource addAsLibrary Do I have to add it in other places? addDirectory(String ..) ? addDirectory(ArchivePath ..) ? Thanks
            Hide
            alrubinger Andrew Rubinger added a comment -

            addDirectory: Nope. I wonder if we should rename that to "addAsDirectory" to fit the convention. You're not adding one, you're adding something as one.

            Show
            alrubinger Andrew Rubinger added a comment - addDirectory: Nope. I wonder if we should rename that to "addAsDirectory" to fit the convention. You're not adding one, you're adding something as one.
            Hide
            alrubinger Andrew Rubinger added a comment -

            WRT my last comment: SHRINKWRAP-263

            Show
            alrubinger Andrew Rubinger added a comment - WRT my last comment: SHRINKWRAP-263
            Hide
            alrubinger Andrew Rubinger added a comment -

            Davide: I believe this is all upstream now; mark as resolved if so?

            Show
            alrubinger Andrew Rubinger added a comment - Davide: I believe this is all upstream now; mark as resolved if so?
            Hide
            davided80 Davide D'Alto added a comment -

            Everything seems to be upstream.

            Show
            davided80 Davide D'Alto added a comment - Everything seems to be upstream.

              People

              • Assignee:
                davided80 Davide D'Alto
                Reporter:
                aslak Aslak Knutsen
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Development