Skip to content

Commit 10da584

Browse files
authored
feat: Maven profile for Airlock (#928)
* feat: Maven profile for Airlock b/356854847
1 parent 2a3bd73 commit 10da584

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

java-shared-config/pom.xml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,18 @@
381381
</executions>
382382
</plugin>
383383
</plugins>
384+
<extensions>
385+
<extension>
386+
<!--
387+
Enables the "artifactregistry://" URL scheme (go/airlock/howto_maven).
388+
Note that Maven extensions cannot be included in profiles (
389+
https://maven.apache.org/guides/introduction/introduction-to-profiles.html#profiles-in-poms)
390+
-->
391+
<groupId>com.google.cloud.artifactregistry</groupId>
392+
<artifactId>artifactregistry-maven-wagon</artifactId>
393+
<version>2.2.3</version>
394+
</extension>
395+
</extensions>
384396
</build>
385397

386398
<reporting>
@@ -658,5 +670,36 @@
658670
<maven.compiler.release>8</maven.compiler.release>
659671
</properties>
660672
</profile>
673+
<profile>
674+
<!-- Profile to use Airlock (go/airlock/howto_maven). Disabled by default. -->
675+
<id>airlock-trusted</id>
676+
<repositories>
677+
<repository>
678+
<id>airlock</id>
679+
<name>Airlock</name>
680+
<url>artifactregistry://us-maven.pkg.dev/artifact-foundry-prod/maven-3p-trusted</url>
681+
<layout>default</layout>
682+
<releases>
683+
<enabled>true</enabled>
684+
</releases>
685+
<snapshots>
686+
<enabled>true</enabled>
687+
</snapshots>
688+
</repository>
689+
<repository>
690+
<id>central</id>
691+
<!-- Disable default Maven Central -->
692+
<name>Maven Central remote repository</name>
693+
<url>https://repo1.maven.org/maven2</url>
694+
<layout>default</layout>
695+
<releases>
696+
<enabled>false</enabled>
697+
</releases>
698+
<snapshots>
699+
<enabled>false</enabled>
700+
</snapshots>
701+
</repository>
702+
</repositories>
703+
</profile>
661704
</profiles>
662705
</project>

0 commit comments

Comments
 (0)