Use https url as staging repo target
[releng/builder.git] / jjb / autorelease / include-raw-autorelease-maven-deploy.sh
1 #!/bin/bash
2 # @License EPL-1.0 <http://spdx.org/licenses/EPL-1.0>
3 ##############################################################################
4 # Copyright (c) 2015 The Linux Foundation and others.
5 #
6 # All rights reserved. This program and the accompanying materials
7 # are made available under the terms of the Eclipse Public License v1.0
8 # which accompanies this distribution, and is available at
9 # http://www.eclipse.org/legal/epl-v10.html
10 ##############################################################################
11
12 # Assuming that mvn deploy created the hide/from/pom/files/stage directory.
13 cd hide/from/pom/files
14 mkdir -p m2repo/org/opendaylight/
15
16 (IFS='
17 '
18 for m in `xmlstarlet sel -N x=http://maven.apache.org/POM/4.0.0 -t -m '//x:modules' -v '//x:module' ../../../../pom.xml`; do
19     rsync -avz --exclude 'maven-metadata*' \
20                --exclude '_remote.repositories' \
21                --exclude 'resolver-status.properties' \
22                "stage/org/opendaylight/$m" m2repo/org/opendaylight/
23 done)
24
25 # Add exception for integration project since they release under the
26 # integration top-level project.
27 rsync -avz --exclude 'maven-metadata*' \
28            --exclude '_remote.repositories' \
29            --exclude 'resolver-status.properties' \
30            "stage/org/opendaylight/integration" m2repo/org/opendaylight/
31
32 mvn org.sonatype.plugins:nexus-staging-maven-plugin:1.6.2:deploy-staged-repository \
33     -DrepositoryDirectory="`pwd`/m2repo" \
34     -DnexusUrl=https://nexus.opendaylight.org/ \
35     -DstagingProfileId="425e43800fea70" \
36     -DserverId="opendaylight.staging" \
37     -s $SETTINGS_FILE \
38     -gs $GLOBAL_SETTINGS_FILE | tee $WORKSPACE/deploy-staged-repository.log