320 likes | 608 Views
APACHE ANT. By Jovonte, Carson, and Fidelis. Outline. What is it Why use Ant How it works Built-in tasks Running Ant Of course examples!!!. What is Ant?. Java library and command-line tool Automates software building processes Platform-independent scripting tool
E N D
APACHE ANT By Jovonte, Carson, and Fidelis
Outline • What is it • Why use Ant • How it works • Built-in tasks • Running Ant • Of course examples!!!
What is Ant? • Java library and command-line tool • Automates software building processes • Platform-independent scripting tool • Windows and UNIX/Linux
Why use Ant? • Easy to use • Extremely flexible • Platform Independent • Does not impose coding conventions • Most IDE’s are hard to automate and harder to setup
How does it work? • Three components: JDK, XML parser, and Ant • Easy to create own Ant “tasks”, in addition to core tasks • Tasks do the actual “build” work in Ant • Eclipse, NetBeans, JBuilder, VisualAge, and almost any other Java IDE has Ant integration built-in to the system • Extremely flexible • C, C++, Java
Running Ant • 4 Easy steps to run ant. • Make a simple class file in Java • Make a simple build.xml • Place both files into the same directory • Run “ant compile jar run”
Running Ant • 4 Easy steps to run ant. • Make a simple class file in Java • Make a simple build.xml • Place both files into the same directory • Run “ant compile jar run”
Running Ant • 4 Easy steps to run ant. • Make a simple class file in Java • Make a simple build.xml • Place both files into the same directory • Run “ant compile jar run”
Running Ant • 4 Easy steps to run ant. • Make a simple class file in Java • Make a simple build.xml • Place both files into the same directory • Run “ant compile jar run”
Running Ant • 4 Easy steps to run ant. • Make a simple class file in Java • Make a simple build.xml • Place both files into the same directory • Run “ant compile jar run”
Output Output
Ant with Android (windows) • Install the correct paths • Setup ant.properties / Keystore - Use the final command
Install Paths Apache Ant C:\Users\Carson\Desktop~~\Apache Ant\apache-ant-1.9.3\bin; JarSigner Installed with the java sdk (Java SE) Android C:\Users\Carson\Desktop\Workspace\Eclipse\tools Your tools can be downloaded by the android ADT/SDK when you are using Eclipse.
Keystore (JarSigner) - Create an ant.properties file. Notepad++ can save ‘.properties’ files. key.store = .keystore key.alias = aliasName key.store.password = keystorePassword key.alias.password = aliasPassword - ‘keytool -genkey -keyalg RSA -keystore .keystore -alias aliasName -storepass keystorePassword’
What is the final command? - ant release Creates the ‘.apk‘ file eligible for release on the android market-- in your project’s /bin folder.
From Scratch 1/5 Where are the files: build.xml??? ant.properties .keystore .apk
From Scratch 2/5 Where are the files: ant.properties??? .keystore .apk
From Scratch 3/5 Where are the files: .keystore??? .apk
From Scratch 4/5 Where are the files: .apk ???
From Scratch 5/5 ant release Where are the files: .apk!!!!!!
References • "Apache Ant." The Apache Ant Project. N.p., 1999. Web. 11 Feb. 2014 • Cymerman, Michael. "Automate Your Build Process Using Java and Ant." JavaWorld. JavaWorld, 20 Oct. 2000. Web. 28 Jan. 2014. • MacNeill, Conor. "What Is Ant?" CodeFeed. N.p., 2003. Web. 15 Feb. 2014.