Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-4780

maven-script-ant testcase not working with ant 1.8

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Incomplete
    • 2.2.1
    • None
    • Integration Tests
    • None

    Description

      test.build.xml for maven-script-ant contains this:
      ----------------
      <project>
      <target name="init-cp" unless="cp-exists">
      <path id="maven.plugin.classpath" location="path-is-missing"/>
      </target>

      <target name="test">
      <condition property="cp-exists">
      <isreference refid="maven.plugin.classpath"/>
      </condition>
      <antcall target="init-cp" inheritall="true"/>

      <property name="cp" refId="maven.plugin.classpath"/>
      <echo>plugin classpath is: ${cp}</echo>
      </target>
      </project>
      ----------------

      This assumes that definition of path id "maven.plugin.classpath" will be propagated back to target "test" from target "init-cp". This works with ant 1.7 but not with 1.8.x. Documentation doesn't promise this behaviour either.

      Easily verifiable by running "ant test" in the directory with build.xml like this one with both versions of ant.

      Attachments

        Activity

          People

            Unassigned Unassigned
            sochotnicky Stanislav Ochotnicky
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: