From c7885c8b8998953d89185399ca163cf829508e35 Mon Sep 17 00:00:00 2001 From: Sauli Tähkäpää Date: Thu, 18 Dec 2014 09:46:51 +0200 Subject: Add archetype validation scripts. Change-Id: Ie84eda1120b9b91fc3289961e134a567fcbdbd52 --- scripts/validate-application-archetype-linux.sh | 40 ++++++++++++++++++++ scripts/validate-application-archetype-osx.sh | 44 ++++++++++++++++++++++ ...validate-application-example-archetype-linux.sh | 40 ++++++++++++++++++++ .../validate-application-example-archetype-osx.sh | 44 ++++++++++++++++++++++ scripts/validate-widget-archetype-linux.sh | 39 +++++++++++++++++++ scripts/validate-widget-archetype-osx.sh | 43 +++++++++++++++++++++ 6 files changed, 250 insertions(+) create mode 100644 scripts/validate-application-archetype-linux.sh create mode 100755 scripts/validate-application-archetype-osx.sh create mode 100755 scripts/validate-application-example-archetype-linux.sh create mode 100755 scripts/validate-application-example-archetype-osx.sh create mode 100755 scripts/validate-widget-archetype-linux.sh create mode 100755 scripts/validate-widget-archetype-osx.sh diff --git a/scripts/validate-application-archetype-linux.sh b/scripts/validate-application-archetype-linux.sh new file mode 100644 index 0000000000..a1b1c6558d --- /dev/null +++ b/scripts/validate-application-archetype-linux.sh @@ -0,0 +1,40 @@ +#!/bin/bash + +display_usage() { +echo -e "\nUsage:\n$0 \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##vaadin-$VERSION-staging$REPOBASE$VAADINREPO#" pom.xml +# Add vaadin and plugin repo as plugin repos +sed -i "s##vaadin-$VERSION-plugin-staging$REPOBASE$PLUGINREPO#" 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 new file mode 100755 index 0000000000..b6d2c8f1d9 --- /dev/null +++ b/scripts/validate-application-archetype-osx.sh @@ -0,0 +1,44 @@ +#!/bin/bash + +display_usage() { +echo -e "\nUsage:\n$0 \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##vaadin-$VERSION-staging$REPOBASE$VAADINREPO#" -i $MAC2 pom.xml +# Add vaadin and plugin repo as plugin repos +sed $MAC1 "s##vaadin-$VERSION-plugin-staging$REPOBASE$PLUGINREPO#" -i $MAC2 pom.xml + +mvn install + +pushd $ART-ui +mvn jetty:run diff --git a/scripts/validate-application-example-archetype-linux.sh b/scripts/validate-application-example-archetype-linux.sh new file mode 100755 index 0000000000..01a5300fa9 --- /dev/null +++ b/scripts/validate-application-example-archetype-linux.sh @@ -0,0 +1,40 @@ +#!/bin/bash + +display_usage() { +echo -e "\nUsage:\n$0 \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##vaadin-$VERSION-staging$REPOBASE$VAADINREPO#" pom.xml +# Add vaadin and plugin repo as plugin repos +sed -i "s##vaadin-$VERSION-plugin-staging$REPOBASE$PLUGINREPO#" 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 new file mode 100755 index 0000000000..01d23cbb0f --- /dev/null +++ b/scripts/validate-application-example-archetype-osx.sh @@ -0,0 +1,44 @@ +#!/bin/bash + +display_usage() { +echo -e "\nUsage:\n$0 \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##vaadin-$VERSION-staging$REPOBASE$VAADINREPO#" -i $MAC2 pom.xml +# Add vaadin and plugin repo as plugin repos +sed $MAC1 "s##vaadin-$VERSION-plugin-staging$REPOBASE$PLUGINREPO#" -i $MAC2 pom.xml + +mvn install + +pushd $ART-ui +mvn jetty:run diff --git a/scripts/validate-widget-archetype-linux.sh b/scripts/validate-widget-archetype-linux.sh new file mode 100755 index 0000000000..e29c69f3f4 --- /dev/null +++ b/scripts/validate-widget-archetype-linux.sh @@ -0,0 +1,39 @@ +#!/bin/bash + +display_usage() { +echo -e "\nUsage:\n$0 \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##vaadin-$VERSION-staging$REPOBASE$VAADINREPO#" */pom.xml +# Add vaadin and plugin repo as plugin repos +sed -i "s##vaadin-$VERSION-staging$REPOBASE$VAADINREPO#" */pom.xml +sed -i "s##vaadin-$VERSION-plugin-staging$REPOBASE$PLUGINREPO#" */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 new file mode 100755 index 0000000000..cef27ea2a3 --- /dev/null +++ b/scripts/validate-widget-archetype-osx.sh @@ -0,0 +1,43 @@ +#!/bin/bash + +display_usage() { +echo -e "\nUsage:\n$0 \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##vaadin-$VERSION-staging$REPOBASE$VAADINREPO#" -i $MAC2 */pom.xml +# Add vaadin and plugin repo as plugin repos +sed $MAC1 "s##vaadin-$VERSION-staging$REPOBASE$VAADINREPO#" -i $MAC2 */pom.xml +sed $MAC1 "s##vaadin-$VERSION-plugin-staging$REPOBASE$PLUGINREPO#" -i $MAC2 */pom.xml + +pushd $ART && mvn install && popd +pushd $ART-demo && mvn package jetty:run -- cgit v1.2.3