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-widget-archetype-osx.sh 1.6KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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-widget-$VAADINVERSION
  27. GROUP=testpkg
  28. 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
  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#<pluginRepositories>#<pluginRepositories><pluginRepository><id>vaadin-$VERSION-staging</id><url>$REPOBASE$VAADINREPO</url></pluginRepository>#" -i $MAC2 */pom.xml
  34. sed $MAC1 "s#<pluginRepositories>#<pluginRepositories><pluginRepository><id>vaadin-$VERSION-plugin-staging</id><url>$REPOBASE$PLUGINREPO</url></pluginRepository>#" -i $MAC2 */pom.xml
  35. pushd $ART && mvn install && popd
  36. pushd $ART-demo && mvn package jetty:run