Presentation is loading. Please wait.

Presentation is loading. Please wait.

Distributed Java Programming 107-198 Build Management  A repeatable build management process allows you to integrate the development efforts of your team.

Similar presentations


Presentation on theme: "Distributed Java Programming 107-198 Build Management  A repeatable build management process allows you to integrate the development efforts of your team."— Presentation transcript:

1 Distributed Java Programming 107-198 Build Management  A repeatable build management process allows you to integrate the development efforts of your team often and early.  Traditionally build management has been a combination of manual steps with hard to follow shell scripts.  Because of the cumbersome nature of performing builds, most development teams do not practice any build management.

2 Distributed Java Programming 107-198 What is Ant?  ANT is a Java build utility.  Since ANT is Java-based it is platform independent.  ANT is an XML-based tool for automating the various tasks associated with doing a build. These tasks include:  Automated checking out of source code  Incremental compilation of Java source code  File manipulation  Creation of JAR, WAR and EAR files for application deployment  Automated running of unit tests  Launching of various processes needed during build  Generation of Javadocs

3 Distributed Java Programming 107-198 A Basic ANT File  A basic ANT file will consist of one or more of the following elements:  Properties – Used throughout the application to convey information  Targets – A specific action that will be taken by an ANT script  Tasks – A unit of work  Dependencies

4 Distributed Java Programming 107-198 Basic Ant File Lists all of the build options"/> generates the docs (javadoc,...)"/> Builds a distribution"/> Deploys a file to the local Tomcat directory"/>

5 Distributed Java Programming 107-198 Compiling Source Files <javac destdir="${jmethod.app.dir}/classes" classpath="${myenv.CLASSPATH}" debug="on">

6 Distributed Java Programming 107-198 Manipulating Files <format property="TODAY_US" pattern="d-MMMM-yyyy" locale="en"/>

7 Distributed Java Programming 107-198 Building Jar Files <fileset dir="${jmethod.app.dir}/classes“ includes="**/*.class"/>

8 Distributed Java Programming 107-198 Building WAR Files <war warfile="${jmethod.dist.dir}/${jmethod.app.name}.war“ webxml="${jmethod.app.dir}/config/web.xml">

9 Distributed Java Programming 107-198 Creating your Java Docs <javadoc packagenames="org.*" sourcepath="${jmethod.app.dir}/src" defaultexcludes="yes" destdir="${jmethod.app.dir}/docs/api" author="true" version="true" use="true" windowtitle=“Test Title"> Test Header ]]> Copyright © 2002 Test All Rights Reserved. ]]>

10 Distributed Java Programming 107-198 Assignment #1B Write 4 String manipulation classes:  StringConcatenate - Concatenate the two strings  StringSubstring - Substring a string  StringLower - Lower case a string  StringUpper - Upper case a string  Put all of the strings in a single package.  Fully JavaDoc all classes with comments.  Write a JUnit Test case for each of the classes.  Write an ANT Script that will:  Compile all classes.  Jar all class files into a redistributable JAR.  Produce JavaDoc for all class files.  Run all JUnit Tests

11 Distributed Java Programming 107-198 Resources ANT: The Definitive Guide O’Reilly Press Jakarta Web Site http://jakarta.apache.org/ant CVS Home http://cvshome.org


Download ppt "Distributed Java Programming 107-198 Build Management  A repeatable build management process allows you to integrate the development efforts of your team."

Similar presentations


Ads by Google