是否可以上传/下载整个目录及其中的所有子目录到/从Nexus存储库服务器?
我最近将一些maven工件直接下载到我的本地存储库(.m2/repository).现在我安装了Nexus Repository Manager,需要填充其存储空间,而无需再次下载所有工件.有没有办法用本地存储库更新Nexus存储库.我不想简单地复制它们,因为Nexus将有关其公共服务器(中央,代码等)的文件与本地存储库结构分开.
更新:同时我将工件从本地存储库复制到Nexus存储(公共存储库).我可以通过Nexus webapp浏览工件,但是Maven无法解决Nexus的工件问题.我需要特别注册吗?我重新编制了公共存储库的索引并多次重启Nexus - 没有任何更改.
我正在使用Apache Maven 3.0 Nexus开源版,版本:1.8.0.1
这是我的pom.xml的一部分
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.5</version>
</plugin>
<plugin>
<artifactId>maven-release-plugin</artifactId>
<version>2.1</version>
</plugin>
<distributionManagement>
<repository>
<id>nexus</id>
<name>nexus</name>
<url>http://myrepo/nexus/content/repositories/releases</url>
</repository>
</distributionManagement>
Run Code Online (Sandbox Code Playgroud)
这是一个非常简单的项目.当我做
mvn release:prepare
mvn release:perform
Run Code Online (Sandbox Code Playgroud)
一切顺利:
...
[INFO] [INFO] --- maven-deploy-plugin:2.5:deploy (default-deploy) @ simple ---
[INFO] Uploading: http://myrepo/nexus/content/repositories/releases/...pom
[INFO] 4 KB
[INFO] 5 KB
[INFO]
[INFO] Uploaded: http://myrepo/nexus/content/repositories/releases/....pom (5 KB at 1.0 KB/sec)
[INFO] Downloading: http://myrepo/nexus/content/repositories/releases/.../maven-metadata.xml
[INFO] 603 B
[INFO]
[INFO] Downloaded: http://myrepo/nexus/content/repositories/releases/.../maven-metadata.xml (603 B at 1.5 KB/sec)
[INFO] Uploading: http://myrepo/nexus/content/repositories/releases/.../maven-metadata.xml
[INFO] 634 B
[INFO]
[INFO] Uploaded: http://myrepo/nexus/content/repositories/.../maven-metadata.xml (634 B …
Run Code Online (Sandbox Code Playgroud) 最近我从Archiva迁移到了Sonatype Nexus.
我正在尝试使用来自第三方存储库的Jars,而Nexus不会将其缓存到本地存储库中.
我已经在本节中搜索了答案,而且无法回答这个问题.
这就是我做的......
我正在使用settings.xml:
<settings>
<mirrors>
<mirror>
<!--This sends everything else to /public -->
<id>nexus</id>
<mirrorOf>*</mirrorOf>
<url>http://THE_URL:8080/nexus/content/groups/public</url>
</mirror>
</mirrors>
<servers>
<server>
<id>admin</id>
<username>user</username>
<password>password</password>
</server>
</servers>
<profiles>
<profile>
<id>nexus</id>
<!--Enable snapshots for the built in central repo to direct -->
<!--all requests to nexus via the mirror -->
<repositories>
<repository>
<id>central</id>
<url>http://central</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>central</id>
<url>http://central</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
<activeProfiles>
<!--make the profile active all the time -->
<activeProfile>nexus</activeProfile>
</activeProfiles>
</settings> …
Run Code Online (Sandbox Code Playgroud) 我找不到有关使用适用于Nexus v3.x的REST API的任何信息(里程碑6是当前的最新版本),我也无法在UI中找到任何可以将我带到API文档的内容.
任何人都知道我可以找到更多信息(我目前广泛使用API来自动配置管理Nexus实例与v2.11.x)?
亲切的问候
弗雷泽.
我正在尝试通过注册表安装我的Ionic App及其依赖项.我尝试实现这一点,npm i --loglevel verbose
而我~/.npmrc
看起来像这样:
//nexus.OMMITED.com/repository/:_auth=OMMITED
registry=http://nexus.OMMITED.com/repository/npm-all
always-auth=true
Run Code Online (Sandbox Code Playgroud)
在观看命令运行时,它看起来很好,直到我们遇到其他非注册表依赖项,突然我遇到了授权错误.
这是命令的粘贴:https://hasteb.in/hejigopo.sql
正如你所看到的那样@angular/http@6.1.2
在这个实例中失败了,但这个变量在随机@angular
依赖之间或者@ionic-native
到目前为止我尝试过的...
always-auth
到true
或false
_authToken
而不是_auth
npm login --registry=http://nexus.OMMITED.com/repository/npm-all
既--auth=TOKEN_OMITTED
与--authToken=TOKEN_OMITTED
地方NPM告诉我npm WARN invalid config auth-type="TOKEN_OMITTED"
,并提示输入用户名,我的用户名不过是引发此错误的电子邮件地址:npm WARN Name may not contain non-url-safe chars
只保留无限提示另一个用户名.我正在尝试将代理添加到公共存储库(特别是camel-extra).但是,我的Nexus日志中出现以下错误:
无法获取存储库camel-extra的远程索引
然后再往下走
我们请求的remoteURL在远程服务器上不存在(remoteUrl ="http://camel-extra.googlecode.com/svn/maven2/releases/.index/nexus-maven-repository-index.properties")
我确保'下载远程索引'是'真',修复索引,更新索引,一切都无济于事.浏览到提供的URL会显示工件存在.
因此,如果存储库没有此文件,是否通过Nexus无法代理?
TIA,罗伊
UPDATE
感谢大家的答案 - 能够在没有索引的情况下拉出文物.再次感谢!
我们的组织使用Sonatype Nexus来管理工件,无论它们是我们开发的内部托管的东西,还是Apache或类似的其他存储库的代理.大多数东西都是基于JAR的.
我的小组在R中完成了大部分工作,我们想知道1)在Nexus中将内部代码部署为R包,以及2)在Nexus中为CRAN镜像创建代理是否有意义.我想这需要一些胶水代码,但我对Nexus不太满意,所以我不确定那会是什么样子.理想情况下,我们可以直接点击Nexus来安装R软件包,而不是先下载并手动安装.
有人有建议或先例吗?
这是我的元数据.这显然是不正确的,但我不知道为什么,所以maven无法更新我的项目中的下载依赖项.
<metadata modelVersion="1.1.0">
<groupId>com.test</groupId>
<artifactId>test-sdk</artifactId>
<version>1.7.0-SNAPSHOT</version>
<versioning>
<snapshot>
<timestamp>20140130.175110</timestamp>
<buildNumber>58</buildNumber>
</snapshot>
<lastUpdated>20140130175110</lastUpdated>
<snapshotVersions>
<snapshotVersion>
<extension>jar</extension>
<value>1.7.0-20140130.175109-57</value>
<updated>20140130175110</updated>
</snapshotVersion>
<snapshotVersion>
<extension>pom</extension>
<value>1.7.0-20140130.175109-57</value>
<updated>20140130175110</updated>
</snapshotVersion>
</snapshotVersions>
</versioning>
</metadata>
Run Code Online (Sandbox Code Playgroud) 我有一个Nexus maven repo,我想利用REST API来查询我特定组中的工件列表.我偶然发现了这个文档,但它似乎非常简洁,我找不到我需要的东西.
https://oss.sonatype.org/nexus-restlet1x-plugin/default/docs/rest.html
我想要这样的东西
http://mydomain:8081/nexus/service/local/repositories/list?groupId=com.test.superproduct&repo=snapshots
Run Code Online (Sandbox Code Playgroud)
它会输出一个列表
更具体地说,我需要一个位于组中的工件版本列表,但我也可以从工件名称中提取版本.