|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
org.apache.jetspeed.anttasks.ArchetypeDescriptor
public class ArchetypeDescriptor
ArchetypeDescriptor This Ant task is used to generate a Maven2 Archetype Descriptor file.
Field Summary | |
---|---|
private Boolean |
allowPartial
|
private String |
artifactId
|
private File |
baseDir
|
private File |
destFile
|
private String |
header
|
private org.apache.tools.ant.types.Reference |
resourcesRefId
|
private org.apache.tools.ant.types.Reference |
siteResourcesRefId
|
private org.apache.tools.ant.types.Reference |
sourcesRefId
|
private org.apache.tools.ant.types.Reference |
testResourcesRefId
|
private org.apache.tools.ant.types.Reference |
testSourcesRefId
|
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 | |
---|---|
ArchetypeDescriptor()
|
Method Summary | |
---|---|
void |
addText(String header)
Set archetype descriptor header text |
private List |
archetypeFiles(org.apache.tools.ant.types.Reference refId,
String name)
Utility to read fileset refid attributes. |
private String |
canonicalPath(File file)
Utility to get canonical file path |
void |
execute()
Executes task to generate desciptor file. |
void |
setAllowpartial(Boolean allowPartial)
Set archetype partial rules to support execution in existing projects. |
void |
setArtifactid(String artifactId)
Set archetype artifact id. |
void |
setBasedir(File baseDir)
Set archetype base directory for all sources/resources. |
void |
setDestfile(File destFile)
Set archetype descriptor destination file. |
void |
setResourcesrefid(org.apache.tools.ant.types.Reference resourcesRefId)
Set archetype resources fileset refid. |
void |
setSiteresourcesrefid(org.apache.tools.ant.types.Reference siteResourcesRefId)
Set archetype site resources fileset refid. |
void |
setSourcesrefid(org.apache.tools.ant.types.Reference sourcesRefId)
Set archetype sources refid. |
void |
setTestresourcesrefid(org.apache.tools.ant.types.Reference testResourcesRefId)
Set archetype test resources fileset refid. |
void |
setTestsourcesrefid(org.apache.tools.ant.types.Reference testSourcesRefId)
Set archetype test sources fileset refid. |
private void |
writeFiles(PrintWriter writer,
String collectionElementName,
String elementName,
List files)
Utility to write archetype descriptor file lists. |
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 |
---|
private String header
private String artifactId
private Boolean allowPartial
private File baseDir
private File destFile
private org.apache.tools.ant.types.Reference sourcesRefId
private org.apache.tools.ant.types.Reference resourcesRefId
private org.apache.tools.ant.types.Reference testSourcesRefId
private org.apache.tools.ant.types.Reference testResourcesRefId
private org.apache.tools.ant.types.Reference siteResourcesRefId
Constructor Detail |
---|
public ArchetypeDescriptor()
Method Detail |
---|
public void addText(String header)
header
- archetype header textpublic void setArtifactid(String artifactId)
artifactId
- archetype artifact idpublic void setAllowpartial(Boolean allowPartial)
allowPartial
- archetype allow partial settingpublic void setBasedir(File baseDir)
baseDir
- archtype source/resource base directorypublic void setDestfile(File destFile)
destFile
- archetype descriptor file to generatepublic void setSourcesrefid(org.apache.tools.ant.types.Reference sourcesRefId)
sourcesRefId
- archetype sourcespublic void setResourcesrefid(org.apache.tools.ant.types.Reference resourcesRefId)
resourcesRefId
- archetype resourcespublic void setTestsourcesrefid(org.apache.tools.ant.types.Reference testSourcesRefId)
testSourcesRefId
- archetype test sourcespublic void setTestresourcesrefid(org.apache.tools.ant.types.Reference testResourcesRefId)
testResourcesRefId
- archetype test resourcespublic void setSiteresourcesrefid(org.apache.tools.ant.types.Reference siteResourcesRefId)
siteResourcesRefId
- archetype site resourcespublic void execute() throws org.apache.tools.ant.BuildException
execute
in class org.apache.tools.ant.Task
org.apache.tools.ant.BuildException
private List archetypeFiles(org.apache.tools.ant.types.Reference refId, String name) throws org.apache.tools.ant.BuildException
refId
- attribute refidname
- attribute name
org.apache.tools.ant.BuildException
private String canonicalPath(File file)
file
- file to convert to canonical path
private void writeFiles(PrintWriter writer, String collectionElementName, String elementName, List files) throws IOException
writer
- descriptor writercollectionElementName
- collection element nameelementName
- file element namefiles
- list of String file paths
IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |