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-osx.sh 1.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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. # Only for Mac
  23. MAC1=-e
  24. MAC2=.foo
  25. REPOBASE=https://oss.sonatype.org/content/repositories/
  26. ART=test-application-$VERSION
  27. GROUP=testpkg
  28. 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
  29. pushd $ART
  30. # Add vaadin repo
  31. sed $MAC1 "s#<repositories>#<repositories><repository><id>vaadin-$VERSION-staging</id><url>$REPOBASE$VAADINREPO</url></repository>#" -i $MAC2 pom.xml
  32. # Add vaadin and plugin repo as plugin repos
  33. sed $MAC1 "s#</repositories>#</repositories><pluginRepositories><pluginRepository><id>vaadin-$VERSION-plugin-staging</id><url>$REPOBASE$PLUGINREPO</url></pluginRepository></pluginRepositories>#" -i $MAC2 pom.xml
  34. mvn install
  35. pushd $ART-ui
  36. mvn jetty:run