【问题标题】:How to add new repository to Sonatype Nexus?如何将新存储库添加到 Sonatype Nexus?
【发布时间】:2015-08-24 12:15:48
【问题描述】:

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

  1. 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)

格式:将采用默认格式

存储库策略:将采用默认值

默认本地存储位置:(这个字段我没有得到)

覆盖本地存储位置:(这个字段我没有得到)

远程存储位置:(这个字段我没有得到)

在创建新存储库时,我并没有得到 “(我没有得到这个字段)”提到的一些东西。

请告诉我我需要为这些字段提供什么输入。

在那之后我如何使用那个特定的东西从本地存储库或 maven 下载插件

【问题讨论】:

    标签: maven grails grails-plugin sonatype


    【解决方案1】:

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

    1. 对于 ma​​venCentral,您提供这些输入

      存储库 ID:grails_plugins(您的愿望)

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

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

      提供者:maven2

      格式:将采用默认格式

      存储库策略:将采用默认值

      默认本地存储位置:空白

      覆盖本地存储位置:空白

      远程存储位置: http://repo1.maven.org/maven2/

    2. 对于 grailsCentral,您提供这些输入

      存储库 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()
    

    【讨论】:

      猜你喜欢
      • 2013-08-02
      • 2012-06-28
      • 1970-01-01
      • 2016-01-19
      • 2011-06-14
      • 2014-10-05
      • 1970-01-01
      • 2019-09-24
      • 2014-01-09
      相关资源
      最近更新 更多