Skip to content

Instantly share code, notes, and snippets.

@humus
Created October 30, 2015 13:21
Show Gist options
  • Save humus/75afaf76f6f4aa33f383 to your computer and use it in GitHub Desktop.
Save humus/75afaf76f6f4aa33f383 to your computer and use it in GitHub Desktop.
Maven bash function to ease the daily work
mnew() {
params=()
while [ "$#" -gt 2 ]; do
params+=("$1")
shift
done
artifact=$1
group=$2
mvn archetype:generate -B ${params[@]} -Dmaven.archetypeArtifactId=maven-archetype-quickstart -DartifactId=$artifact -DgroupId=$group
echo "command was\\n mvn archetype:generate -B ${params[@]} -Dmaven.archetypeArtifactId=maven-archetype-quickstart -DartifactId=$artifact -DgroupId=$group"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment