By vineetmanohar
via vineetmanohar.com
Published: Nov 04 2009 / 02:41
Maven exec plugin lets you run the main method of a Java class in your project, with the project dependencies automatically included in the classpath. This article show you 3 ways of using the maven exec plugin to run java, with code examples. This approach is useful in many scenarios including migration of existing tasks from ant to maven.



Comments
Alex Miller replied ago:
In the past I've found this info amazingly hard to come by.
Vineet Manohar replied ago:
I'm surprised that maven exec plugin is not as popular as it should be. Most people use maven to build their project, but use "ant" or "java" command line is used to run the main() method, which is tedious because they need to rebuild the CLASSPATH.
Voters For This Link (18)
Voters Against This Link (0)