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.

mvn-deploy.sh 2.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. #! /bin/sh
  2. #
  3. # Licensed to the Apache Software Foundation (ASF) under one or more
  4. # contributor license agreements. See the NOTICE file distributed with
  5. # this work for additional information regarding copyright ownership.
  6. # The ASF licenses this file to You under the Apache License, Version 2.0
  7. # (the "License"); you may not use this file except in compliance with
  8. # the License. You may obtain a copy of the License at
  9. #
  10. # http://www.apache.org/licenses/LICENSE-2.0
  11. #
  12. # Unless required by applicable law or agreed to in writing, software
  13. # distributed under the License is distributed on an "AS IS" BASIS,
  14. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15. # See the License for the specific language governing permissions and
  16. # limitations under the License.
  17. #
  18. # Shell script to deploy POI artifacts in a maven repository.
  19. #
  20. # Note, You should configure your settings.xml and add a server with id=apache-releases:
  21. #
  22. # <server>
  23. # <id>apache-releases</id>
  24. # <username>apacheId</username>
  25. # <password>mySecurePassw0rd</password>
  26. # </server>
  27. #
  28. # <profiles>
  29. # <profile>
  30. # <id>apache-releases</id>
  31. # <properties>
  32. # <gpg.passphrase><!-- Your GPG passphrase --></gpg.passphrase>
  33. # </properties>
  34. # </profile>
  35. # </profiles>
  36. #
  37. # Usage:
  38. # 1. ant dist
  39. # 2. cd build/dist
  40. # 3. ./mvn-deploy.sh
  41. M2_REPOSITORY=https://repository.apache.org/service/local/staging/deploy/maven2
  42. VERSION=@VERSION@
  43. DSTAMP=@DSTAMP@
  44. for artifactId in poi poi-scratchpad poi-ooxml poi-examples poi-ooxml-schemas poi-excelant
  45. do
  46. SENDS="-Dfile=$artifactId-$VERSION-$DSTAMP.jar"
  47. SENDS="$SENDS -DpomFile=$artifactId-$VERSION.pom"
  48. if [ -r $artifactId-$VERSION-sources-$DSTAMP.jar ]; then
  49. SENDS="$SENDS -Dsources=$artifactId-$VERSION-sources-$DSTAMP.jar"
  50. fi
  51. if [ -r $artifactId-$VERSION-javadocs-$DSTAMP.jar ]; then
  52. SENDS="$SENDS -Dsources=$artifactId-$VERSION-javadocs-$DSTAMP.jar"
  53. fi
  54. mvn gpg:sign-and-deploy-file \
  55. -DrepositoryId=apache-releases -P apache-releases \
  56. -Durl=$M2_REPOSITORY \
  57. $SENDS
  58. done