public class ArchetypeDescriptorBuilder
extends java.lang.Object
| Constructor and Description |
|---|
ArchetypeDescriptorBuilder() |
| Modifier and Type | Method and Description |
|---|---|
private static void |
addResourceToDescriptor(org.codehaus.plexus.util.xml.Xpp3Dom resource,
ArchetypeDescriptor descriptor)
Adds the resource element
resource to the list of resources in the
descriptor and sets its TemplateDescriptor to
filtered if the attribute filtered was not
specified or its value is "true", or false
if its value is "false", and the encoding specified
in the encoding attribute or the Java virtual machine's default if
it is not defined. |
private static void |
addSiteResourceToDescriptor(org.codehaus.plexus.util.xml.Xpp3Dom siteResource,
ArchetypeDescriptor descriptor)
Adds the site-resource element
resource to the list of site-resources in the
descriptor and sets its TemplateDescriptor to
filtered if the attribute filtered was not
specified or its value is "true", or false
if its value is "false", and the encoding specified
in the encoding attribute or the Java virtual machine's default if
it is not defined. |
private static void |
addSourceToDescriptor(org.codehaus.plexus.util.xml.Xpp3Dom source,
ArchetypeDescriptor descriptor)
Adds the source element
source to the list of sources in the
descriptor and sets its TemplateDescriptor to
filtered and with the encoding specified in the encoding
attribute or the Java virtual machine's default if it is not defined. |
private static void |
addTestResourceToDescriptor(org.codehaus.plexus.util.xml.Xpp3Dom testResource,
ArchetypeDescriptor descriptor)
Adds the test-resource element
resource to the list of test-resources in the
descriptor and sets its TemplateDescriptor to
filtered if the attribute filtered was not
specified or its value is "true", or false
if its value is "false", and the encoding specified
in the encoding attribute or the Java virtual machine's default if
it is not defined. |
private static void |
addTestSourceToDescriptor(org.codehaus.plexus.util.xml.Xpp3Dom testSource,
ArchetypeDescriptor descriptor)
Adds the test-source element
source to the list of sources in the
descriptor and sets its TemplateDescriptor to
filtered and with the encoding specified in the encoding
attribute or the Java virtual machine's default if it is not defined. |
ArchetypeDescriptor |
build(java.io.Reader reader) |
private static boolean |
getValueFilteredAttribute(java.lang.String str) |
public ArchetypeDescriptor build(java.io.Reader reader) throws java.io.IOException, org.codehaus.plexus.util.xml.pull.XmlPullParserException
java.io.IOExceptionorg.codehaus.plexus.util.xml.pull.XmlPullParserExceptionprivate static void addSourceToDescriptor(org.codehaus.plexus.util.xml.Xpp3Dom source,
ArchetypeDescriptor descriptor)
throws org.codehaus.plexus.util.xml.pull.XmlPullParserException
source to the list of sources in the
descriptor and sets its TemplateDescriptor to
filtered and with the encoding specified in the encoding
attribute or the Java virtual machine's default if it is not defined.source - a <source> element from the <sources>descriptor - the ArchetypeDescriptor to add the source template to.org.codehaus.plexus.util.xml.pull.XmlPullParserException - if the encoding specified is not valid or supported.private static void addResourceToDescriptor(org.codehaus.plexus.util.xml.Xpp3Dom resource,
ArchetypeDescriptor descriptor)
throws org.codehaus.plexus.util.xml.pull.XmlPullParserException
resource to the list of resources in the
descriptor and sets its TemplateDescriptor to
filtered if the attribute filtered was not
specified or its value is "true", or false
if its value is "false", and the encoding specified
in the encoding attribute or the Java virtual machine's default if
it is not defined. If the resource is a property file (ends in
.properties) its encoding will be set to iso-8859-1
even if some other encoding is specified in the attribute.resource - a <resource> element from the <resources>descriptor - the ArchetypeDescriptor to add the resource template to.org.codehaus.plexus.util.xml.pull.XmlPullParserException - if the encoding specified is not valid or supported or if the
value of the attribute filtered is no valid.private static void addTestSourceToDescriptor(org.codehaus.plexus.util.xml.Xpp3Dom testSource,
ArchetypeDescriptor descriptor)
throws org.codehaus.plexus.util.xml.pull.XmlPullParserException
source to the list of sources in the
descriptor and sets its TemplateDescriptor to
filtered and with the encoding specified in the encoding
attribute or the Java virtual machine's default if it is not defined.testSource - a <source> element from the <testSources>descriptor - the ArchetypeDescriptor to add the test-source template to.org.codehaus.plexus.util.xml.pull.XmlPullParserException - if the encoding specified is not valid or supported.private static void addTestResourceToDescriptor(org.codehaus.plexus.util.xml.Xpp3Dom testResource,
ArchetypeDescriptor descriptor)
throws org.codehaus.plexus.util.xml.pull.XmlPullParserException
resource to the list of test-resources in the
descriptor and sets its TemplateDescriptor to
filtered if the attribute filtered was not
specified or its value is "true", or false
if its value is "false", and the encoding specified
in the encoding attribute or the Java virtual machine's default if
it is not defined. If the resource is a property file (ends in
.properties) its encoding will be set to iso-8859-1
even if some other encoding is specified in the attribute.testResource - a <resource> element from the <testResources>descriptor - the ArchetypeDescriptor to add the test-resource template to.org.codehaus.plexus.util.xml.pull.XmlPullParserException - if the encoding specified is not valid or supported or if the
value of the attribute filtered is no valid.private static void addSiteResourceToDescriptor(org.codehaus.plexus.util.xml.Xpp3Dom siteResource,
ArchetypeDescriptor descriptor)
throws org.codehaus.plexus.util.xml.pull.XmlPullParserException
resource to the list of site-resources in the
descriptor and sets its TemplateDescriptor to
filtered if the attribute filtered was not
specified or its value is "true", or false
if its value is "false", and the encoding specified
in the encoding attribute or the Java virtual machine's default if
it is not defined. If the resource is a property file (ends in
.properties) its encoding will be set to iso-8859-1
even if some other encoding is specified in the attribute.siteResource - a <resource> element from the <siteResources>descriptor - the ArchetypeDescriptor to add the site-resource template to.org.codehaus.plexus.util.xml.pull.XmlPullParserException - if the encoding specified is not valid or supported or if the
value of the attribute filtered is no valid.private static boolean getValueFilteredAttribute(java.lang.String str)
throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException