You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

validate-application-archetype-linux.sh 1.3KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #!/bin/bash
  2. display_usage() {
  3. echo -e "\nUsage:\n$0 <version> <framework staging id> <archetypes staging id> <plugin staging id>\n"
  4. echo -e "Example: 7.3.7 1450 1451 1452"
  5. }
  6. # if less than two arguments supplied, display usage
  7. if [ $# -le 3 ]
  8. then
  9. display_usage
  10. exit 1
  11. fi
  12. # check whether user had supplied -h or --help . If yes display usage
  13. if [[ ( $# == "--help") || $# == "-h" ]]
  14. then
  15. display_usage
  16. exit 0
  17. fi
  18. VERSION=$1
  19. VAADINREPO=comvaadin-$2
  20. ARCHETYPEREPO=comvaadin-$3
  21. PLUGINREPO=comvaadin-$4
  22. REPOBASE=https://oss.sonatype.org/content/repositories/
  23. ART=test-application-$VERSION
  24. GROUP=testpkg
  25. 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
  26. pushd $ART
  27. # Add vaadin repo
  28. sed -i "s#<repositories>#<repositories><repository><id>vaadin-$VERSION-staging</id><url>$REPOBASE$VAADINREPO</url></repository>#" pom.xml
  29. # Add vaadin and plugin repo as plugin repos
  30. sed -i "s#</repositories>#</repositories><pluginRepositories><pluginRepository><id>vaadin-$VERSION-plugin-staging</id><url>$REPOBASE$PLUGINREPO</url></pluginRepository></pluginRepositories>#" pom.xml
  31. mvn install
  32. pushd $ART-ui
  33. mvn jetty:run