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.

install-local-maven.sh 1.5KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #!/bin/bash
  2. if [ ! -e "vaadin-shared" ]
  3. then
  4. echo "You must run this in the directory containing folders for the various vaadin-* modules."
  5. echo "If you run this in the project directory, go to result/artifacts/<version>/"
  6. echo "If you run this on build artifacts from the build server, run it in the directory where you unzipped the artifacts"
  7. exit 1
  8. fi
  9. for base in *
  10. do
  11. if [ ! -d "$base" ]
  12. then
  13. continue
  14. fi
  15. pushd "$base"
  16. version=`ls "$base"-*.pom|sed "s/$base-//"|sed "s/.pom//"`
  17. pomTemplate="$base-$version.pom"
  18. if [ -e "$pomTemplate" ]
  19. then
  20. id="$base-$version"
  21. pomFile="$pomTemplate-modified"
  22. file="$id.jar"
  23. javadocFile="$id-javadoc.jar"
  24. sourcesFile="$id-sources.jar"
  25. # Install using real version for easy testing
  26. cat "$pomTemplate"|sed "s/<version>7.*-SNAPSHOT</<version>$version</g" > "$pomFile"
  27. echo "Installing $base $version..."
  28. if [ -e "$javadocFile" ]
  29. then
  30. mvn org.apache.maven.plugins:maven-install-plugin:2.5.1:install-file -DpomFile="$pomFile" -Djavadoc="$javadocFile" -Dsources="$sourcesFile" -Dfile="$file"
  31. else
  32. mvn org.apache.maven.plugins:maven-install-plugin:2.5.1:install-file -DpomFile="$pomFile" -Dfile="$file"
  33. fi
  34. fi
  35. popd
  36. done