maven构建后更新数据库记录
Update database record after maven build
我想知道是否有任何方法可以在 Maven 构建之后(或期间)更新 Firebird 的数据库记录。这是刷新数据库中应用程序版本所必需的。在打包 maven 的目标之后,是否有任何 maven 插件或 运行 任何 shell 脚本的可能性?感谢您的支持。
您可以使用 exec-maven-plugin
从 Maven 执行任何 shell 命令
这是一个示例配置:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<executions>
<execution>
<id>obfuscate</id>
<phase>package</phase>
<goals>
<goal>exec</goal>
</goals>
</execution>
</executions>
<configuration>
<executable>java</executable>
<arguments>
<argument>-jar</argument>
<!-- Change the value to your jar -->
<argument>path/to/your/Programm.jar</argument>
<!-- Jar-Args -->
<argument>arg1</argument>
</arguments>
</configuration>
</plugin>
我想知道是否有任何方法可以在 Maven 构建之后(或期间)更新 Firebird 的数据库记录。这是刷新数据库中应用程序版本所必需的。在打包 maven 的目标之后,是否有任何 maven 插件或 运行 任何 shell 脚本的可能性?感谢您的支持。
您可以使用 exec-maven-plugin
从 Maven 执行任何 shell 命令这是一个示例配置:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<executions>
<execution>
<id>obfuscate</id>
<phase>package</phase>
<goals>
<goal>exec</goal>
</goals>
</execution>
</executions>
<configuration>
<executable>java</executable>
<arguments>
<argument>-jar</argument>
<!-- Change the value to your jar -->
<argument>path/to/your/Programm.jar</argument>
<!-- Jar-Args -->
<argument>arg1</argument>
</arguments>
</configuration>
</plugin>