繁体   English   中英

将公共上游源添加到 azure 提要

[英]Add public upstream source to azure feed

我们想拥有

https://repository.jboss.org/nexus/content/repositories/public/ 

作为我们组织级别的 azure 工件提要的上游来源。 据我所知,我们只能拥有来自 npm、nuget、maven 和 pypi 的公共上游源。

任何人都可以就我们应该如何去做提供任何线索。

Azure Artifacts 仅支持公共包管理器(npmjs.com、NuGet.org、Maven Central 和 PyPI)作为公共上游源。

自定义上游源目前仅支持 NPM。

在此处输入图片说明

https://docs.microsoft.com/en-us/azure/devops/artifacts/concepts/upstream-sources?view=azure-devops

你可以通过配置 Azure DevOps Pipeline 直接在你的构建中使用 JBoss Maven 存储库。 例子:

- task: MavenAuthenticate@0
  displayName: 'Maven Authenticate'
  inputs:
    MavenServiceConnections: central,MavenOrg

MavenAuthenticate 任务更新位于 {user.home}/.m2/settings.xml 的代理用户的 .m2 目录中的 settings.xml 文件,以在元素内添加两个条目。

设置.xml

<servers>
  <server>
    <id>central</id>
    <username>centralUsername</username>
    <password>****</password>
  </server>
  <server>
    <id>MavenOrg</id>
    <username>mavenOrgUsername</username>
    <password>****</password>
  </server>
</servers>

您应该将项目的 pom.xml 中的存储库设置为与任务中指定的名称相同,以便 Maven 能够正确验证任务。

pom.xml

<repository>
  <id>central</id>
  <url>https://repo1.maven.org/maven2/</url>
  <releases>
    <enabled>true</enabled>
  </releases>
  <snapshots>
    <enabled>true</enabled>
  </snapshots>
</repository>

https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/package/maven-authenticate?view=azure-devops#authenticate-maven-feeds-outside-your-organization

https://developer.jboss.org/docs/DOC-15170

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM