executing a script from maven inside a multi module project
- by Roman
Hi everyone.
I have this multi-module project.
In the beginning of each build I would like to run some bat file.
So i did the following:
<profile>
<id>deploy-db</id>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.1.1</version>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.1.1</version>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>exec</goal>
</goals>
<inherited>false</inherited>
</execution>
</executions>
<configuration>
<executable>../database/schemas/import_databases.bat</executable>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</profile>
when i run the mvn verify -Pdeploy-db from the root I get this script executed over and over again in each of my modules.
I want it to be executed only once, in the root module.
What is there that I am missing ?
Thanks