在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):GoogleCloudPlatform/artifact-registry-maven-tools开源软件地址(OpenSource Url):https://github.com/GoogleCloudPlatform/artifact-registry-maven-tools开源编程语言(OpenSource Language):Java 100.0%开源软件介绍(OpenSource Introduction):Artifact Registry Maven ToolsThis repository contains tools to help with interacting with Maven repositories hosted on Artifact Registry. AuthenticationRequests to Artifact Registry will be authenticated using credentials from the environment. The tools described below search the environment for credentials in the following order:
Maven SetupThe Artifact Registry Wagon is an implementation of the Maven Wagon API which allows you to configure Maven to interact with repositories stored in Artifact Registry. To enable the wagon, add the following configuration to the <extensions>
<extension>
<groupId>com.google.cloud.artifactregistry</groupId>
<artifactId>artifactregistry-maven-wagon</artifactId>
<version>2.1.4</version>
</extension>
</extensions> You can then configure repositories by using the "artifactregistry://" prefix. In this example the repository is in 'us-west1', you should use the correct location for your repository. <repositories>
<repository>
<id>my-repository</id>
<url>artifactregistry://us-west1-maven.pkg.dev/PROJECT_ID/REPOSITORY_ID</url>
<releases>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories> Where
Gradle SetupTo use Artifact Registry repositories with gradle, add the following configuration to the
plugins {
id "com.google.cloud.artifactregistry.gradle-plugin" version "2.1.4"
}
repositories {
maven {
url 'artifactregistry://us-west1-maven.pkg.dev/PROJECT_ID/REPOSITORY_ID'
}
}
publishing {
repositories {
maven {
url 'artifactregistry://us-west1-maven.pkg.dev/PROJECT_ID/REPOSITORY_ID'
}
}
} Where
AlternativesIf you need to use Artifact Registry repositories inside your
initscript {
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "gradle.plugin.com.google.cloud.artifactregistry:artifactregistry-gradle-plugin:2.1.4"
}
}
apply plugin: com.google.cloud.artifactregistry.gradle.plugin.ArtifactRegistryGradlePlugin
buildscript {
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "gradle.plugin.com.google.cloud.artifactregistry:artifactregistry-gradle-plugin:2.1.4"
}
}
apply plugin: "com.google.cloud.artifactregistry.gradle-plugin" |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论