-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsettings.sh
More file actions
75 lines (68 loc) · 2.24 KB
/
settings.sh
File metadata and controls
75 lines (68 loc) · 2.24 KB
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#!/bin/bash
# Create the settings.xml file from a template
cat <<EOF > settings.xml
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<servers>
<server>
<id>nexus-deptinfo</id>
<username>${MAVEN_ENT_USERNAME}</username>
<password>${MAVEN_ENT_PASSWORD}</password>
</server>
<server>
<id>nexus-deptinfo-snapshots</id>
<username>${MAVEN_ENT_USERNAME}</username>
<password>${MAVEN_ENT_PASSWORD}</password>
</server>
<server>
<id>sonar</id>
<username>${MAVEN_ENT_USERNAME}</username>
<password>${MAVEN_ENT_PASSWORD}</password>
</server>
</servers>
<mirrors>
<mirror>
<id>nexus-deptinfo</id>
<mirrorOf>*</mirrorOf>
<url>https://disc.univ-fcomte.fr/cr700-nexus/repository/maven-public/</url>
</mirror>
</mirrors>
<pluginGroups>
<pluginGroup>org.sonarsource.scanner.maven</pluginGroup>
</pluginGroups>
<profiles>
<profile>
<id>nexus-deptinfo-snapshots</id>
<activation><activeByDefault>true</activeByDefault></activation>
<repositories>
<repository>
<id>nexus-deptinfo-snapshots</id>
<url>https://disc.univ-fcomte.fr/cr700-nexus/content/groups/public</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</repository>
</repositories>
</profile>
<profile>
<id>sonar</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<sonar.host.url>
https://disc.univ-fcomte.fr/cr700-sonarqube
</sonar.host.url>
</properties>
</profile>
</profiles>
</settings>
EOF
# Move settings.xml to the .m2 directory of the runner's container
mv settings.xml /root/.m2/settings.xml
# Create the settings-security.xml file from a template
cat <<EOF > settings-security.xml
<settingsSecurity>
<master>${MAVEN_MASTER_PASSWORD}</master>
</settingsSecurity>
EOF
# Move settings-security.xml to the .m2 directory of the runner's container
mv settings-security.xml /root/.m2/settings-security.xml