summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2015-01-29 20:24:44 +0200
committerVaadin Code Review <review@vaadin.com>2015-02-09 13:00:27 +0000
commitcf0a3cba90aa21055b6271d0b52968bc7e6e378d (patch)
tree32300a9ae16af3a7ecf749779c54d5bfc97baab0 /scripts
parent96362ac38b7c00eeadac1186c0b716326df4d297 (diff)
downloadvaadin-framework-cf0a3cba90aa21055b6271d0b52968bc7e6e378d.tar.gz
vaadin-framework-cf0a3cba90aa21055b6271d0b52968bc7e6e378d.zip
Unified archetype scripts and added multimodule test
Change-Id: I6cd7d4ca4a1386920dbe657accd18836a009a11c
Diffstat (limited to 'scripts')
-rw-r--r--scripts/validate-application-archetype-linux.sh40
-rwxr-xr-xscripts/validate-application-archetype-osx.sh44
-rwxr-xr-xscripts/validate-application-archetype.sh16
-rwxr-xr-xscripts/validate-application-example-archetype-linux.sh40
-rwxr-xr-xscripts/validate-application-example-archetype-osx.sh44
-rwxr-xr-xscripts/validate-application-example-archetype.sh16
-rwxr-xr-xscripts/validate-application-multimodule-archetype.sh16
-rwxr-xr-xscripts/validate-archetype-common.sh53
-rwxr-xr-xscripts/validate-widget-archetype-linux.sh39
-rwxr-xr-xscripts/validate-widget-archetype-osx.sh43
-rwxr-xr-xscripts/validate-widget-archetype.sh20
11 files changed, 121 insertions, 250 deletions
diff --git a/scripts/validate-application-archetype-linux.sh b/scripts/validate-application-archetype-linux.sh
deleted file mode 100644
index a1b1c6558d..0000000000
--- a/scripts/validate-application-archetype-linux.sh
+++ /dev/null
@@ -1,40 +0,0 @@
-#!/bin/bash
-
-display_usage() {
-echo -e "\nUsage:\n$0 <version> <framework staging id> <archetypes staging id> <plugin staging id>\n"
-echo -e "Example: 7.3.7 1450 1451 1452"
-}
-
-# if less than two arguments supplied, display usage
-if [ $# -le 3 ]
-then
- display_usage
- exit 1
-fi
-
-# check whether user had supplied -h or --help . If yes display usage
-if [[ ( $# == "--help") || $# == "-h" ]]
-then
- display_usage
- exit 0
-fi
-
-VERSION=$1
-VAADINREPO=comvaadin-$2
-ARCHETYPEREPO=comvaadin-$3
-PLUGINREPO=comvaadin-$4
-
-REPOBASE=https://oss.sonatype.org/content/repositories/
-ART=test-application-$VERSION
-GROUP=testpkg
-mvn archetype:generate -DarchetypeGroupId=com.vaadin -DarchetypeArtifactId=vaadin-archetype-application -DarchetypeVersion=$VERSION -DarchetypeRepository=$REPOBASE$ARCHETYPEREPO -DgroupId=$GROUP -DartifactId=$ART -Dversion=1.0-SNAPSHOT -DinteractiveMode=false
-pushd $ART
-# Add vaadin repo
-sed -i "s#<repositories>#<repositories><repository><id>vaadin-$VERSION-staging</id><url>$REPOBASE$VAADINREPO</url></repository>#" pom.xml
-# Add vaadin and plugin repo as plugin repos
-sed -i "s#</repositories>#</repositories><pluginRepositories><pluginRepository><id>vaadin-$VERSION-plugin-staging</id><url>$REPOBASE$PLUGINREPO</url></pluginRepository></pluginRepositories>#" pom.xml
-
-mvn install
-
-pushd $ART-ui
-mvn jetty:run
diff --git a/scripts/validate-application-archetype-osx.sh b/scripts/validate-application-archetype-osx.sh
deleted file mode 100755
index b6d2c8f1d9..0000000000
--- a/scripts/validate-application-archetype-osx.sh
+++ /dev/null
@@ -1,44 +0,0 @@
-#!/bin/bash
-
-display_usage() {
-echo -e "\nUsage:\n$0 <version> <framework staging id> <archetypes staging id> <plugin staging id>\n"
-echo -e "Example: 7.3.7 1450 1451 1452"
-}
-
-# if less than two arguments supplied, display usage
-if [ $# -le 3 ]
-then
- display_usage
- exit 1
-fi
-
-# check whether user had supplied -h or --help . If yes display usage
-if [[ ( $# == "--help") || $# == "-h" ]]
-then
- display_usage
- exit 0
-fi
-
-VERSION=$1
-VAADINREPO=comvaadin-$2
-ARCHETYPEREPO=comvaadin-$3
-PLUGINREPO=comvaadin-$4
-
-# Only for Mac
-MAC1=-e
-MAC2=.foo
-
-REPOBASE=https://oss.sonatype.org/content/repositories/
-ART=test-application-$VERSION
-GROUP=testpkg
-mvn archetype:generate -DarchetypeGroupId=com.vaadin -DarchetypeArtifactId=vaadin-archetype-application -DarchetypeVersion=$VERSION -DarchetypeRepository=$REPOBASE$ARCHETYPEREPO -DgroupId=$GROUP -DartifactId=$ART -Dversion=1.0-SNAPSHOT -DinteractiveMode=false
-pushd $ART
-# Add vaadin repo
-sed $MAC1 "s#<repositories>#<repositories><repository><id>vaadin-$VERSION-staging</id><url>$REPOBASE$VAADINREPO</url></repository>#" -i $MAC2 pom.xml
-# Add vaadin and plugin repo as plugin repos
-sed $MAC1 "s#</repositories>#</repositories><pluginRepositories><pluginRepository><id>vaadin-$VERSION-plugin-staging</id><url>$REPOBASE$PLUGINREPO</url></pluginRepository></pluginRepositories>#" -i $MAC2 pom.xml
-
-mvn install
-
-pushd $ART-ui
-mvn jetty:run
diff --git a/scripts/validate-application-archetype.sh b/scripts/validate-application-archetype.sh
new file mode 100755
index 0000000000..78ef3f46ed
--- /dev/null
+++ b/scripts/validate-application-archetype.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+dir=`dirname $0`
+ARCHETYPE_ARTIFACT=vaadin-archetype-application
+. $dir/validate-archetype-common.sh
+
+
+mvn archetype:generate -DarchetypeGroupId=$ARCHETYPE_GROUP -DarchetypeArtifactId=$ARCHETYPE_ARTIFACT -DarchetypeVersion=$ARCHETYPE_VERSION -DarchetypeRepository=$ARCHETYPEREPO -DgroupId=$GROUP -DartifactId=$ART -Dversion=1.0-SNAPSHOT -DinteractiveMode=false
+pushd $ART
+# Add vaadin repo
+$SED -i "s#<repositories>#<repositories><repository><id>vaadin-$ARCHETYPE_VERSION-staging</id><url>$VAADINREPO</url></repository>#" pom.xml
+# Add vaadin and plugin repo as plugin repos
+$SED -i "s#</repositories>#</repositories><pluginRepositories><pluginRepository><id>vaadin-$ARCHETYPE_VERSION-plugin-staging</id><url>$PLUGINREPO</url></pluginRepository></pluginRepositories>#" pom.xml
+
+mvn install
+mvn jetty:run
+popd
diff --git a/scripts/validate-application-example-archetype-linux.sh b/scripts/validate-application-example-archetype-linux.sh
deleted file mode 100755
index 01a5300fa9..0000000000
--- a/scripts/validate-application-example-archetype-linux.sh
+++ /dev/null
@@ -1,40 +0,0 @@
-#!/bin/bash
-
-display_usage() {
-echo -e "\nUsage:\n$0 <version> <framework staging id> <archetypes staging id> <plugin staging id>\n"
-echo -e "Example: 7.3.7 1450 1451 1452"
-}
-
-# if less than two arguments supplied, display usage
-if [ $# -le 3 ]
-then
- display_usage
- exit 1
-fi
-
-# check whether user had supplied -h or --help . If yes display usage
-if [[ ( $# == "--help") || $# == "-h" ]]
-then
- display_usage
- exit 0
-fi
-
-VERSION=$1
-VAADINREPO=comvaadin-$2
-ARCHETYPEREPO=comvaadin-$3
-PLUGINREPO=comvaadin-$4
-
-REPOBASE=https://oss.sonatype.org/content/repositories/
-ART=test-application-example-$VERSION
-GROUP=testpkg
-mvn archetype:generate -DarchetypeGroupId=com.vaadin -DarchetypeArtifactId=vaadin-archetype-application-example -DarchetypeVersion=$VERSION -DarchetypeRepository=$REPOBASE$ARCHETYPEREPO -DgroupId=$GROUP -DartifactId=$ART -Dversion=1.0-SNAPSHOT -DinteractiveMode=false
-pushd $ART
-# Add vaadin repo
-sed -i "s#<repositories>#<repositories><repository><id>vaadin-$VERSION-staging</id><url>$REPOBASE$VAADINREPO</url></repository>#" pom.xml
-# Add vaadin and plugin repo as plugin repos
-sed -i "s#</repositories>#</repositories><pluginRepositories><pluginRepository><id>vaadin-$VERSION-plugin-staging</id><url>$REPOBASE$PLUGINREPO</url></pluginRepository></pluginRepositories>#" pom.xml
-
-mvn install
-
-pushd $ART-ui
-mvn jetty:run
diff --git a/scripts/validate-application-example-archetype-osx.sh b/scripts/validate-application-example-archetype-osx.sh
deleted file mode 100755
index 01d23cbb0f..0000000000
--- a/scripts/validate-application-example-archetype-osx.sh
+++ /dev/null
@@ -1,44 +0,0 @@
-#!/bin/bash
-
-display_usage() {
-echo -e "\nUsage:\n$0 <version> <framework staging id> <archetypes staging id> <plugin staging id>\n"
-echo -e "Example: 7.3.7 1450 1451 1452"
-}
-
-# if less than two arguments supplied, display usage
-if [ $# -le 3 ]
-then
- display_usage
- exit 1
-fi
-
-# check whether user had supplied -h or --help . If yes display usage
-if [[ ( $# == "--help") || $# == "-h" ]]
-then
- display_usage
- exit 0
-fi
-
-VERSION=$1
-VAADINREPO=comvaadin-$2
-ARCHETYPEREPO=comvaadin-$3
-PLUGINREPO=comvaadin-$4
-
-# Only for Mac
-MAC1=-e
-MAC2=.foo
-
-REPOBASE=https://oss.sonatype.org/content/repositories/
-ART=test-application-example-$VERSION
-GROUP=testpkg
-mvn archetype:generate -DarchetypeGroupId=com.vaadin -DarchetypeArtifactId=vaadin-archetype-application-example -DarchetypeVersion=$VERSION -DarchetypeRepository=$REPOBASE$ARCHETYPEREPO -DgroupId=$GROUP -DartifactId=$ART -Dversion=1.0-SNAPSHOT -DinteractiveMode=false
-pushd $ART
-# Add vaadin repo
-sed $MAC1 "s#<repositories>#<repositories><repository><id>vaadin-$VERSION-staging</id><url>$REPOBASE$VAADINREPO</url></repository>#" -i $MAC2 pom.xml
-# Add vaadin and plugin repo as plugin repos
-sed $MAC1 "s#</repositories>#</repositories><pluginRepositories><pluginRepository><id>vaadin-$VERSION-plugin-staging</id><url>$REPOBASE$PLUGINREPO</url></pluginRepository></pluginRepositories>#" -i $MAC2 pom.xml
-
-mvn install
-
-pushd $ART-ui
-mvn jetty:run
diff --git a/scripts/validate-application-example-archetype.sh b/scripts/validate-application-example-archetype.sh
new file mode 100755
index 0000000000..c63b2682d5
--- /dev/null
+++ b/scripts/validate-application-example-archetype.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+dir=`dirname $0`
+ARCHETYPE_ARTIFACT=vaadin-archetype-application-example
+. $dir/validate-archetype-common.sh
+
+
+mvn archetype:generate -DarchetypeGroupId=$ARCHETYPE_GROUP -DarchetypeArtifactId=$ARCHETYPE_ARTIFACT -DarchetypeVersion=$ARCHETYPE_VERSION -DarchetypeRepository=$ARCHETYPEREPO -DgroupId=$GROUP -DartifactId=$ART -Dversion=1.0-SNAPSHOT -DinteractiveMode=false
+pushd $ART
+# Add vaadin repo
+$SED -i "s#<repositories>#<repositories><repository><id>vaadin-$ARCHETYPE_VERSION-staging</id><url>$VAADINREPO</url></repository>#" pom.xml
+# Add vaadin and plugin repo as plugin repos
+$SED -i "s#</repositories>#</repositories><pluginRepositories><pluginRepository><id>vaadin-$ARCHETYPE_VERSION-plugin-staging</id><url>$PLUGINREPO</url></pluginRepository></pluginRepositories>#" pom.xml
+
+mvn install && pushd $ART-ui && mvn jetty:run
+popd
+popd
diff --git a/scripts/validate-application-multimodule-archetype.sh b/scripts/validate-application-multimodule-archetype.sh
new file mode 100755
index 0000000000..0b2bb72480
--- /dev/null
+++ b/scripts/validate-application-multimodule-archetype.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+dir=`dirname $0`
+ARCHETYPE_ARTIFACT=vaadin-archetype-application-multimodule
+. $dir/validate-archetype-common.sh
+
+
+mvn archetype:generate -DarchetypeGroupId=$ARCHETYPE_GROUP -DarchetypeArtifactId=$ARCHETYPE_ARTIFACT -DarchetypeVersion=$ARCHETYPE_VERSION -DarchetypeRepository=$ARCHETYPEREPO -DgroupId=$GROUP -DartifactId=$ART -Dversion=1.0-SNAPSHOT -DinteractiveMode=false
+pushd $ART
+# Add vaadin repo
+$SED -i "s#<repositories>#<repositories><repository><id>vaadin-$ARCHETYPE_VERSION-staging</id><url>$VAADINREPO</url></repository>#" pom.xml
+# Add vaadin and plugin repo as plugin repos
+$SED -i "s#</repositories>#</repositories><pluginRepositories><pluginRepository><id>vaadin-$ARCHETYPE_VERSION-plugin-staging</id><url>$PLUGINREPO</url></pluginRepository></pluginRepositories>#" pom.xml
+
+mvn install && pushd $ART-ui && mvn jetty:run
+popd
+popd
diff --git a/scripts/validate-archetype-common.sh b/scripts/validate-archetype-common.sh
new file mode 100755
index 0000000000..48aa7b3586
--- /dev/null
+++ b/scripts/validate-archetype-common.sh
@@ -0,0 +1,53 @@
+#!/bin/bash
+
+display_usage() {
+echo -e "\nUsage:\n$0 <version> <framework staging id> <archetypes staging id> <plugin staging id>\n"
+echo -e "Example: 7.3.7 1450 1451 1452"
+}
+
+display_sed() {
+echo -e "\nGNU sed was not found. If you are running Linux, ensure you have sed installed an in your PATH\n"
+echo -e "If you are running Mac OS X, install gsed and ensure it is in your PATH"
+}
+
+SED=sed
+# Ensure we have GNU sed
+$SED --version 2>&1|grep "GNU sed" > /dev/null
+if [ "$?" != "0" ]
+then
+ # Try gsed
+ SED=gsed
+ gsed --version 2>&1|grep "GNU sed" > /dev/null
+ if [ "$?" != "0" ]
+ then
+ display_sed
+ exit 2
+ fi
+fi
+
+# if less than two arguments supplied, display usage
+if [ $# -le 3 ]
+then
+ display_usage
+ exit 1
+fi
+
+
+# check whether user had supplied -h or --help . If yes display usage
+if [[ ( $# == "--help") || $# == "-h" ]]
+then
+ display_usage
+ exit 0
+fi
+
+ARCHETYPE_GROUP=com.vaadin
+ARCHETYPE_VERSION=$1
+
+REPOBASE=https://oss.sonatype.org/content/repositories/
+VAADINREPO=$REPOBASE"comvaadin-$2"
+ARCHETYPEREPO=$REPOBASE"comvaadin-$3"
+PLUGINREPO=$REPOBASE"comvaadin-$4"
+
+ART=test-$ARCHETYPE_ARTIFACT-$ARCHETYPE_VERSION
+ART=`echo $ART|sed "s/\./-/g"`
+GROUP=testpkg
diff --git a/scripts/validate-widget-archetype-linux.sh b/scripts/validate-widget-archetype-linux.sh
deleted file mode 100755
index e29c69f3f4..0000000000
--- a/scripts/validate-widget-archetype-linux.sh
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/bin/bash
-
-display_usage() {
-echo -e "\nUsage:\n$0 <version> <framework staging id> <archetypes staging id> <plugin staging id>\n"
-echo -e "Example: 7.3.7 1450 1451 1452"
-}
-
-# if less than two arguments supplied, display usage
-if [ $# -le 3 ]
-then
- display_usage
- exit 1
-fi
-
-# check whether user had supplied -h or --help . If yes display usage
-if [[ ( $# == "--help") || $# == "-h" ]]
-then
- display_usage
- exit 0
-fi
-
-VERSION=$1
-VAADINREPO=comvaadin-$2
-ARCHETYPEREPO=comvaadin-$3
-PLUGINREPO=comvaadin-$4
-
-REPOBASE=https://oss.sonatype.org/content/repositories/
-ART=test-widget-$VAADINVERSION
-GROUP=testpkg
-mvn archetype:generate -DarchetypeGroupId=com.vaadin -DarchetypeArtifactId=vaadin-archetype-widget -DarchetypeVersion=$VERSION -DarchetypeRepository=$REPOBASE$ARCHETYPEREPO -DgroupId=$GROUP -DartifactId=$ART -Dversion=1.0-SNAPSHOT -DinteractiveMode=false -DComponentClassName=TestComponent
-pushd $ART
-# Add vaadin repo
-sed -i "s#<repositories>#<repositories><repository><id>vaadin-$VERSION-staging</id><url>$REPOBASE$VAADINREPO</url></repository>#" */pom.xml
-# Add vaadin and plugin repo as plugin repos
-sed -i "s#<pluginRepositories>#<pluginRepositories><pluginRepository><id>vaadin-$VERSION-staging</id><url>$REPOBASE$VAADINREPO</url></pluginRepository>#" */pom.xml
-sed -i "s#<pluginRepositories>#<pluginRepositories><pluginRepository><id>vaadin-$VERSION-plugin-staging</id><url>$REPOBASE$PLUGINREPO</url></pluginRepository>#" */pom.xml
-
-pushd $ART && mvn install && popd
-pushd $ART-demo && mvn package jetty:run
diff --git a/scripts/validate-widget-archetype-osx.sh b/scripts/validate-widget-archetype-osx.sh
deleted file mode 100755
index cef27ea2a3..0000000000
--- a/scripts/validate-widget-archetype-osx.sh
+++ /dev/null
@@ -1,43 +0,0 @@
-#!/bin/bash
-
-display_usage() {
-echo -e "\nUsage:\n$0 <version> <framework staging id> <archetypes staging id> <plugin staging id>\n"
-echo -e "Example: 7.3.7 1450 1451 1452"
-}
-
-# if less than two arguments supplied, display usage
-if [ $# -le 3 ]
-then
- display_usage
- exit 1
-fi
-
-# check whether user had supplied -h or --help . If yes display usage
-if [[ ( $# == "--help") || $# == "-h" ]]
-then
- display_usage
- exit 0
-fi
-
-VERSION=$1
-VAADINREPO=comvaadin-$2
-ARCHETYPEREPO=comvaadin-$3
-PLUGINREPO=comvaadin-$4
-
-# Only for Mac
-MAC1=-e
-MAC2=.foo
-
-REPOBASE=https://oss.sonatype.org/content/repositories/
-ART=test-widget-$VAADINVERSION
-GROUP=testpkg
-mvn archetype:generate -DarchetypeGroupId=com.vaadin -DarchetypeArtifactId=vaadin-archetype-widget -DarchetypeVersion=$VERSION -DarchetypeRepository=$REPOBASE$ARCHETYPEREPO -DgroupId=$GROUP -DartifactId=$ART -Dversion=1.0-SNAPSHOT -DinteractiveMode=false -DComponentClassName=TestComponent
-pushd $ART
-# Add vaadin repo
-sed $MAC1 "s#<repositories>#<repositories><repository><id>vaadin-$VERSION-staging</id><url>$REPOBASE$VAADINREPO</url></repository>#" -i $MAC2 */pom.xml
-# Add vaadin and plugin repo as plugin repos
-sed $MAC1 "s#<pluginRepositories>#<pluginRepositories><pluginRepository><id>vaadin-$VERSION-staging</id><url>$REPOBASE$VAADINREPO</url></pluginRepository>#" -i $MAC2 */pom.xml
-sed $MAC1 "s#<pluginRepositories>#<pluginRepositories><pluginRepository><id>vaadin-$VERSION-plugin-staging</id><url>$REPOBASE$PLUGINREPO</url></pluginRepository>#" -i $MAC2 */pom.xml
-
-pushd $ART && mvn install && popd
-pushd $ART-demo && mvn package jetty:run
diff --git a/scripts/validate-widget-archetype.sh b/scripts/validate-widget-archetype.sh
new file mode 100755
index 0000000000..07a75fae2d
--- /dev/null
+++ b/scripts/validate-widget-archetype.sh
@@ -0,0 +1,20 @@
+#!/bin/bash
+dir=`dirname $0`
+ARCHETYPE_ARTIFACT=vaadin-archetype-widget
+. $dir/validate-archetype-common.sh
+
+
+mvn archetype:generate -DarchetypeGroupId=$ARCHETYPE_GROUP -DarchetypeArtifactId=$ARCHETYPE_ARTIFACT -DarchetypeVersion=$ARCHETYPE_VERSION -DarchetypeRepository=$ARCHETYPEREPO -DgroupId=$GROUP -DartifactId=$ART -Dversion=1.0-SNAPSHOT -DinteractiveMode=false
+pushd $ART
+for a in $ART $ART-demo
+do
+ pushd $a
+ # Add vaadin repo
+ $SED -i "s#<repositories>#<repositories><repository><id>vaadin-$ARCHETYPE_VERSION-staging</id><url>$VAADINREPO</url></repository>#" pom.xml
+ # Add vaadin and plugin repo as plugin repos
+ $SED -i "s#</pluginRepositories>#<pluginRepository><id>vaadin-$ARCHETYPE_VERSION-plugin-staging</id><url>$PLUGINREPO</url></pluginRepository></pluginRepositories>#" pom.xml
+ popd
+done
+
+
+pushd $ART && mvn install && popd && pushd $ART-demo && mvn package jetty:run