2008-11-20 10:08:42 -05:00
|
|
|
#! /bin/sh
|
|
|
|
#
|
|
|
|
# Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
# contributor license agreements. See the NOTICE file distributed with
|
|
|
|
# this work for additional information regarding copyright ownership.
|
|
|
|
# The ASF licenses this file to You under the Apache License, Version 2.0
|
|
|
|
# (the "License"); you may not use this file except in compliance with
|
|
|
|
# the License. You may obtain a copy of the License at
|
|
|
|
#
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
#
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
# limitations under the License.
|
|
|
|
#
|
|
|
|
# Shell script to deploy POI artifacts in a maven repository.
|
|
|
|
#
|
|
|
|
# Note, You should configure your settings.xml and add a server with id=apache-releases:
|
|
|
|
#
|
|
|
|
# <server>
|
|
|
|
# <id>apache-releases</id>
|
|
|
|
# <username>apacheId</username>
|
2014-11-18 08:21:39 -05:00
|
|
|
# <password>mySecurePassw0rd</password>
|
2008-11-20 10:08:42 -05:00
|
|
|
# </server>
|
|
|
|
#
|
2009-09-28 05:52:34 -04:00
|
|
|
# <profiles>
|
|
|
|
# <profile>
|
|
|
|
# <id>apache-releases</id>
|
|
|
|
# <properties>
|
|
|
|
# <gpg.passphrase><!-- Your GPG passphrase --></gpg.passphrase>
|
|
|
|
# </properties>
|
|
|
|
# </profile>
|
|
|
|
# </profiles>
|
|
|
|
#
|
2008-11-20 10:08:42 -05:00
|
|
|
# Usage:
|
|
|
|
# 1. ant dist
|
2009-09-28 05:52:34 -04:00
|
|
|
# 2. cd build/dist
|
2008-11-20 10:08:42 -05:00
|
|
|
# 3. ./mvn-deploy.sh
|
|
|
|
|
2014-11-29 19:16:23 -05:00
|
|
|
M2_REPOSITORY=https://repository.apache.org/service/local/staging/deploy/maven2
|
2009-04-11 09:11:39 -04:00
|
|
|
|
2009-11-24 04:10:49 -05:00
|
|
|
VERSION=@VERSION@
|
|
|
|
DSTAMP=@DSTAMP@
|
|
|
|
|
2011-03-07 07:33:22 -05:00
|
|
|
for artifactId in poi poi-scratchpad poi-ooxml poi-examples poi-ooxml-schemas poi-excelant
|
2009-11-24 04:10:49 -05:00
|
|
|
do
|
2014-11-18 08:21:39 -05:00
|
|
|
SENDS="-Dfile=$artifactId-$VERSION-$DSTAMP.jar"
|
|
|
|
SENDS="$SENDS -DpomFile=$artifactId-$VERSION.pom"
|
2009-12-07 09:20:10 -05:00
|
|
|
if [ -r $artifactId-$VERSION-sources-$DSTAMP.jar ]; then
|
2014-11-18 08:21:39 -05:00
|
|
|
SENDS="$SENDS -Dsources=$artifactId-$VERSION-sources-$DSTAMP.jar"
|
2009-11-24 04:10:49 -05:00
|
|
|
fi
|
2014-11-10 07:34:01 -05:00
|
|
|
if [ -r $artifactId-$VERSION-javadocs-$DSTAMP.jar ]; then
|
2014-11-18 08:21:39 -05:00
|
|
|
SENDS="$SENDS -Dsources=$artifactId-$VERSION-javadocs-$DSTAMP.jar"
|
2014-11-10 07:34:01 -05:00
|
|
|
fi
|
2014-11-18 08:21:39 -05:00
|
|
|
|
|
|
|
mvn gpg:sign-and-deploy-file \
|
|
|
|
-DrepositoryId=apache-releases -P apache-releases \
|
|
|
|
-Durl=$M2_REPOSITORY \
|
|
|
|
$SENDS
|
2009-11-24 04:10:49 -05:00
|
|
|
done
|