Class ArchetypeDescriptorBuilder
- java.lang.Object
-
- org.apache.maven.archetype.old.descriptor.ArchetypeDescriptorBuilder
-
public class ArchetypeDescriptorBuilder extends java.lang.Object- Version:
- $Id$
-
-
Constructor Summary
Constructors Constructor Description ArchetypeDescriptorBuilder()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static voidaddResourceToDescriptor(org.codehaus.plexus.util.xml.Xpp3Dom resource, ArchetypeDescriptor descriptor)Adds the resource elementresourceto the list of resources in thedescriptorand sets itsTemplateDescriptorto filtered if the attributefilteredwas not specified or its value is"true", orfalseif its value is"false", and the encoding specified in theencodingattribute or the Java virtual machine's default if it is not defined.private static voidaddSiteResourceToDescriptor(org.codehaus.plexus.util.xml.Xpp3Dom siteResource, ArchetypeDescriptor descriptor)Adds the site-resource elementresourceto the list of site-resources in thedescriptorand sets itsTemplateDescriptorto filtered if the attributefilteredwas not specified or its value is"true", orfalseif its value is"false", and the encoding specified in theencodingattribute or the Java virtual machine's default if it is not defined.private static voidaddSourceToDescriptor(org.codehaus.plexus.util.xml.Xpp3Dom source, ArchetypeDescriptor descriptor)Adds the source elementsourceto the list of sources in thedescriptorand sets itsTemplateDescriptorto filtered and with the encoding specified in theencodingattribute or the Java virtual machine's default if it is not defined.private static voidaddTestResourceToDescriptor(org.codehaus.plexus.util.xml.Xpp3Dom testResource, ArchetypeDescriptor descriptor)Adds the test-resource elementresourceto the list of test-resources in thedescriptorand sets itsTemplateDescriptorto filtered if the attributefilteredwas not specified or its value is"true", orfalseif its value is"false", and the encoding specified in theencodingattribute or the Java virtual machine's default if it is not defined.private static voidaddTestSourceToDescriptor(org.codehaus.plexus.util.xml.Xpp3Dom testSource, ArchetypeDescriptor descriptor)Adds the test-source elementsourceto the list of sources in thedescriptorand sets itsTemplateDescriptorto filtered and with the encoding specified in theencodingattribute or the Java virtual machine's default if it is not defined.ArchetypeDescriptorbuild(java.io.Reader reader)private static booleangetValueFilteredAttribute(java.lang.String str)
-
-
-
Method Detail
-
build
public ArchetypeDescriptor build(java.io.Reader reader) throws java.io.IOException, org.codehaus.plexus.util.xml.pull.XmlPullParserException
- Throws:
java.io.IOExceptionorg.codehaus.plexus.util.xml.pull.XmlPullParserException
-
addSourceToDescriptor
private static void addSourceToDescriptor(org.codehaus.plexus.util.xml.Xpp3Dom source, ArchetypeDescriptor descriptor) throws org.codehaus.plexus.util.xml.pull.XmlPullParserExceptionAdds the source elementsourceto the list of sources in thedescriptorand sets itsTemplateDescriptorto filtered and with the encoding specified in theencodingattribute or the Java virtual machine's default if it is not defined.- Parameters:
source- a<source>element from the<sources>descriptor- theArchetypeDescriptorto add the source template to.- Throws:
org.codehaus.plexus.util.xml.pull.XmlPullParserException- if the encoding specified is not valid or supported.
-
addResourceToDescriptor
private static void addResourceToDescriptor(org.codehaus.plexus.util.xml.Xpp3Dom resource, ArchetypeDescriptor descriptor) throws org.codehaus.plexus.util.xml.pull.XmlPullParserExceptionAdds the resource elementresourceto the list of resources in thedescriptorand sets itsTemplateDescriptorto filtered if the attributefilteredwas not specified or its value is"true", orfalseif its value is"false", and the encoding specified in theencodingattribute or the Java virtual machine's default if it is not defined. If theresourceis a property file (ends in.properties) its encoding will be set toiso-8859-1even if some other encoding is specified in the attribute.- Parameters:
resource- a<resource>element from the<resources>descriptor- theArchetypeDescriptorto add the resource template to.- Throws:
org.codehaus.plexus.util.xml.pull.XmlPullParserException- if the encoding specified is not valid or supported or if the value of the attributefilteredis no valid.
-
addTestSourceToDescriptor
private static void addTestSourceToDescriptor(org.codehaus.plexus.util.xml.Xpp3Dom testSource, ArchetypeDescriptor descriptor) throws org.codehaus.plexus.util.xml.pull.XmlPullParserExceptionAdds the test-source elementsourceto the list of sources in thedescriptorand sets itsTemplateDescriptorto filtered and with the encoding specified in theencodingattribute or the Java virtual machine's default if it is not defined.- Parameters:
testSource- a<source>element from the<testSources>descriptor- theArchetypeDescriptorto add the test-source template to.- Throws:
org.codehaus.plexus.util.xml.pull.XmlPullParserException- if the encoding specified is not valid or supported.
-
addTestResourceToDescriptor
private static void addTestResourceToDescriptor(org.codehaus.plexus.util.xml.Xpp3Dom testResource, ArchetypeDescriptor descriptor) throws org.codehaus.plexus.util.xml.pull.XmlPullParserExceptionAdds the test-resource elementresourceto the list of test-resources in thedescriptorand sets itsTemplateDescriptorto filtered if the attributefilteredwas not specified or its value is"true", orfalseif its value is"false", and the encoding specified in theencodingattribute or the Java virtual machine's default if it is not defined. If theresourceis a property file (ends in.properties) its encoding will be set toiso-8859-1even if some other encoding is specified in the attribute.- Parameters:
testResource- a<resource>element from the<testResources>descriptor- theArchetypeDescriptorto add the test-resource template to.- Throws:
org.codehaus.plexus.util.xml.pull.XmlPullParserException- if the encoding specified is not valid or supported or if the value of the attributefilteredis no valid.
-
addSiteResourceToDescriptor
private static void addSiteResourceToDescriptor(org.codehaus.plexus.util.xml.Xpp3Dom siteResource, ArchetypeDescriptor descriptor) throws org.codehaus.plexus.util.xml.pull.XmlPullParserExceptionAdds the site-resource elementresourceto the list of site-resources in thedescriptorand sets itsTemplateDescriptorto filtered if the attributefilteredwas not specified or its value is"true", orfalseif its value is"false", and the encoding specified in theencodingattribute or the Java virtual machine's default if it is not defined. If theresourceis a property file (ends in.properties) its encoding will be set toiso-8859-1even if some other encoding is specified in the attribute.- Parameters:
siteResource- a<resource>element from the<siteResources>descriptor- theArchetypeDescriptorto add the site-resource template to.- Throws:
org.codehaus.plexus.util.xml.pull.XmlPullParserException- if the encoding specified is not valid or supported or if the value of the attributefilteredis no valid.
-
getValueFilteredAttribute
private static boolean getValueFilteredAttribute(java.lang.String str) throws java.lang.IllegalArgumentException- Throws:
java.lang.IllegalArgumentException
-
-