Skip to content

Commit 0345aa7

Browse files
committed
ci: Airlock settings files
How to run the build with Airlock: ``` mvn --settings .mvn/settings.xml clean install -DskipTests ```
1 parent 8547735 commit 0345aa7

File tree

3 files changed

+38
-0
lines changed

3 files changed

+38
-0
lines changed

.mvn/extensions.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<extensions xmlns="http://maven.apache.org/EXTENSIONS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2+
xsi:schemaLocation="http://maven.apache.org/EXTENSIONS/1.0.0 http://maven.apache.org/xsd/core-extensions-1.0.0.xsd">
3+
<extension>
4+
<groupId>com.google.cloud.artifactregistry</groupId>
5+
<artifactId>artifactregistry-maven-wagon</artifactId>
6+
<version>2.2.4</version>
7+
</extension>
8+
</extensions>

.mvn/settings.xml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2+
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 https://maven.apache.org/xsd/settings-1.0.0.xsd">
3+
<mirrors>
4+
<mirror>
5+
<id>mirror-of-all</id>
6+
<name>Airlock Maven 3P Trusted</name>
7+
<url>artifactregistry://us-maven.pkg.dev/artifact-foundry-prod/maven-3p-trusted</url>
8+
<mirrorOf>*</mirrorOf>
9+
</mirror>
10+
</mirrors>
11+
</settings>

.mvn/settings_bootstrap.xml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2+
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 https://maven.apache.org/xsd/settings-1.0.0.xsd">
3+
4+
<!-- This will ensure that all requests go through ar - but requires that we have an updated token in the auth section.
5+
That token only lasts an hour.
6+
To update token:
7+
export ARTIFACT_REGISTRY_TOKEN=$(gcloud auth print-access-token)
8+
-->
9+
10+
<mirrors>
11+
<mirror>
12+
<id>mirror-of-all</id>
13+
<name>AR Maven Central mirror</name>
14+
<url>https://repo1.maven.org/maven2</url>
15+
<mirrorOf>*</mirrorOf>
16+
</mirror>
17+
</mirrors>
18+
19+
</settings>

0 commit comments

Comments
 (0)