ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Conor MacNeill" <>
Subject RE: Ant Task for StarTeam Checkouts
Date Mon, 21 Aug 2000 15:06:26 GMT

I have added your task under a new package in the optional area, called scm.
I'm thinking about moving the VSS stuff in there too.

I've also called it <starteam ...>. Let me know if that is not cool.

Also, since I don't have StarTeam, I can;t be sure it will compile.


> -----Original Message-----
> From:
> []On Behalf Of Povirk, Chris
> Sent: Saturday, 19 August 2000 0:09
> To:
> Cc:;
> Subject: Re: Ant Task for StarTeam Checkouts
> I posted a quick description of my AntStarTeamCheckOut task yesterday,
> so today I am sending the code (attached) and a very brief usage manual.
> Here is my Javadoc description.
> > Checks out files from a specific StarTeam server, project,
> view, and folder.
> >
> > This program logs in to a StarTeam server and opens up the
> specified project and view. Then, it searches through that view
> for the given folder (or, if
> > you prefer, it uses the
> > root folder). Beginning with that folder and optionally
> continuing recursivesly, AntStarTeamCheckOut compares each file
> with your include and exclude
> > filters and checks it
> > out only if appropriate.
> >
> > Checked out files go to a directory you specify under the
> subfolder named for the default StarTeam path to the view. That
> is, if you entered
> > /home/cpovirk/work as the target
> > folder, your project was named "OurProject," the given view was
> named "TestView," and that view is stored by default at
> "C:\projects\Test," your files
> > would be checked out
> > to /home/cpovirk/work/Test." I avoided using the project name
> in the path because you may want to keep several versions of the
> same project on your
> > computer, and I didn't
> > want to use the view name, as there may be many "Test" or
> "Version 1.0" views, for example. This system's success, of
> course, depends on what you set the
> > default path to
> > in StarTeam.
> >
> > You can set AntStarTeamCheckOut to verbose or quiet mode. Also,
> it has a safeguard against overwriting the files on your
> computer: If the target directory
> > you specify
> > already exists, the program will throw a BuildException. To
> override the exception, set force to true.
> >
> > This program makes use of functions from the StarTeam API. As a
> result AntStarTeamCheckOut is available only to licensed users of
> StarTeam and requires
> > the
> > StarTeam SDK to function. You must have starteam-sdk.jar in
> your classpath to run this program. For more information about
> the StarTeam API and how to
> > license it, see the link below.
> >
> Parameters:
>     serverName -- the name of the StarTeam server to log in to
>     serverPort -- the above server's port used for StarTeam
>     projectName -- the name of the project to open
>     viewName -- the view in that project to scan
>     folderName -- the base folder in the view to check out from
>     username -- your username on the server
>     password -- your password
>     targetFolder -- the local directory to check out files to; a
> directory named for the project folder will appear under here
>     force -- boolean value checked when targetFolder exists; if true,
> AntStarTeamCheckOut will overwrite files; if false; it will throw a
> BuildException
>     verbose -- if true, filenames are displayed as the files are checked
> out; if false, only a total number is displayed at the end
>     recursion -- tells whether to recursively search subfolders for
> files to check out
>     includes -- filter for files to include; separate multiple filters
> by spaces
>     excludes -- filter for files to exclude; separate multiple filters
> by spaces
> Example of Usage:
>     <taskdef name="starTeamCheckOut" classname="AntStarTeamCheckOut" />
>     <starTeamCheckOut serverName="k6server" serverPort="49201"
>         projectName="database" viewName="development"
>         folderName="java" username="jsmith" password="h1536E"
>         targetFolder="/usr/local/projects" force="true"
>         verbose="false" recursion="true" includes="*.java *.jsp"
>         excludes=""
>     />
> Logs in to the server "k6server" on port 49201 as the user "jsmith"
> using the password "h1536E".  Checks out all *.java and *.jsp files
> underneath the "java" folder in the "development" view of the project
> named "database".  Display only the total number of files checked out,
> and continue even if the target folder already exists.
> Three things that could be done with this project:
> - Verify that it works on Windows systems (tested only on Linux and
> SunOS).
> - Build in Ant's more powerful includes and excludes.  My program cannot
> use directory wildcards like "**/java/*"; it can only handle simple
> patterns like "*.class *.jar".
> - Rewrite the "force" code.  Right now if you checked out two separate
> projects to "/usr/local/projects," AntStarTeamCheckOut would think you
> were overwriting the first project with the second, for it only looks to
> see if the targetFolder exists, not if targetFolder/[project folder]
> does.
> Remember that you must be a licensed user of StarTeam to use this task.
> --Chris Povirk

View raw message