com.infoengine.administration.packaging
Class AntPackager
java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
com.infoengine.administration.packaging.AntPackager
- All Implemented Interfaces:
- JarListener
- public class AntPackager
- extends org.apache.tools.ant.Task
- implements JarListener
Ant task used to generate Info*Engine packages.
Example Ant Usage:
<taskdef name="packager" classname="com.infoengine.administration.packaging.AntPackager">
<classpath refid="cp"/>
</taskdef>
<packager
packageName="Ted's Auto Store Extravaganza"
packageDescription="Sample DCA Application"
outputDir=".">
<tasks dir="${wt.home}/tasks">
<include name="com/ptc/autostore/"/>
</tasks>
<configspecs dir="${wt.home}/conf/dca">
<include name="com/ptc/autostore/"/>
</configspecs>
</packager>
|
Parameters:
packageName
- The name of the package (required if no metainf
).
packageDescription
- The package description (optional).
metainf
- Path to a META-INF directory to get a package descriptor and extras from (optional).
outputDir
- Where to generate the package to (required).
archiveName
- The filename to use for the archive (optional, auto generated from packageName
).
Description:
Generates an Info*Engine task archive (ptctar) or Windchill DCA archive (ptcdar) package file. The tag supports embedded
tasks
and configspecs
tags which work like other ant path related tags. At a minimum an
embedded tasks
tag is required. If both tasks
and configspecs
are present then
a ptcdar file will be generated. If only tasks
is present then a ptctar file will be generated.
The metainf
parameter can be used when more complex packages need to be generated. For example packages that require
extra LDAP infrastructure other than what is described in the task root (e.g. schema, abstract type hierarchies, etc.). To do this
the package manager UI should be used to generate the package once and extract the META-INF from there for use with this tag.
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 |
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 |
packageName
private String packageName
packageDescription
private String packageDescription
metainf
private File metainf
outputDir
private File outputDir
archiveName
private String archiveName
tasks
private Vector tasks
cspecs
private Vector cspecs
RESOURCE
private static final String RESOURCE
- See Also:
- Constant Field Values
AntPackager
public AntPackager()
setPackagename
public void setPackagename(String s)
setPackagedescription
public void setPackagedescription(String s)
setMetainf
public void setMetainf(File f)
setOutputdir
public void setOutputdir(File d)
setArchivename
public void setArchivename(String s)
addConfiguredTasks
public void addConfiguredTasks(org.apache.tools.ant.types.FileSet tsks)
addConfiguredConfigspecs
public void addConfiguredConfigspecs(org.apache.tools.ant.types.FileSet specs)
execute
public void execute()
throws org.apache.tools.ant.BuildException
- Throws:
org.apache.tools.ant.BuildException
emptyFileSets
private boolean emptyFileSets(Vector sets)
toMap
private Map toMap(Vector sets)
throws org.apache.tools.ant.BuildException
- Throws:
org.apache.tools.ant.BuildException
delTree
private static void delTree(File dir)
move
private void move(File from,
File to)
throws IOException
- Throws:
IOException
jarred
public void jarred(String path)
- Description copied from interface:
JarListener
- called each time a file or directory is created in a jar
- Specified by:
jarred
in interface JarListener
- Parameters:
path
- the path within the jar
unjarred
public void unjarred(File f,
boolean overwritten)
- Description copied from interface:
JarListener
- called each time a file or directory is created as a result
of unjarring.
- Specified by:
unjarred
in interface JarListener
- Parameters:
f
- the newly created file or directory
empty
private boolean empty(Object o)