18.04.2015 Views

ArcGIS Engine Developer Guide

ArcGIS Engine Developer Guide

ArcGIS Engine Developer Guide

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

BUILDING A COMMAND-LINE JAVA APPLICATION<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

2. Save and close the file.<br />

Testing your build environment<br />

Now that you’ve set up all the necessary files for building your application, test it<br />

before proceeding.<br />

1. Open a command prompt and use the “cd” command to change to the root<br />

folder of your project. For example:<br />

cd C:\TintoPoint<br />

2. You should have all the build script files located in this root directory.<br />

3. Type “arcgisant” at the command prompt.<br />

4. You should receive output similar to the following:<br />

Buildfile: build.xml<br />

init:<br />

[mkdir] Created dir: Q:\dop\dev\ant\projects\engine.scenario\build<br />

[mkdir] Created dir: Q:\dop\dev\ant\projects\<br />

engine.scenario\build\classes<br />

validate-engine:<br />

compile:<br />

BUILD FAILED<br />

file:Q:/dop/dev/ant/projects/engine.scenario/build.xml:49: srcdir<br />

"Q:\dop\dev\ant\projects\engine.scenario\src" does not exist!<br />

Total time: 1 second<br />

The build should fail since you do not have any source to build yet. If you look<br />

on disk at your project directory, you should notice a build folder was created.<br />

This is where all build products will be generated.<br />

Clean up the build with the following command:<br />

arcgisant clean<br />

This should generate output similar to the following:<br />

Buildfile: build.xml<br />

clean:<br />

[delete] Deleting directory Q:\dop\dev\ant\projects\engine.scenario\build<br />

[echo] build directory gone!<br />

Chapter 6 • <strong>Developer</strong> scenarios • 415

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!