wt.tools.boot
Class UpdateLegacyJars

java.lang.Object
  extended byorg.apache.tools.ant.ProjectComponent
      extended byorg.apache.tools.ant.Task
          extended bywt.tools.boot.UpdateLegacyJars

public final class UpdateLegacyJars
extends org.apache.tools.ant.Task

UpdateLegacyJars- This class is an ant task designed to update a set of "legacy" jars following the installation of a DSU or service pack. For each jar file having a corresponding ".jar.config" file, the jar is initially checked to see if the jar contents and BOM file contents share similar parent directories. If so, then Makejar is called for further testing. Jars which don't include any of the same parent directories as the files on the BOM will not be updated. The task requires the following parameters: String bomPath: path of a textfile containing a Bill of Materials list of the updated files. If bomPath represents a directory, all files in the directory will be processed as BOM lists. If bomPath is null or an empty string, then all "legacy" jars will be updated. String rootPath: Root path of the product, i.e. Windchill. The jar files to be updated, their corresponding .jar.config files, and the content files to be used for updating are all assumed to be located under rootPath/codebase. String excludes: [Optional] Comma-delimited list of jars to be excluded from updating. This is used to exclude jars which are separately updated by i-cubed's com.icubed.setup.ServerUpdate class. Implementation Note: the jar update's are performed by wt.tools.boot.MakeJar.


Nested Class Summary
protected  class UpdateLegacyJars.LegacyJarSelector
           
 
Field Summary
private  String bomPath
           
private static String CLASSNAME
           
private static boolean DEBUG
           
private  Set excludesSet
           
private static DebugWriter LOG
           
private static String RESOURCE
           
private  String rootPath
           
private static String SIMPLE_CLASSNAME
           
private  boolean updateAll
           
 
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
UpdateLegacyJars()
           
 
Method Summary
 void accumulateBOM(File bomFile, HashSet paths)
           
 void execute()
           
 HashSet getBOM(String bomPath)
           
 boolean jarNeedsUpdating(File aFile, HashSet bom)
           
static void main(String[] args)
           
 void setBomPath(String aPath)
           
 void setExcludes(String excludesPath)
           
 void setRootPath(String aPath)
           
 void updateJars()
           
 
Methods inherited from class org.apache.tools.ant.Task
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, reconfigure, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
 
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
 

Field Detail

CLASSNAME

private static final String CLASSNAME

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

SIMPLE_CLASSNAME

private static final String SIMPLE_CLASSNAME
See Also:
Constant Field Values

DEBUG

private static final boolean DEBUG

LOG

private static final DebugWriter LOG

bomPath

private String bomPath

rootPath

private String rootPath

updateAll

private boolean updateAll

excludesSet

private Set excludesSet
Constructor Detail

UpdateLegacyJars

public UpdateLegacyJars()
Method Detail

setBomPath

public void setBomPath(String aPath)

setRootPath

public void setRootPath(String aPath)

setExcludes

public void setExcludes(String excludesPath)

execute

public void execute()
             throws org.apache.tools.ant.BuildException
Throws:
org.apache.tools.ant.BuildException - if something goes wrong with the build

accumulateBOM

public void accumulateBOM(File bomFile,
                          HashSet paths)
                   throws IOException
Throws:
IOException

getBOM

public HashSet getBOM(String bomPath)
               throws IOException
Throws:
IOException

jarNeedsUpdating

public boolean jarNeedsUpdating(File aFile,
                                HashSet bom)
                         throws IOException
Throws:
IOException

updateJars

public void updateJars()
                throws Exception
Throws:
Exception

main

public static void main(String[] args)
                 throws Exception
Throws:
Exception