ANT on the Wire Using FTP, Mail, SVN, and VSS tasks (and a bonus task)

Slides:



Advertisements
Similar presentations
Project Workflow Axel Jensen Copyright 2008 Axel Jensen.
Advertisements

ANT Another Neat Tool. What is ANT? What is Apache Ant? Ant is a Java-based build tool. In theory, it is kind of like Make, without Make's wrinkles and.
Extending Eclipse Kai-Uwe Mätzel IBM OTI Labs Zurich
Introduction to Eclipse cs112b1 – Lab01 by Rui Shi.
Struts Portlet Copyright © Liferay, Inc. All Rights Reserved. No material may be reproduced electronically or in print without written permission.
Design By Contract Using JMSAssert.
Java Development Kit Installation Guide Sun Microsystems.
ACT! “Web” Plugins ACC Webinar (Part 1of 2) Brian Mowka and Jamie Aurand December 2010.
Introduction to Maven 2.0 An open source build tool for Enterprise Java projects Mahen Goonewardene.
Coursework 2: getting started (3) – hosting static web pages Chris Greenhalgh G54UBI /
 Please sit next to your partner.  If you don’t have a partner, please find one now.
1. What is Subversion? Why do we need CM? Basic concepts Repositories Options Setup Clients Options Setup Operation Troubleshooting Slide 2.
Developing in CAS. Why? As distributed you edit CAS 3 with Eclipse and build with Maven 2 – Best Practice for Release Engineering – Difficult edit-debug.
Web Application Server Apache Tomcat Downloading and Deployment Guide.
ANT – Another Neat Tool Representation and Management of Data on the Internet.
Developing CAS in Eclipse
Get android development environment running. Install – Get and install JDK 5 or 6 (see link in the.
MC365 Ant. Today We Will Cover: Overview of Ant Installing Ant Using the Ant command line tool Various Ant commands available Using Ant in Eclipse.
March 12 & 13, 2007 Mark Drew Reloaded.
1 Ant – Another Neat Tool Representation and Management of Data on the Internet.
Today Rest of the demos (no escape!) Now that you tried group work without version control, making your life easier WITH it. You all got groups for #2?
Version Control at UCB Version control with Subversion and Subclipse.
How to make it work? Doncho Minkov Telerik Academy academy.telerik.com Technical Trainer
Automating the Build Process using ANT SE-2030 Dr. Mark L. Hornick 1.
Microsoft Windows 2003 Server. Client/Server Environment Many client computers connect to a server.
Version Control with Subversion. What is Version Control Good For? Maintaining project/file history - so you don’t have to worry about it Managing collaboration.
Servlets Environment Setup. Agenda:  Setting up Java Development Kit  Setting up Web Server: Tomcat  Setting up CLASSPATH.
Sumedha Rubasinghe October,2009 Introduction to Programming Tools.
Scoring Program Updates & XML upload to the NSRCA web site July 2013.
Automating the Build Process using Ant SE-2030 Dr. Rob Hasker 1 Based on material by Dr. Mark L. Hornick.
E-Commerce: Introduction to Web Development 1 Dr. Lawrence West, Management Dept., University of Central Florida Topics What is a Web.
Software Engineering in Robotics Packaging and Deployment of Systems Henrik I. Christensen –
LiveCycle Data Services Introduction Part 2. Part 2? This is the second in our series on LiveCycle Data Services. If you missed our first presentation,
FTP Server and FTP Commands By Nanda Ganesan, Ph.D. © Nanda Ganesan, All Rights Reserved.
Design and Programming Chapter 7 Applied Software Project Management, Stellman & Greene See also:
The Basics of Javadoc Presented By: Wes Toland. Outline  Overview  Background  Environment  Features Javadoc Comment Format Javadoc Program HTML API.
DEV325 Deploying Visual Studio.NET Applications Billy Hollis Author / Consultant.
Ant Build Tools.  Creating a product from source may take several steps: Compile Link Copy files to various directories Remove intermediate files Generate.
COP 3330 Notes 1/12. Today's topics Downloading Java and Eclipse Hello World Basic control structures Basic I/O Strings.
July 2011CMSC 341 CVS/Ant 1 CMSC 341 Java Packages Ant CVS Project Submission.
Version Control Systems with Subversion (SVN) and Tortoise.
Ant & Jar Ant – Java-based build tool Jar – pkzip archive, that contains metadata (a manifest file) that the JRE understands.
INFSO-RI Enabling Grids for E-sciencE SCDB C. Loomis / Michel Jouvin (LAL-Orsay) Quattor Tutorial LCG T2 Workshop June 16, 2006.
Managed by UT-Battelle for the Department of Energy Kay Kasemir, Xihui Chen ORNL/SNS April Control System Studio Training - Development.
Austin Java Users Group 2005-Feb-22 Presented by Matt Albrecht.
Software Development COMP220/COMP285 Seb Coope Introducing Ant These slides are mainly based on “Java Development with Ant” - E. Hatcher & S.Loughran.
Chapter 1 Introducing Ant. What is ant? Ant is a build tool  Automate the tasks of compiling code, running test, and packaging the results for redistribution.
Maven for building Java applications By Nalin De Zoysa
Surya Bahadur Kathayat Outline  Ramses  Installing Ramses  Ramses Perspective (Views and Editors)  Importing/Exporting Example.
1 G52IWS: Example Web-services Chris Greenhalgh. 2 Contents Software requirements AXIS web service run-time components Getting started with Jetty & AXIS.
Trilinos Framework: Next Steps Thursday November 9, :45-9:30 a.m. Jim Willenbring Mike Phenow.
FTP COMMANDS OBJECTIVES. General overview. Introduction to FTP server. Types of FTP users. FTP commands examples. FTP commands in action (example of use).
Course Overview, JDK & NetBeans BCIS 3680 Enterprise Programming.
Open project in Microsoft Visual Studio → build program in “Release” mode.
How to configure, build and install Trilinos November 2, :30-9:30 a.m. Jim Willenbring.
(1) Code Walkthrough robocode-pmj-dacruzer Philip Johnson Collaborative Software Development Laboratory Information and Computer Sciences University of.
Time to apply stuff… Faculty of Mathematics and Physics Charles University in Prague 5 th October 2015 Workshop 1 – Java Wrestling.
TEAM FOUNDATION VERSION CONTROL AN OVERVIEW AND WALKTHROUGH By: Michael Mallar.
Integrity Check As You Well Know, It Is A Violation Of Academic Integrity To Fake The Results On Any.
How to install JavaCV in Eclipse. Make sure to download and install all these before you proceed Eclipse for Java EE developers (current is Juno)
Today Javadoc. Packages and static import. Viewing API source code. Upcoming Topics: –protected access modifier –Using the debugger in Eclipse –JUnit testing.
Software Development Tools COMP220 Seb Coope Ant: Datatypes and Properties These slides are mainly based on “Java Development with Ant” - E. Hatcher &
Anjana & Shankar September,2010 Introduction to Programming Tools.
Build Automation with Gradle
Instructor: Prasun Dewan (FB 150,
slides borrowed and adapted from Alex Mariakis and CSE 390a
Cordova & Cordova Plugin Installation and Management
Nilanjan Banerjee Java Packages Ant CVS Project Submission
Presentation transcript:

ANT on the Wire Using FTP, Mail, SVN, and VSS tasks (and a bonus task)

Your host… Marc Esher CF since 2000 Java since 2001 Contributor to MXUnit unit testing framework for CF NOT an ANT guru Plug alert: come see us talk about MXUnit and unit testing at Webmaniacs in May!

What this is not A high-level ANT overview A cursory look at a bunch of neat features A crash course in basic ANT The last word on any of these topics

What this is A “how-to” session; as such, it will be slightly slower-paced than most meetups A solid look at a few really useful features

Takeaways Know where to go to download all dependencies for these ANT tasks Know how to install all dependencies and configure ANT to run these tasks Run these tasks from Eclipse or command line Learn by example how to use these tasks for common operations Learn how to read the ANT documentation for more info on these tasks Not be afraid to try any of this on your own Familiar enough with these tasks that a more complicated build file is not overwhelming

Tasks we’ll cover FTP SVN (for accessing subversion repository) VSS (demo how to configure and what the task looks like) Version numbering using propertyfile

Beginning with the End Putting all these tasks together to: Check out version.properties file, increment version, use version for zip file name, check it back in Package app into zip (not covered in pres.) Run unit tests and results Upload zip file to google code (not covered in pres.) FTP version.properties file to website Re-init application so it reads that file FTP test results to website

Demo Build File

Let’s go: The ANT manual 3 key sections: Concepts and Types – explains all about directory concepts (**/ vs */, filesets, etc) and tons of other stuff Core tasks – all the built-in tasks you can usually use out of the box (with some exceptions) Optional tasks – stuff you probably have but also are more likely to require downloading additional dependencies NOTE: tasks requiring dependencies let you know they require dependencies

Our dependencies FTP needs: commons-oro and commons-net Mail needs: javamail and activation framework SVN needs: svnant task JavaHL: easiest to install Subclipse plugin through Eclipse update site (even if you disable the plugin as soon as you install it!) (we’ll use this in eclipse) VSS needs No jars, but you do need vss client installed on your machine Eclipse users: Once these are added to your file system, you need to tell ANT about them in Eclipse

Setting up ANT Assumes you have Eclipse installed If not, you can download ANT separately and do all of this stuff without Eclipse Good idea to know how to use ANT outside of eclipse – makes automation easier For this demonstration, I’ll be using ANT 1.7 that is bundled with Eclipse 3.3

Cont. Find ANT bin directory. For Eclipse, this is in %eclipse_root%\plugins\org.apache.ant_ 1.7….\bin Add ANT bin directory to system environment “path” variable Run ant –version to get some basic information

Demo ANT at command line

Cont. If you get a “cannot find tools.jar” message, it means ANT’s using the JRE and NOT the JDK. Only important if you need a compiler (or get annoyed by the tools.jar message) Install the JDK (if you don’t have it) Find your JDK’s bin path. Copy and replace the existing java bin directory with the new bin directory in your environment PATH variable

Demo adding JDK

Our build file Simple build file with test targets init test testFTP testSVN testVSS testVersion HINT: even for the final build file in your projects, keep these test targets… they’re great for confirming that new folks working on the project are correctly configured

test (core task) 1. Run and confirm it fails 2. Add dependencies to ANT lib dir Run and confirm it fails… no properties set up 4. (switch to real properties file) 5. Run in Eclipse 6. Run at command line

Demo test

Another example MXUnit build file runTests

Learn more about mail task Ant tasks – Core Tasks – Mail You can do all the normal mail stuff You can attach files to messages Cool tip: use the messagefile attribute for easier-to-manage html s

testFTP (optional task) 1. Run and confirm it fails 2. Add dependencies to ANT lib dir Run and confirm it fails (no properties) 4. Switch to real properties file 5. Run in Eclipse 6. Run at command line

Demo testFTP

A few more FTP examples MXUnit build file updatewebsite publishTestResults

Learn more about FTP task Ant tasks – Optional Tasks – FTP You can use this to synchronize using the various “time…” attributes You can control the target directory for put operations

testSVN (the trickiest) 1. Run and confirm it fails 2. Install plugin using Update Site 3. Add dependencies to ANT lib dir Get at 4. In Eclipse plugins directory, navigate to the org.tigris.subversion.javahl.win32 directory. Copy that path. 5. Paste that path into your system’s PATH environment variable 6. RESTART YOUR COMPUTER

testSVN, cont. 7. Run and confirm it fails 8. Add taskdef 9. Run in eclipse 10. Run in command line

Demo testSVN

Another SVN example MXUnit build file incrementVersion tagVersion

testVSS (optional tasks… I’ll be showing vssget) 1. Run and confirm it fails 2. Add vss path to environment PATH variable e.g. C:\Program Files\Microsoft Visual Studio\VSS\win32 3. Run and imagine it succeeded

Demo testVSS Also show the entries from GetLatest.xml

Learn more about VSS tasks Ant tasks – Optional Tasks – Microsoft Visual SourceSafe Tasks This is a suite of tests… vssget, vsslabel, vsscheckin, vsscheckout, etc For vssget, I advise using failonerror=“false”, writablefiles=“skip”, filetimestamp=“updated” Vsslabel is similar to tagging in SVN

Bonus: propertyfile for versioning propertyfile task writes/updates a properties file You can perform increments on properties You then read those properties using the property task with the file attribute Perfect for versioning

Demo testVersion Eclipse Command line See version number increase Note we didn’t manually create the file Add constructs like “rc” notations

Q & A