Here's how to install ANT and the related JAR file required by the FTP task:
3. Install ANT
3a. Expand ZIP into a directory of your choice
3b. Set ANT_HOME to the install directory
3c. Add ANT_HOME/bin to the path
4. Unzip NetComponents ZIP to a directory of your choice
5. Copy netcomponents.jar to ANT_HOME/lib
Run ANT either from the command line while sitting in the same directory as the class files or run it from NetBeans, Visual SlickEdit, or another IDE. In NetBeans, for example, when you mount a directory with a buildfile, it shows up in the hierarchy. You can then right-click and execute the ANT script. To run scripts that depend on optional JARs from NetBeans (like the FTP task), you'll need to do some minor NetBeans configuration steps because of the dependency of the task on an optional JAR file. See below for details.
Build files can include compilation, unit testing, JARing, WARing, generating JavaDocs, etc. The build file should always be checked-in to source code control after changes are made.
NetBeans ANT config changes that need to be made when running ANT scripts with an FTP task:
1. Copy NetComponents.jar to <netbeans program directory>modulespatchesorg-apache-tools-ant-module
2. In Tools, Options, Ant Settings, Properties, delete build.sysclasspath=ignore
3. Restart the IDE
To pass arguments to an ANT script from NetBeans, you can either
a. Go to tools, options, Ant Settings, Properties, and add key-value pairs
b. OR use a properties file (*.ant.properties) that is referenced by the ANT script. Netbeans will create this for you if you right-click on the build script and click properties.
10:59:49 PM
|
|