Pig
  1. Pig
  2. PIG-2362

Rework Ant build.xml to use macrodef instead of antcall

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.12.0
    • Component/s: None
    • Labels:
      None

      Description

      Antcall is evil: http://www.build-doctor.com/2008/03/13/antcall-is-evil/
      We'd better use macrodef and let Ant build a clean dependency graph.
      http://ant.apache.org/manual/Tasks/macrodef.html

      Right now we do like this:

      <target name="buildAllJars">
        <antcall target="buildJar">
          <param name="build.dir" value="jar-A"/>
        </antcall>
        <antcall target="buildJar">
          <param name="build.dir" value="jar-B"/>
        </antcall>
        <antcall target="buildJar">
          <param name="build.dir" value="jar-C"/>
        </antcall>
      </target>
      <target name="buildJar">
        <jar destfile="target/${build.dir}.jar" basedir="${build.dir}/classfiles"/>
      </target>
      

      But it would be better if we did like this:

      <target name="buildAllJars">
        <buildJar build.dir="jar-A"/>
        <buildJar build.dir="jar-B"/>
        <buildJar build.dir="jar-C"/>
      </target>
      
      <macrodef name="buildJar">
        <attribute name="build.dir"/>
        <jar destfile="target/${build.dir}.jar" basedir="${build.dir}/classfiles"/>
      </macrodef>
      
      1. PIG-2362.1.patch
        14 kB
        Gianmarco De Francisci Morales
      2. PIG-2362.10.patch
        75 kB
        Cheolsoo Park
      3. PIG-2362.2.patch
        29 kB
        Gianmarco De Francisci Morales
      4. PIG-2362.3.patch
        29 kB
        Gianmarco De Francisci Morales
      5. PIG-2362.4.patch
        29 kB
        Gianmarco De Francisci Morales
      6. PIG-2362.5.patch
        30 kB
        Gianmarco De Francisci Morales
      7. PIG-2362.6.patch
        29 kB
        Gianmarco De Francisci Morales
      8. PIG-2362.7.patch
        31 kB
        Cheolsoo Park
      9. PIG-2362.8.patch
        31 kB
        Cheolsoo Park
      10. PIG-2362.9.patch
        76 kB
        Cheolsoo Park
      11. PIG-2362.9.patch.nowhitespace
        28 kB
        Cheolsoo Park

        Issue Links

          Activity

          Gianmarco De Francisci Morales created issue -
          Gianmarco De Francisci Morales made changes -
          Field Original Value New Value
          Attachment PIG-2362.1.patch [ 12503672 ]
          Gianmarco De Francisci Morales made changes -
          Attachment PIG-2362.2.patch [ 12508099 ]
          Gianmarco De Francisci Morales made changes -
          Status Open [ 1 ] Patch Available [ 10002 ]
          Fix Version/s 0.11 [ 12318878 ]
          Gianmarco De Francisci Morales made changes -
          Attachment PIG-2362.3.patch [ 12508675 ]
          Gianmarco De Francisci Morales made changes -
          Attachment PIG-2362.4.patch [ 12508773 ]
          Gianmarco De Francisci Morales made changes -
          Attachment PIG-2362.5.patch [ 12510974 ]
          Gianmarco De Francisci Morales made changes -
          Link This issue duplicates PIG-2599 [ PIG-2599 ]
          Gianmarco De Francisci Morales made changes -
          Link This issue duplicates PIG-2599 [ PIG-2599 ]
          Gianmarco De Francisci Morales made changes -
          Link This issue is superceded by PIG-2599 [ PIG-2599 ]
          Gianmarco De Francisci Morales made changes -
          Attachment PIG-2362.6.patch [ 12545479 ]
          Cheolsoo Park made changes -
          Attachment PIG-2362.7.patch [ 12552060 ]
          Cheolsoo Park made changes -
          Fix Version/s 0.12 [ 12323380 ]
          Cheolsoo Park made changes -
          Fix Version/s 0.11 [ 12318878 ]
          Cheolsoo Park made changes -
          Attachment PIG-2362.8.patch [ 12552742 ]
          Gianmarco De Francisci Morales made changes -
          Status Patch Available [ 10002 ] Open [ 1 ]
          Cheolsoo Park made changes -
          Attachment PIG-2362.9.patch [ 12562964 ]
          Attachment PIG-2362.9.patch.nowhitespace [ 12562965 ]
          Cheolsoo Park made changes -
          Attachment PIG-2362.10.patch [ 12563188 ]
          Cheolsoo Park made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Daniel Dai made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

            People

            • Assignee:
              Gianmarco De Francisci Morales
              Reporter:
              Gianmarco De Francisci Morales
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development