How to write a Maven build script to execute Java
How can I execute a Java program during the build, or after the build has just finished? Is it possible to do this directly from pom? mvn exec:java -Dexec.mainClass=org.sonatype.mavenbook.weather.Main EDIT Let's say I want to execute org.eclipse.content.MyClass . How would I needed to write the code? This builds the project but it doesn't execute my class: <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>exec-maven-plugin</artifactId> <version>1.1</version> <executions> <execution> <phase>deploy</phase> <goals> <goal>java</goal> </goals> </execution> </executions> <configuration>