gpt4 book ai didi

maven - 如何将新的存储库添加到Sonatype Nexus?

转载 作者:行者123 更新时间:2023-12-02 16:00:11 25 4
gpt4 key购买 nike

直到今天,Actullay仍在使用默认的BuildConfig.groovy下载插件,但现在我们正在寻找创建具有Sonatype nexus的本地存储库。

  • 由sts 3.5.0创建的grails简单应用程序,默认情况下会下载一些插件,例如
    build ":tomcat:7.0.55"

    // plugins for the compile step
    compile ":scaffolding:2.1.2"
    compile ':cache:1.1.8'
    compile ":asset-pipeline:1.9.9"

    runtime ":hibernate4:4.3.6.1" // or ":hibernate:3.6.10.18"
    runtime ":database-migration:1.4.0"
    runtime ":jquery:1.11.1"

  • 为此,我尝试在Sonatype nexus中创建一个新的代理存储库,但是,我不知道的字段很少

    仓库ID:grails_plugins

    仓库名称:Grails插件

    存储库类型:将采用默认值

    提供程序:(我没有得到此选项的字段是maven1,maven2,npm,NuGet,Rubygems)

    格式:默认

    储存库政策:将采用默认设置

    默认本地存储位置:(我没有收到此字段)

    覆盖本地存储位置:(我没有收到此字段)

    远程存储位置:(我没有收到此字段)

    在创建新存储库时,我并没有收到 “(我没有得到此字段)” 提到的一些内容。

    请告诉我我需要为那些 Realm 提供意见。

    之后,我该如何使用该特定内容从本地存储库或Maven下载插件

    最佳答案

    为此,您需要创建两个存储库
    1. mavenCentral
    2. grailsCentral

  • 对于 mavenCentral ,您可以输入以下内容

    仓库ID:grails_plugins(您的愿望)

    仓库名称:Grails插件(您的愿望)

    存储库类型:将采用默认值

    提供者:maven2

    格式:默认

    储存库政策:将采用默认设置

    默认本地存储位置:空白

    覆盖本地存储位置:空白

    远程存储位置:
    http://repo1.maven.org/maven2/
  • 对于 grails中心,请输入以下内容

    仓库ID:grails_plugins1(您的愿望)

    仓库名称:Grails Plugins1(您的愿望)

    存储库类型:将采用默认值

    提供者:maven2

    格式:默认

    储存库政策:将采用默认设置

    默认本地存储位置:空白

    覆盖本地存储位置:空白

    远程存储位置:
    https://repo.grails.org/grails/plugins/

  • 并在BuildConfig.groovy的存储库关闭中添加以下两行
     repositories {
    // these links get created once you create repository
    mavenRepo "http://ip-address:8081/nexus/content/repositories/grails_plugins1/"
    mavenRepo "http://ip-address:8081/nexus/content/repositories/grails_plugins/"
    }

    可选:我在同一存储库关闭中已评论以下内容
        //grailsPlugins()
    //grailsHome()
    //mavenLocal()
    //grailsCentral()
    //mavenCentral()

    关于maven - 如何将新的存储库添加到Sonatype Nexus?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32182098/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com