public class ArchetypeHelper extends Object
| Modifier and Type | Field and Description |
|---|---|
protected Pattern |
sourcePathRegexPattern |
protected String |
webInfResources |
| Constructor and Description |
|---|
ArchetypeHelper(InputStream archetypeIn,
File outputDir,
String groupId,
String artifactId) |
ArchetypeHelper(InputStream archetypeIn,
File outputDir,
String groupId,
String artifactId,
String version) |
| Modifier and Type | Method and Description |
|---|---|
int |
execute()
Main method which extracts given Maven Archetype in destination directory
|
Map<String,String> |
parseProperties()
Searches ZIP archive and returns properties found in "META-INF/maven/archetype-metadata.xml" entry
|
protected void |
parseReplaceProperties(ZipInputStream zip,
Map<String,String> replaceProperties)
Extracts properties declared in "META-INF/maven/archetype-metadata.xml" file
|
protected String |
removeInvalidHeaderComments(String text) |
protected String |
replaceAllVariable(String text,
String name,
String value) |
protected String |
replaceFileProperties(String fileName,
Map<String,String> replaceProperties) |
protected String |
replaceVariable(String text,
String name,
String value) |
void |
setOverrideProperties(Map<String,String> overrideProperties) |
void |
setPackageName(String packageName) |
protected String |
transformContents(String fileContents,
Map<String,String> replaceProperties) |
protected String webInfResources
protected Pattern sourcePathRegexPattern
public ArchetypeHelper(InputStream archetypeIn, File outputDir, String groupId, String artifactId)
public ArchetypeHelper(InputStream archetypeIn, File outputDir, String groupId, String artifactId, String version)
public void setPackageName(String packageName)
public int execute()
throws IOException
IOExceptionpublic Map<String,String> parseProperties() throws IOException
IOExceptionprotected void parseReplaceProperties(ZipInputStream zip, Map<String,String> replaceProperties) throws IOException, ParserConfigurationException, SAXException, XPathExpressionException
zip - replaceProperties - IOExceptionParserConfigurationExceptionSAXExceptionXPathExpressionExceptionprotected String transformContents(String fileContents, Map<String,String> replaceProperties)
protected String replaceFileProperties(String fileName, Map<String,String> replaceProperties)
Copyright © 2011–2014 Red Hat. All rights reserved.