1

Is there a preferred method for calling ant-contrib from your build scripts in such a way that platform differences won't get in the way?

I originally prepared my build from Ubuntu, but when running on OSX with ant-contrib installed via Homebrew, I end up with errors. Seemingly because the contrib jar can't be found.

Alexander Trauzzi
  • 7,277
  • 13
  • 68
  • 112

1 Answers1

1

The preferred way to install Ant-Contrib is mentioned in this page:

  1. Either install it under the lib folder of the Ant installation, and just import it using:

    <taskdef resource="net/sf/antcontrib/antlib.xml"/>
    
  2. Save the Jar file in a known location, perhaps relative to the buildfile, and specify its path:

    <taskdef resource="net/sf/antcontrib/antlib.xml">
      <classpath>
        <pathelement location="path_to_ant_contrib_jar"/>
      </classpath>
    </taskdef>
    
M A
  • 71,713
  • 13
  • 134
  • 174