01.02.2013 Views

Software Development Cross Solution - Index of - Free

Software Development Cross Solution - Index of - Free

Software Development Cross Solution - Index of - Free

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

...clean up the mess they make<br />

This is cool. But I saw there’s a clean<br />

target in the build file we haven’t talked<br />

about yet...<br />

Good catch—a clean target is there to clean up<br />

the scraps <strong>of</strong> things that compiling leaves laying<br />

around. It’s important to have a target that will<br />

get the project back to what it would look like if<br />

you checked the project out from the repository.<br />

That way, you can test things from a new<br />

developer’s perspective.<br />

The final target we’ll discuss in the BeatBox build script deletes the directories created during the build<br />

process: the bin directory for compiled classes and the dist directory for the final JAR file.<br />

Since dist is the<br />

default target,<br />

you have to<br />

explicitly tell<br />

Ant to run the<br />

clean target.<br />

File Edit Window Help Scrub<br />

hfsd> ant clean<br />

Buildfile: build.xml<br />

Ant runs the delete tasks to clean<br />

up the bin and dist directories and<br />

remove all <strong>of</strong> their contents.<br />

building your code<br />

clean:<br />

[delete] Deleting directory C:\Users\Developer\workspaces\HFSD\BeatBox\bin<br />

[delete] Deleting directory C:\Users\Developer\workspaces\HFSD\BeatBox\dist<br />

BUILD SUCCESSFUL<br />

Total time: 3 seconds<br />

hfsd><br />

Download at WoweBook.Com<br />

Your tool may call this something else,<br />

but the idea is the same—clean up the<br />

mess made by building your project.<br />

you are here 4 229

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

Saved successfully!

Ooh no, something went wrong!