Ant and Eclipse PDF

Title Ant and Eclipse
Course Programming Methods
Institution British Columbia Institute of Technology
Pages 2
File Size 54.8 KB
File Type PDF
Total Downloads 8
Total Views 187

Summary

Instructions on installing Ant / Eclipse...


Description

HOW TO INSTALL ANT AND CONFIGURE ECLIPSE COMP 1510 2017

1. Installing Ant 1.1. Installing Ant on a Mac. (1) Ensure you have the latest version of Command Line Tools for Xcode by pasting this on a Terminal prompt: xcode-select --install (2) Install homebrew, a package manager for OS X, by copying and pasting this on a Terminal prompt (all on one line): ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" (3) When installation is complete, enter: brew install ant (4) Type ant on the command line to confirm installation is complete. You should see a message that says: Buildfile: build.xml does not exist! Build failed 1.2. Installing Ant on Windows. (1) Download the Ant zip archive from: http://apache.mirror.vexxhost.com//ant/binaries/apache-ant-1.10.1-bin.zip (2) Unzip it in a useful spot, i.e., C: (3) Add an environment variable for ANT HOME which points to the new directory you just added (4) Prepend %ANT_HOME%\bin to your PATH 1

2

COMP 1510 2017

(5) Type ant in a new Command Prompt to confirm installation is complete. You should see a message that says: Buildfile: build.xml does not exist! Build failed 2. Configuring Assignments on Eclipse (1) Download the assignment archive from ShareOut and unzip it in your Eclipse Workspace. You can delete the original archive now. (2) Eclipse: File >New >Java Project (3) Uncheck Use Default Location (4) Use the Browse button beside the Location field to navigate to and select the folder you just added to the Workspace (5) Click Finish (6) Eclipse: Window >Show View >Ant (7) Ant View: Add buildfiles icon (the little bug with the green plus) >Asssignment 1 >build.xml (8) Edit build.xml file line 15 to include your name in the value field instead of Bloggs,Fred (9) Ant view: click the triangle beside the Assignment 1 Ant icon >double click the “clean [default]” ant target. You should see a bunch of stuff in the console, and then BUILD SUCCESSFUL (10) Right click the assignment project in the Package Explorer and choose Refresh (11) Note the zip folder that was created. Every time you choose the ant “clean [default]” target this will be repopulated with your latest code. This is the archive file you submit. (12) Right-click results.html inside the reports folder and select Open with Web Browser. This handy report summarizes all your Checkstyle violations in all your source files. It is updated when you update and save your source code and double click the “clean [default]” ant target. You must eliminate all Checkstyle violations before submitting your assignment. 2.1. Configuring Checkstyle for an Assignment on Eclipse. (1) Add the Assignment 1 Checkstyle configuration file to Eclipse: Preferences >Checkstyle >New >Type: Project Relative Configuration >Name: 1510 A1 >Location: Assigment 1 project folder and choose the Comp1510CheckstyleV6Assn1.xml file >OK >OK (2) Right-click project folder >Properties >Checkstyle >Choose the new configuration file from the dropdown >OK (3) Right click the project folder again and choose project >Checkstyle >Activate Checkstyle...


Similar Free PDFs