org.apache.tools.ant.taskdefs.optional.pvcs
Class Pvcs

java.lang.Object
  |
  +--org.apache.tools.ant.ProjectComponent
        |
        +--org.apache.tools.ant.Task
              |
              +--org.apache.tools.ant.taskdefs.optional.pvcs.Pvcs

public class Pvcs
extends Task

A task that fetches source files from a PVCS archive 19-04-2001

The task now has a more robust parser. It allows for platform independant file paths and supports file names with (). Thanks to Erik Husby for bringing the bug to my attention. 27-04-2001

UNC paths are now handled properly. Fix provided by Don Jeffery. He also added an UpdateOnly flag that, when true, conditions the PVCS get using the -U option to only update those files that have a modification time (in PVCS) that is newer than the existing workfile.

Author:
Thomas Christensen , Don Jeffery

Fields inherited from class org.apache.tools.ant.Task
description, location, target, taskName, taskType, wrapper
 
Fields inherited from class org.apache.tools.ant.ProjectComponent
project
 
Constructor Summary
Pvcs()
          Creates a Pvcs object
 
Method Summary
 void addPvcsproject(PvcsProject p)
          handles <pvcsproject> subelements
 void execute()
          Called by the project to let the task do it's work.
 java.lang.String getForce()
          Get value of force
 boolean getIgnoreReturnCode()
          Get value of ignorereturncode
 java.lang.String getLabel()
          Get value of label
 java.lang.String getPromotiongroup()
          Get value of promotiongroup
 java.lang.String getPvcsbin()
          Get name of the PVCS bin directory
 java.lang.String getPvcsproject()
          Get name of the project in the PVCS repository
 java.util.Vector getPvcsprojects()
          Get name of the project in the PVCS repository
 java.lang.String getRepository()
          Get network name of the PVCS repository
 boolean getUpdateOnly()
           
 java.lang.String getWorkspace()
          Get name of the workspace to store the retrieved files
protected  int runCmd(Commandline cmd, ExecuteStreamHandler out)
           
 void setForce(java.lang.String f)
          Specifies the value of the force argument
 void setIgnoreReturnCode(boolean b)
          If set to true the return value from executing the pvcs commands are ignored.
 void setLabel(java.lang.String l)
          Specifies the name of the label argument
 void setPromotiongroup(java.lang.String w)
          Specifies the name of the promotiongroup argument
 void setPvcsbin(java.lang.String bin)
          Specifies the location of the PVCS bin directory
 void setPvcsproject(java.lang.String prj)
          Specifies the name of the project in the PVCS repository
 void setRepository(java.lang.String repo)
          Specifies the network name of the PVCS repository
 void setUpdateOnly(boolean l)
          If set to true files are gotten only if newer than existing local files.
 void setWorkspace(java.lang.String ws)
          Specifies the name of the workspace to store retrieved files
 
Methods inherited from class org.apache.tools.ant.Task
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, handleErrorOutput, handleOutput, init, log, log, maybeConfigure, perform, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
getProject, setProject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Pvcs

public Pvcs()
Creates a Pvcs object
Method Detail

runCmd

protected int runCmd(Commandline cmd,
                     ExecuteStreamHandler out)

execute

public void execute()
             throws BuildException
Description copied from class: Task
Called by the project to let the task do it's work. This method may be called more than once, if the task is invoked more than once. For example, if target1 and target2 both depend on target3, then running "ant target1 target2" will run all tasks in target3 twice.
Overrides:
execute in class Task
Throws:
BuildException - Something is stopping the build...

getRepository

public java.lang.String getRepository()
Get network name of the PVCS repository
Returns:
String

setRepository

public void setRepository(java.lang.String repo)
Specifies the network name of the PVCS repository
Parameters:
repo - String

getPvcsproject

public java.lang.String getPvcsproject()
Get name of the project in the PVCS repository
Returns:
String

setPvcsproject

public void setPvcsproject(java.lang.String prj)
Specifies the name of the project in the PVCS repository
Parameters:
prj - String

getPvcsprojects

public java.util.Vector getPvcsprojects()
Get name of the project in the PVCS repository
Returns:
Vector

getWorkspace

public java.lang.String getWorkspace()
Get name of the workspace to store the retrieved files
Returns:
String

setWorkspace

public void setWorkspace(java.lang.String ws)
Specifies the name of the workspace to store retrieved files
Parameters:
ws - String

getPvcsbin

public java.lang.String getPvcsbin()
Get name of the PVCS bin directory
Returns:
String

setPvcsbin

public void setPvcsbin(java.lang.String bin)
Specifies the location of the PVCS bin directory
Parameters:
ws - String

getForce

public java.lang.String getForce()
Get value of force
Returns:
String

setForce

public void setForce(java.lang.String f)
Specifies the value of the force argument
Parameters:
repo - String (yes/no)

getPromotiongroup

public java.lang.String getPromotiongroup()
Get value of promotiongroup
Returns:
String

setPromotiongroup

public void setPromotiongroup(java.lang.String w)
Specifies the name of the promotiongroup argument
Parameters:
repo - String

getLabel

public java.lang.String getLabel()
Get value of label
Returns:
String

setLabel

public void setLabel(java.lang.String l)
Specifies the name of the label argument
Parameters:
repo - String

getIgnoreReturnCode

public boolean getIgnoreReturnCode()
Get value of ignorereturncode
Returns:
String

setIgnoreReturnCode

public void setIgnoreReturnCode(boolean b)
If set to true the return value from executing the pvcs commands are ignored.

addPvcsproject

public void addPvcsproject(PvcsProject p)
handles <pvcsproject> subelements
Parameters:
PvcsProject -  

getUpdateOnly

public boolean getUpdateOnly()

setUpdateOnly

public void setUpdateOnly(boolean l)
If set to true files are gotten only if newer than existing local files.


Copyright © 1999-2001 Apache Software Foundation. All Rights Reserved.