如何在Maven项目中使用JFrog工件库

时间:2022-08-31 22:50:07

Please let me know how I could use/import/download a tool from JFrog artifact repository to my Maven project. I have not worked with artifactory before and Googling did not help much so any help on this would be much appreciated.

请让我知道如何使用/导入/下载JFrog工件库中的工具到我的Maven项目。我之前没有使用过神器,谷歌搜索也没有多大帮助,所以对此的任何帮助都会非常感激。

2 个解决方案

#1


1  

You should probably start with the Working with Maven section in the Artifactory user guide

您应该从Artifactory用户指南中的Working with Maven部分开始

#2


0  

If you want to work with a Jfrog Artifactory from your maven project you need to:

如果您想使用maven项目中的Jfrog Artifactory,您需要:

  • Create maven repos in Jfrog Artifactory.

    在Jfrog Artifactory中创建maven repos。

    I recomend you to create a local SNAPSHOT repo and a local release repo for every type of maven repo that you want.

    我建议你为你想要的每种类型的maven仓库创建一个本地SNAPSHOT仓库和本地发布仓库。

    Example of local repos:

    本地回购示例:

    libsrepo-snapshot-local 
    libsrepo-release-local
    projectsrepo-snapshot-local
    projectsrepo-local-local
    

    You can create a remote repo for external dependencies, for example, for maven central.

    您可以为外部依赖项创建远程仓库,例如,对于maven central。

    Example of remote repo:

    远程回购示例:

    maven-remote
    

    Also, you can create a virtual repo to agrupe all your maven repo. For example, you can create the repo "maven-virtual-repo" where you can have all the repos that you want.

    此外,您可以创建一个虚拟仓库,以对所有maven仓库进行评估。例如,您可以创建仓库“maven-virtual-repo”,您可以在其中拥有所需的所有仓库。

    Example of virtual repo:

    虚拟仓库的示例:

    maven-virtual-repo
    
  • Configure your settings.xml to work with your Jfrog Artifactory repos. You can get more info here: How to configure your settings.xml to work with repositories

    配置settings.xml以使用Jfrog Artifactory存储库。您可以在此处获取更多信息:如何配置settings.xml以使用存储库

  • Deploy to Jfrog Artifactory using:

    使用以下命令部署到Jfrog Artifactory:

    mvn deploy
    

If you need more help about how to create repos in Jfrog Artifactory you can visit the official guide: Configuring Repositories

如果您需要有关如何在Jfrog Artifactory中创建repos的更多帮助,可以访问官方指南:配置存储库

#1


1  

You should probably start with the Working with Maven section in the Artifactory user guide

您应该从Artifactory用户指南中的Working with Maven部分开始

#2


0  

If you want to work with a Jfrog Artifactory from your maven project you need to:

如果您想使用maven项目中的Jfrog Artifactory,您需要:

  • Create maven repos in Jfrog Artifactory.

    在Jfrog Artifactory中创建maven repos。

    I recomend you to create a local SNAPSHOT repo and a local release repo for every type of maven repo that you want.

    我建议你为你想要的每种类型的maven仓库创建一个本地SNAPSHOT仓库和本地发布仓库。

    Example of local repos:

    本地回购示例:

    libsrepo-snapshot-local 
    libsrepo-release-local
    projectsrepo-snapshot-local
    projectsrepo-local-local
    

    You can create a remote repo for external dependencies, for example, for maven central.

    您可以为外部依赖项创建远程仓库,例如,对于maven central。

    Example of remote repo:

    远程回购示例:

    maven-remote
    

    Also, you can create a virtual repo to agrupe all your maven repo. For example, you can create the repo "maven-virtual-repo" where you can have all the repos that you want.

    此外,您可以创建一个虚拟仓库,以对所有maven仓库进行评估。例如,您可以创建仓库“maven-virtual-repo”,您可以在其中拥有所需的所有仓库。

    Example of virtual repo:

    虚拟仓库的示例:

    maven-virtual-repo
    
  • Configure your settings.xml to work with your Jfrog Artifactory repos. You can get more info here: How to configure your settings.xml to work with repositories

    配置settings.xml以使用Jfrog Artifactory存储库。您可以在此处获取更多信息:如何配置settings.xml以使用存储库

  • Deploy to Jfrog Artifactory using:

    使用以下命令部署到Jfrog Artifactory:

    mvn deploy
    

If you need more help about how to create repos in Jfrog Artifactory you can visit the official guide: Configuring Repositories

如果您需要有关如何在Jfrog Artifactory中创建repos的更多帮助,可以访问官方指南:配置存储库