Created
June 9, 2014 23:32
-
-
Save ryantenney/f522cfaf38fa300d5c3a to your computer and use it in GitHub Desktop.
Revisions
-
ryantenney created this gist
Jun 9, 2014 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,20 @@ jar=$1 propertiesFile=`tar -tvf $jar | grep pom.properties | awk ' { print $9 } '` properties=`tar -xf $jar -O $propertiesFile` groupId=`echo "$properties" | grep groupId | awk -F'=' ' { print $2 }'` artifactId=`echo "$properties" | grep artifactId | awk -F'=' ' { print $2 }'` jar=$artifactId.jar mvn org.apache.maven.plugins:maven-dependency-plugin:2.8:get \ -Dartifact="$groupId:$artifactId:LATEST" \ -Dpackaging=jar \ -Ddest=$jar propertiesFile=`tar -tvf $jar | grep pom.properties | awk ' { print $9 } '` properties=`tar -xf $jar -O $propertiesFile` version=`echo "$properties" | grep version | awk -F'=' ' { print $2 }'` mv "$jar" "$artifactId-$version.jar"