-
Notifications
You must be signed in to change notification settings - Fork 1
/
configure_maven.sh
executable file
·48 lines (37 loc) · 1.2 KB
/
configure_maven.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/bin/bash
if [ -z "${ARTIFACTORY_DOMAIN}" ]; then
echo "Environment variable ARTIFACTORY_DOMAIN is not set. Aborting ..."
exit 1
fi
if [ -z "${ARTIFACTORY_USERNAME}" ]; then
echo "Environment variable ARTIFACTORY_USERNAME is not set. Aborting ..."
exit 2
fi
if [ -z "${ARTIFACTORY_PASSWORD}" ]; then
echo "Environment variable ARTIFACTORY_PASSWORD is not set. Aborting ..."
exit 3
fi
if [ -z "${DEPENDENCY_CHECK_NIST_NVD_API_KEY}" ]; then
echo "Environment variable DEPENDENCY_CHECK_NIST_NVD_API_KEY is not set. Aborting ..."
exit 4
fi
if [ -z "${SONAR_DOMAIN}" ]; then
echo "Environment variable SONAR_DOMAIN is not set. Aborting ..."
exit 5
fi
if [ -z "${SONAR_TOKEN}" ]; then
echo "Environment variable SONAR_TOKEN is not set. Aborting ..."
exit 6
fi
if [ -z "${SONATYPE_OSSRH_REPO_USERNAME}" ]; then
echo "Environment variable SONATYPE_OSSRH_REPO_USERNAME is not set. Aborting ..."
exit 7
fi
if [ -z "${SONATYPE_OSSRH_REPO_TOKEN}" ]; then
echo "Environment variable SONATYPE_OSSRH_REPO_TOKEN is not set. Aborting ..."
exit 8
fi
mkdir -p ~/.m2
cp settings.xml.tmpl ~/.m2/settings.xml
mkdir -p .m2/repository
ln -s $(pwd)/.m2/repository ~/.m2/repository