Created
September 4, 2015 14:43
-
-
Save ansrivas/bd36a6bb4c3f72c88241 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#a shell script to create an eclipse project, in current directory if 3rd argument isn't passed | |
#else creates in the current directory | |
groupID=$1 | |
archetypeArtifactId=$2 | |
directory=$3 | |
if [[ "$1" == "" || "$2" == "" ]] ; then | |
echo "ERROR !!" | |
echo "Usagae : bash maven_proj.sh <groupid> <archetypeArtifactId> <absolute-path-directory>(optional)" | |
exit | |
fi | |
if [[ "$3" == "" ]]; then | |
directory=. | |
fi | |
cd $directory | |
mvn archetype:generate -DgroupId=$groupID -DartifactId=$archetypeArtifactId -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false | |
wait | |
cd $archetypeArtifactId; | |
wait | |
mvn eclipse:eclipse | |
exit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment