Maven Ant Tasks
  1. Maven Ant Tasks
  2. MANTTASKS-84

VersionMapper does not work on SNAPSHOT dependencies where uniqueVersion="true"

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.7
    • Fix Version/s: 2.0.8
    • Component/s: dependencies task
    • Labels:
      None
    • Flags:
      Patch

      Description

      When a dependency is SNAPSHOT and uniqueVersion="true", the version is not removed from the filename, nor the directory if to="flatten"
      for example, adding in test-deps target of sample.build.xml the following:<copy todir="target/files/versionMapperFlatten"> <fileset refid="dependency.fileset"/> <mapper classpathref="maven-ant-tasks.classpath" classname="org.apache.maven.artifact.ant.VersionMapper" from="$

      {dependency.versions}

      " to="flatten" /> </copy>
      creates /target/files/versionMapperFlatten/it/ant-tasks/snapshotUniqueTrue/2.0.7-SNAPSHOT/snapshotUniqueTrue-2.0.7-20070610.180356-1.jar where it should be /target/files/versionMapperFlatten/snapshotUniqueTrue.jar

      1. MANTTASKS-84.diff
        2 kB
        Hervé Boutemy

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Closed Closed
        85d 12h 32m 1 Hervé Boutemy 19/Oct/07 16:52
        Mark Thomas made changes -
        Workflow jira [ 12953469 ] Default workflow, editable Closed status [ 12990579 ]
        Mark Thomas made changes -
        Project Import Sun Apr 05 22:08:22 UTC 2015 [ 1428271702400 ]
        Mark Thomas made changes -
        Patch Submitted Yes [ 10763 ]
        Flags Patch [ 10430 ]
        Mark Thomas made changes -
        Workflow jira [ 12716177 ] Default workflow, editable Closed status [ 12760047 ]
        Mark Thomas made changes -
        Project Import Sun Apr 05 09:00:58 UTC 2015 [ 1428224458201 ]
        Hervé Boutemy made changes -
        Status Open [ 1 ] Closed [ 6 ]
        Resolution Fixed [ 1 ]
        Hervé Boutemy made changes -
        Remaining Estimate 0h [ 0 ]
        Assignee Herve Boutemy [ hboutemy ]
        Original Estimate 0h [ 0 ]
        Description When a dependency is SNAPSHOT and uniqueVersion="true", the version is not removed from the filename, nor the directory if to="flatten"

        for example, adding in test-deps target of sample.build.xml the following:
        {code:xml}
            <copy todir="target/files/versionMapperFlatten">
              <fileset refid="dependency.fileset"/>
              <mapper classpathref="maven-ant-tasks.classpath" classname="org.apache.maven.artifact.ant.VersionMapper"
                      from="${dependency.versions}" to="flatten" />
            </copy>
        {code}

        creates /target/files/versionMapperFlatten/it/ant-tasks/snapshotUniqueTrue/2.0.7-SNAPSHOT/snapshotUniqueTrue-2.0.7-20070610.180356-1.jar where it should be /target/files/versionMapperFlatten/snapshotUniqueTrue.jar
        When a dependency is SNAPSHOT and uniqueVersion="true", the version is not removed from the filename, nor the directory if to="flatten"
        for example, adding in test-deps target of sample.build.xml the following:<copy todir="target/files/versionMapperFlatten"> <fileset refid="dependency.fileset"/> <mapper classpathref="maven-ant-tasks.classpath" classname="org.apache.maven.artifact.ant.VersionMapper" from="${dependency.versions}" to="flatten" /> </copy>
        creates /target/files/versionMapperFlatten/it/ant-tasks/snapshotUniqueTrue/2.0.7-SNAPSHOT/snapshotUniqueTrue-2.0.7-20070610.180356-1.jar where it should be /target/files/versionMapperFlatten/snapshotUniqueTrue.jar
        Hervé Boutemy made changes -
        Fix Version/s 2.0.8 [ 13618 ]
        Patch Submitted [Yes]
        Hervé Boutemy made changes -
        Field Original Value New Value
        Attachment MANTTASKS-84.diff [ 28622 ]
        Hide
        Hervé Boutemy added a comment -

        Here is a testcase and fix

        Show
        Hervé Boutemy added a comment - Here is a testcase and fix
        Hervé Boutemy created issue -

          People

          • Assignee:
            Hervé Boutemy
            Reporter:
            Hervé Boutemy
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development