1 / 30

APACHE ANT

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

nona
Download Presentation

APACHE ANT

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. APACHE ANT By Jovonte, Carson, and Fidelis

  2. Outline • What is it • Why use Ant • How it works • Built-in tasks • Running Ant • Of course examples!!!

  3. What is Ant? • Java library and command-line tool • Automates software building processes • Platform-independent scripting tool • Windows and UNIX/Linux

  4. 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

  5. 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

  6. Some Built-in Tasks

  7. Some Built-in Tasks cont’d.

  8. 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”

  9. 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”

  10. HelloWorld

  11. 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”

  12. 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”

  13. 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”

  14. Output Output

  15. Java Example

  16. Ant with Android (windows) • Install the correct paths • Setup ant.properties / Keystore - Use the final command

  17. 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.

  18. 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’

  19. What is the final command? - ant release Creates the ‘.apk‘ file eligible for release on the android market-- in your project’s /bin folder.

  20. From Scratch 1/5 Where are the files: build.xml??? ant.properties .keystore .apk

  21. From Scratch 2/5 Where are the files: ant.properties??? .keystore .apk

  22. From Scratch 3/5 Where are the files: .keystore??? .apk

  23. From Scratch 4/5 Where are the files: .apk ???

  24. From Scratch 5/5 ant release Where are the files: .apk!!!!!!

  25. Any Questions?

  26. 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.

More Related