public class ArchetypeHelper extends Object
mvn archetype:generate
without dependencies to
maven-archetype related libraries.Modifier and Type | Field and Description |
---|---|
protected Pattern |
sourcePathRegexPattern |
protected String |
webInfResources |
Constructor and Description |
---|
ArchetypeHelper(File archetypeFile,
File outputDir,
String groupId,
String artifactId,
String version,
String name,
String description) |
Modifier and Type | Method and Description |
---|---|
int |
execute()
GenerateArchetypes 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(InputStream zip,
Map<String,String> replaceProperties)
Extracts properties declared in "META-INF/maven/archetype-metadata.xml" file
|
protected String |
removeInvalidHeaderCommentsAndProcessVelocityMacros(String text)
This method should do a full Velocity macro processing...
|
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 void setPackageName(String packageName)
public int execute() throws IOException
IOException
public Map<String,String> parseProperties() throws IOException
IOException
protected void parseReplaceProperties(InputStream zip, Map<String,String> replaceProperties) throws IOException, ParserConfigurationException, SAXException, XPathExpressionException
protected String transformContents(String fileContents, Map<String,String> replaceProperties)
protected String removeInvalidHeaderCommentsAndProcessVelocityMacros(String text)
protected String replaceFileProperties(String fileName, Map<String,String> replaceProperties)
Copyright © 2014–2017 Red Hat. All rights reserved.