1

I wonder if there is any way to update Firebird's database record after (or during) maven's build. This is necessary to refresh application's version in db. Is there any maven plugin or possibility to run any shell script after package maven's goal? Thank for any support.

Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197
clsbartek
  • 186
  • 1
  • 3
  • 18
  • Possible duplicate of [I want to execute shell commands from maven's pom.xml](http://stackoverflow.com/questions/3491937/i-want-to-execute-shell-commands-from-mavens-pom-xml) – cantSleepNow Oct 09 '16 at 11:10
  • 1
    This sounds more like a job for CI solution like Jenkins to do this after a successful release build... – khmarbaise Oct 09 '16 at 13:58

1 Answers1

1

You can execute any shell command from maven using the exec-maven-plugin

Here's an example configuration:

<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>