aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/install-local-maven.sh
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2014-05-26 16:27:30 +0300
committerVaadin Code Review <review@vaadin.com>2014-06-03 05:46:06 +0000
commit44eadeaa160152616152cd33f8181d7ab1fa3359 (patch)
tree3fa475dac6ac79e5b3614d6ebbfc833349cd2173 /scripts/install-local-maven.sh
parent113c6321ea58d934b3cb07cec8e730532181abc7 (diff)
downloadvaadin-framework-44eadeaa160152616152cd33f8181d7ab1fa3359.tar.gz
vaadin-framework-44eadeaa160152616152cd33f8181d7ab1fa3359.zip
Script for installing build artifacts to the local Maven repository
Change-Id: I6cc4553a54d7d4ed7271ea0eb59386516fd96ca5
Diffstat (limited to 'scripts/install-local-maven.sh')
-rwxr-xr-xscripts/install-local-maven.sh41
1 files changed, 41 insertions, 0 deletions
diff --git a/scripts/install-local-maven.sh b/scripts/install-local-maven.sh
new file mode 100755
index 0000000000..2883258808
--- /dev/null
+++ b/scripts/install-local-maven.sh
@@ -0,0 +1,41 @@
+#!/bin/bash
+
+if [ ! -e "vaadin-shared" ]
+then
+ echo "You must run this in the directory containing folders for the various vaadin-* modules."
+ echo "If you run this in the project directory, go to result/artifacts/<version>/"
+ echo "If you run this on build artifacts from the build server, run it in the directory where you unzipped the artifacts"
+ exit 1
+fi
+
+for base in *
+do
+ if [ ! -d $base ]
+ then
+ continue
+ fi
+
+ pushd $base
+ version=`ls $base-*.pom|sed "s/$base-//"|sed "s/.pom//"`
+ pomTemplate="$base-$version.pom"
+ if [ -e "$pomTemplate" ]
+ then
+ id=$base-$version
+ pomFile=$pomTemplate-modified
+ file=$id.jar
+ javadocFile=$id-javadoc.jar
+ sourcesFile=$id-sources.jar
+
+ # Install using real version for easy testing
+ cat $pomTemplate|sed "s/<version>7.*-SNAPSHOT</<version>$version</g" > $pomFile
+
+ echo "Installing $base $version..."
+ if [ -e "$javadocFile" ]
+ then
+ mvn org.apache.maven.plugins:maven-install-plugin:2.5.1:install-file -DpomFile=$pomFile -Djavadoc=$javadocFile -Dsources=$sourcesFile -Dfile=$file
+ else
+ mvn org.apache.maven.plugins:maven-install-plugin:2.5.1:install-file -DpomFile=$pomFile -Dfile=$file
+ fi
+ fi
+ popd
+done \ No newline at end of file