public class GeneratorAntTask
extends org.apache.tools.ant.Task
<project default="genfiles" basedir="."> <property name="generated.source.dir" value="${basedir}" /> <target name="genfiles" description="Generate the files"> <taskdef name="mbgenerator" classname="org.mybatis.generator.ant.GeneratorAntTask" classpath="mybatis-generator-core-x.x.x.jar" /> <mbgenerator overwrite="true" configfile="generatorConfig.xml" verbose="false" > <propertyset> <propertyref name="generated.source.dir"/> </propertyset> </mbgenerator> </target> </project>The task requires that the attribute "configFile" be set to an existing XML configuration file.
The task supports these optional attributes:
Constructor and Description |
---|
GeneratorAntTask() |
Modifier and Type | Method and Description |
---|---|
org.apache.tools.ant.types.PropertySet |
createPropertyset() |
void |
execute() |
String |
getConfigfile() |
String |
getContextIds() |
String |
getFullyQualifiedTableNames() |
boolean |
isOverwrite() |
boolean |
isVerbose() |
void |
setConfigfile(String configfile) |
void |
setContextIds(String contextIds) |
void |
setFullyQualifiedTableNames(String fullyQualifiedTableNames) |
void |
setOverwrite(boolean overwrite) |
void |
setVerbose(boolean verbose) |
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
public void execute() throws org.apache.tools.ant.BuildException
execute
in class org.apache.tools.ant.Task
org.apache.tools.ant.BuildException
public String getConfigfile()
public void setConfigfile(String configfile)
configfile
- The configfile to set.public boolean isOverwrite()
public void setOverwrite(boolean overwrite)
overwrite
- The overwrite to set.public org.apache.tools.ant.types.PropertySet createPropertyset()
public boolean isVerbose()
public void setVerbose(boolean verbose)
public String getContextIds()
public void setContextIds(String contextIds)
public String getFullyQualifiedTableNames()
public void setFullyQualifiedTableNames(String fullyQualifiedTableNames)
Copyright © 2010–2018 MyBatis.org. All rights reserved.