Uploaded image for project: 'Maven Ant Tasks (RETIRED)'
  1. Maven Ant Tasks (RETIRED)
  2. MANTTASKS-193

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 2.1.0
    • None
    • documentation, pom task
    • None
    • 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.

      Attachments

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

        Issue Links

          Activity

            People

              Unassigned Unassigned
              knut-codehaus@forkalsrud.org Knut Forkalsrud
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: