Created
August 14, 2014 01:29
-
-
Save admackin/d37cb5ee56ac608f7017 to your computer and use it in GitHub Desktop.
Execute Java class in Maven Project using exec-maven-plugin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Don't forget to add the plugin to your POM - eg: | |
# <plugin> | |
# <groupId>org.codehaus.mojo</groupId> | |
# <artifactId>exec-maven-plugin</artifactId> | |
# <version>1.3.2</version> | |
# </plugin> | |
MAINCLASS=$1 | |
shift | |
mvn -f ${0%/*/*}/pom.xml exec:java -Dexec.mainClass=$MAINCLASS -Dexec.args="$*" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment