class TagDatabaseTask extends BaseLiquibaseTask {
    private String tag;

    @Override
    public void executeWithLiquibaseClassloader() throws BuildException {<FILL_FUNCTION_BODY>}

    @Override
    protected void validateParameters() {
        super.validateParameters();

        if(StringUtil.trimToNull(tag) == null) {
            throw new BuildException("Unable to tag database. The tag attribute is required.");
        }
    }

    public String getTag() {
        return tag;
    }

    public void setTag(String tag) {
        this.tag = tag;
    }
}

        Liquibase liquibase = getLiquibase();
        try {
            liquibase.tag(tag);
        } catch (LiquibaseException e) {
            throw new BuildException("Unable to tag database: " + e.getMessage(), e);
        }
    
<methods>public void <init>() ,public void addChangeLogParameters(liquibase.integration.ant.type.ChangeLogParametersType) ,public void addDatabase(liquibase.integration.ant.type.DatabaseType) ,public Path createClasspath() ,public final void execute() throws BuildException,public java.lang.String getChangeLogDirectory() ,public java.lang.String getSearchPath() ,public void init() throws BuildException,public boolean isPromptOnNonLocalDatabase() ,public void setChangeLogParametersRef(Reference) ,public void setClasspathRef(Reference) ,public void setDatabaseRef(Reference) ,public void setPromptOnNonLocalDatabase(boolean) <variables>private liquibase.integration.ant.type.ChangeLogParametersType changeLogParameters,private AntClassLoader classLoader,private Path classpath,private static final java.util.ResourceBundle coreBundle,private liquibase.integration.ant.type.DatabaseType databaseType,private liquibase.Liquibase liquibase,private liquibase.resource.ResourceAccessor resourceAccessor,private final Map<java.lang.String,java.lang.Object> scopeValues