Maven Liquibase @update 注释的目的是什么
Maven Liquibase what is the purpose of @update annotation
这两个命令行有什么区别?换句话说,@update
注释的目的是什么,因为第一个命令行对我来说运行正确,不像第二个:
mvn -Dparamname=value liquibase:update@update
和
mvn -Dparamname=value liquibase:update
这是我的pom.xml
<plugin>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-maven-plugin</artifactId>
<executions>
<execution>
<id>update</id>
<configuration>
<changeLogFile>src/main/resources/liquibase/ddl/release/db.changelog-master.xml</changeLogFile>
<driver>oracle.jdbc.driver.OracleDriver</driver>
<url>${app.liquibase.url}</url>
<username>${app.data.username}</username>
<password>${app.data.password}</password>
<verbose>true</verbose>
</configuration>
<phase>NONE</phase>
<goals>
<goal>update</goal>
</goals>
</execution>
...
你所做的是明确的,这样更新目标就不会绑定到任何 Maven 生命周期阶段。第一次调用是说 "run the plugin named liquibase, with the update goal, and the execution with id update",这样就可以了。第二次调用是说 "run the plugin named liquibase with the update goal" 但因为该目标明确未绑定到阶段,所以它不能 运行 它。 Maven 文档对此进行了更详细的介绍:https://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html
这两个命令行有什么区别?换句话说,@update
注释的目的是什么,因为第一个命令行对我来说运行正确,不像第二个:
mvn -Dparamname=value liquibase:update@update
和
mvn -Dparamname=value liquibase:update
这是我的pom.xml
<plugin>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-maven-plugin</artifactId>
<executions>
<execution>
<id>update</id>
<configuration>
<changeLogFile>src/main/resources/liquibase/ddl/release/db.changelog-master.xml</changeLogFile>
<driver>oracle.jdbc.driver.OracleDriver</driver>
<url>${app.liquibase.url}</url>
<username>${app.data.username}</username>
<password>${app.data.password}</password>
<verbose>true</verbose>
</configuration>
<phase>NONE</phase>
<goals>
<goal>update</goal>
</goals>
</execution>
...
你所做的是明确的,这样更新目标就不会绑定到任何 Maven 生命周期阶段。第一次调用是说 "run the plugin named liquibase, with the update goal, and the execution with id update",这样就可以了。第二次调用是说 "run the plugin named liquibase with the update goal" 但因为该目标明确未绑定到阶段,所以它不能 运行 它。 Maven 文档对此进行了更详细的介绍:https://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html