Code Review
/
releng
/
global-jjb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Add release notes for checking openjdk $VERSION
[releng/global-jjb.git]
/
shell
/
maven-fetch-metadata.sh
diff --git
a/shell/maven-fetch-metadata.sh
b/shell/maven-fetch-metadata.sh
index
ebffa96
..
4696451
100644
(file)
--- a/
shell/maven-fetch-metadata.sh
+++ b/
shell/maven-fetch-metadata.sh
@@
-1,4
+1,4
@@
-#!/bin/bash
+#!/bin/bash
-l
# SPDX-License-Identifier: EPL-1.0
##############################################################################
# Copyright (c) 2017 The Linux Foundation and others.
# SPDX-License-Identifier: EPL-1.0
##############################################################################
# Copyright (c) 2017 The Linux Foundation and others.
@@
-11,6
+11,13
@@
# Uses wget to fetch a project's maven-metadata.xml files from a Maven repository.
# Uses wget to fetch a project's maven-metadata.xml files from a Maven repository.
+# Check for "-f" maven param, indicating a change in pom location.
+pom_path="pom.xml"
+file_path=$(echo $MAVEN_PARAMS | grep -E "\-f \S+" | awk '{ print $2 }')
+if [ ! -z $file_path ]; then
+ pom_path="$file_path/pom.xml"
+fi
+
# Ensure we fail the job if any steps fail.
set -xeu -o pipefail
# Ensure we fail the job if any steps fail.
set -xeu -o pipefail
@@
-20,7
+27,7
@@
project=$(xmlstarlet sel \
-v "/x:project/x:groupId" \
--elif "/x:project/x:parent/x:groupId" \
-v "/x:project/x:parent/x:groupId" \
-v "/x:project/x:groupId" \
--elif "/x:project/x:parent/x:groupId" \
-v "/x:project/x:parent/x:groupId" \
- --else -o ""
pom.xml
)
+ --else -o ""
$pom_path
)
project_path="${project//.//}"
mkdir -p "$WORKSPACE/m2repo/$project_path"
project_path="${project//.//}"
mkdir -p "$WORKSPACE/m2repo/$project_path"