In maven there is a plugin that allows you to run ant task
Add the following to pom.xml :
<plugin> <artifactId>maven-antrun-plugin</artifactId> <version>1.8</version> <executions> <execution> <id>default-cli</id> <phase>deploy</phase> <goals> <goal>run</goal> </goals> <configuration> <target name="run-database"> <!--задачи для ant'a--> </target> </configuration> </execution> </executions> </plugin>
then run antrun:run -DmvnAntTarget=run-database