在pom文件中配置maven任务段

在pom文件中配置maven任务段,maven,pom.xml,Maven,Pom.xml,我的项目目前使用Ant build来构建SQL,我使用以下目标: <target name="build.update_database"> <artifact:mvn pom="${basedir}/../module-database/pom.xml"> <arg value="clean"/> <arg value="compile"/> <arg value="liquibase

我的项目目前使用Ant build来构建SQL,我使用以下目标:

<target name="build.update_database">
    <artifact:mvn pom="${basedir}/../module-database/pom.xml">
        <arg value="clean"/>
        <arg value="compile"/>
        <arg value="liquibase:updateSQL"/>
    </artifact:mvn>
</target>

现在我想移动Maven,如何在pom.xml中配置步骤“clean”、“compile”、“liquibase:updateSQL”

pom.xml是:

<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>2.5.1</version>
            <configuration>
                <source>1.7</source>
                <target>1.7</target>
                <debug>true</debug>
                <encoding>UTF-8</encoding>
                <optimize>true</optimize>
                <showDeprecation>true</showDeprecation>
                <showWarnings>true</showWarnings>
            </configuration>
        </plugin>

        <plugin>
            <groupId>org.liquibase</groupId>
            <artifactId>liquibase-maven-plugin</artifactId>
            <version>2.0.5</version>
            <configuration>
                <promptOnNonLocalDatabase>false</promptOnNonLocalDatabase>
                <propertyFile>src/main/resources/liquibase.properties</propertyFile>
                <verbose>true</verbose>
            </configuration>
        </plugin>
    </plugins>

</build>

org.apache.maven.plugins
maven编译器插件
2.5.1
1.7
1.7
真的
UTF-8
真的
真的
真的
org.liquibase
liquibase maven插件
2.0.5
假的
src/main/resources/liquibase.properties
真的

您不需要其他任何东西。您已经拥有pom.xml文件。执行Maven命令。这就像在命令行中执行
mvn clean compile liquidbase:updateSQL