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

POM properties aren't available as ANT properties contrary to the documentation

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Duplicate
    • Affects Version/s: 2.1.0
    • Fix Version/s: None
    • Component/s: documentation, pom task
    • Labels:
      None
    • Environment:
      ant 1.8.1
      maven-ant-tasks-2.1.0
      Mac OSX 10.6.4

      Description

      In the documentation for the "pom" tasks at http://maven.apache.org/ant-tasks/examples/pom.html
      there's a section "Accessing POM information" with a very simple example that I can't get to work.
      Attached is my build.xml and pom.xml which should match the example. I expected the placeholder
      $

      {mypom.version} to be replaced with the version number from the pom ("0.6"), but instead I see
      the placeholder. I also tried with ${mypom.project.version} with the same result.

      The output from "ant":

      Buildfile: /Users/knut/build.xml

      propdemo:
      [echo] The version is ${mypom.version}

      BUILD SUCCESSFUL
      Total time: 1 second

      If I instead use the ANT construct <xmlproperty file="pom.xml" prefix="maven"/>
      I get the properties, but that's not the same thing.

      1. pom.xml
        0.6 kB
        Knut Forkalsrud
      2. build.xml
        0.3 kB
        Knut Forkalsrud

        Issue Links

          Activity

          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open Closed Closed
          36m 39s 1 Knut Forkalsrud 09/Jul/10 14:35
          Michael Osipov made changes -
          Fix Version/s 2.1.1 [ 12330264 ]
          Mark Thomas made changes -
          Workflow jira [ 12953526 ] Default workflow, editable Closed status [ 12990654 ]
          Mark Thomas made changes -
          Project Import Sun Apr 05 22:08:22 UTC 2015 [ 1428271702400 ]
          Mark Thomas made changes -
          Workflow jira [ 12716264 ] Default workflow, editable Closed status [ 12759989 ]
          Mark Thomas made changes -
          Project Import Sun Apr 05 09:00:58 UTC 2015 [ 1428224458201 ]
          Knut Forkalsrud made changes -
          Attachment build.xml [ 50040 ]
          Attachment pom.xml [ 50041 ]
          Knut Forkalsrud made changes -
          Status Open [ 1 ] Closed [ 6 ]
          Fix Version/s 2.1.1 [ 16024 ]
          Resolution Duplicate [ 3 ]
          Hide
          Knut Forkalsrud added a comment -

          I believe this will be fixed in maven-ant-tasks 2.1.1,
          at least judging by MANTTASKS-178

          Show
          Knut Forkalsrud added a comment - I believe this will be fixed in maven-ant-tasks 2.1.1, at least judging by MANTTASKS-178
          Knut Forkalsrud made changes -
          Field Original Value New Value
          Link This issue duplicates MANTTASKS-178 [ MANTTASKS-178 ]
          Knut Forkalsrud created issue -

            People

            • Assignee:
              Unassigned
              Reporter:
              Knut Forkalsrud
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development