You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by bu...@apache.org on 2020/10/27 16:52:41 UTC

[Bug 64854] New: Add option to org.apache.tools.ant.types.resources.ResourceList to keep dublicates

https://bz.apache.org/bugzilla/show_bug.cgi?id=64854

            Bug ID: 64854
           Summary: Add option to
                    org.apache.tools.ant.types.resources.ResourceList to
                    keep dublicates
           Product: Ant
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Core
          Assignee: notifications@ant.apache.org
          Reporter: bz.apache@cconstruct.de
  Target Milestone: ---

I am trying to insert a file multiple times into the output of a concat-task,
but ResourceList uses Union as cachedResources which in turn creates a
LinkedHashSet as result in getAllToStrings() and getAllResources(), and in
applies distinct() in streamResources(...).

Please add a configuration to use another class as resource-cache in
ResourceList e.g. Resources

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 64854] [PullRequest] Add option to org.apache.tools.ant.types.resources.ResourceList to keep duplicates

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64854

--- Comment #6 from Stefan Bodewig <bo...@apache.org> ---
you are correct, this will not work if there are duplicates inside of a single
<resourcelist>. There probably is no way to avoid something like the option yu
describe for the general case.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 64854] [PullRequest] Add option to org.apache.tools.ant.types.resources.ResourceList to keep duplicates

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64854

--- Comment #4 from Stefan Bodewig <bo...@apache.org> ---
If you know the files containing the lists upfront, then you can do something
like

<resources>
  <resourcelist>
    <rile file="firstfile"/>
  </resourcelist>
  <resourcelist>
    <rile file="secondfile"/>
  </resourcelist>
  <resourcelist>
    <rile file="thirdfile"/>
  </resourcelist>
</resources>

but that doesn't work if the files containing the lists come from another
resource collection.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 64854] [PullRequest] Add option to org.apache.tools.ant.types.resources.ResourceList to keep duplicates

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64854

--- Comment #2 from Stefan Bodewig <bo...@apache.org> ---
Is there any reason why you are using <resourcelist> rather than <resources>
which would allow duplicates?

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 64854] [PullRequest] Add option to org.apache.tools.ant.types.resources.ResourceList to keep duplicates

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64854

Matthias Vill <bz...@cconstruct.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Add option to               |[PullRequest] Add option to
                   |org.apache.tools.ant.types. |org.apache.tools.ant.types.
                   |resources.ResourceList to   |resources.ResourceList to
                   |keep duplicates             |keep duplicates
                 CC|                            |bz.apache@cconstruct.de

--- Comment #1 from Matthias Vill <bz...@cconstruct.de> ---
Created https://github.com/apache/ant/pull/140

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 64854] [PullRequest] Add option to org.apache.tools.ant.types.resources.ResourceList to keep duplicates

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64854

Stefan Bodewig <bo...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |1.10.10
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #7 from Stefan Bodewig <bo...@apache.org> ---
Many thanks, the pull request has been merged now.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 64854] [PullRequest] Add option to org.apache.tools.ant.types.resources.ResourceList to keep duplicates

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64854

--- Comment #3 from Matthias Vill <bz...@cconstruct.de> ---
I have multiple files containing file-lists and some may contain a file twice.
As far as I understand <resources> needs to have the files listed in the
ant-XML, right?

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 64854] [PullRequest] Add option to org.apache.tools.ant.types.resources.ResourceList to keep duplicates

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64854

--- Comment #5 from Matthias Vill <bz...@cconstruct.de> ---
As far as I remember this will only work, when each file does not reference a
file twice. The build I have in mind uses templates for transaction handling
and these templates can be included/needed multiple times.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 64854] Add option to org.apache.tools.ant.types.resources.ResourceList to keep duplicates

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64854

Matthias Vill <bz...@cconstruct.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Add option to               |Add option to
                   |org.apache.tools.ant.types. |org.apache.tools.ant.types.
                   |resources.ResourceList to   |resources.ResourceList to
                   |keep dublicates             |keep duplicates

-- 
You are receiving this mail because:
You are the assignee for the bug.