public class ArchetypeBuilder extends Object
mvn archetype:create-from-project without dependencies to
maven-archetype related libraries.| Modifier and Type | Field and Description |
|---|---|
static org.slf4j.Logger |
LOG |
| Constructor and Description |
|---|
ArchetypeBuilder(File catalogXmlFile) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addArchetypeMetaData(File pom,
String outputName) |
void |
close()
Completes generation of Archetype Catalog.
|
void |
configure()
Starts generation of Archetype Catalog (see: http://maven.apache.org/xsd/archetype-catalog-1.0.0.xsd)
|
protected Node |
findChild(Element parent,
String n) |
void |
generateArchetypes(String containerType,
File baseDir,
File outputDir,
boolean clean,
List<String> dirs,
File karafProfileDir)
Iterates through all nested directories and generates archetypes for all found, non-pom Maven projects.
|
protected boolean |
isValidRequiredPropertyName(String name)
Returns true if this is a valid archetype property name, so excluding basedir and maven "project." names
|
protected Element |
replaceOrAddElementText(Document doc,
Element parent,
String name,
String content,
List<String> beforeNames)
Creates new element as child of
parent and sets its text content |
void |
setBomFile(File bomFile) |
void |
setIndentSize(int indentSize) |
public ArchetypeBuilder(File catalogXmlFile)
public void setIndentSize(int indentSize)
public void setBomFile(File bomFile)
public void configure()
throws IOException
IOExceptionpublic void close()
public void generateArchetypes(String containerType, File baseDir, File outputDir, boolean clean, List<String> dirs, File karafProfileDir) throws IOException
baseDir - a directory to look for projects which may be converted to Maven ArchetypesoutputDir - target directory where Maven Archetype projects will be generatedclean - regenerate the archetypes (clean the archetype target dir)?IOExceptionprotected Element replaceOrAddElementText(Document doc, Element parent, String name, String content, List<String> beforeNames)
parent and sets its text contentprotected void addArchetypeMetaData(File pom, String outputName) throws FileNotFoundException
FileNotFoundExceptionprotected boolean isValidRequiredPropertyName(String name)
Copyright © 2011–2014 Red Hat. All rights reserved.