如何将新存储库添加到 Sonatype Nexus?
How to add new repository to Sonatype Nexus?
事实上,直到今天我们都使用默认 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)
格式:采用默认格式
存储库策略:将采用默认值
默认本地存储位置:(我没有得到这个字段)
覆盖本地存储位置:(我没有得到这个字段)
远程存储位置:(我没有得到这个字段)
在创建新存储库时,我没有得到 提到的一些东西”(我没有得到这个字段)”.
请告诉我需要在这些字段中输入什么。
在那之后我如何使用那个特定的东西从本地存储库或 maven 下载插件
为此你需要创建两个存储库
1.maven中心
2. grailsCentral
对于 mavenCentral 你给这些输入
存储库 ID:grails_plugins(您的意愿)
存储库名称:Grails 插件(您的愿望)
存储库类型:将采用默认值
供应商:maven2
格式:采用默认格式
存储库策略:将采用默认值
默认本地存储位置:空白
覆盖本地存储位置:空白
远程存储位置:
http://repo1.maven.org/maven2/
对于 grailsCentral 你给这些输入
存储库 ID:grails_plugins1(您的意愿)
存储库名称:Grails Plugins1(您的愿望)
存储库类型:将采用默认值
供应商:maven2
格式:采用默认格式
存储库策略:将采用默认值
默认本地存储位置:空白
覆盖本地存储位置:空白
并在 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()
事实上,直到今天我们都使用默认 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)
格式:采用默认格式
存储库策略:将采用默认值
默认本地存储位置:(我没有得到这个字段)
覆盖本地存储位置:(我没有得到这个字段)
远程存储位置:(我没有得到这个字段)
在创建新存储库时,我没有得到 提到的一些东西”(我没有得到这个字段)”.
请告诉我需要在这些字段中输入什么。
在那之后我如何使用那个特定的东西从本地存储库或 maven 下载插件
为此你需要创建两个存储库 1.maven中心 2. grailsCentral
对于 mavenCentral 你给这些输入
存储库 ID:grails_plugins(您的意愿)
存储库名称:Grails 插件(您的愿望)
存储库类型:将采用默认值
供应商:maven2
格式:采用默认格式
存储库策略:将采用默认值
默认本地存储位置:空白
覆盖本地存储位置:空白
远程存储位置: http://repo1.maven.org/maven2/
对于 grailsCentral 你给这些输入
存储库 ID:grails_plugins1(您的意愿)
存储库名称:Grails Plugins1(您的愿望)
存储库类型:将采用默认值
供应商:maven2
格式:采用默认格式
存储库策略:将采用默认值
默认本地存储位置:空白
覆盖本地存储位置:空白
并在 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()