在我的工作中,所有开发都使用Java技术,我们使用Nexus来管理我们的Maven存储库.但是对于一个新项目,构建需要dll和exe工件.是否可以将这些Windows二进制文件放入Nexus存储库?是否有一些插件可以使这更简单?我想做什么疯了?
我们在一些旧硬件上运行nexus,这些硬件在磁盘空间方面有限,并且想要移除早于某个阈值的工件.
除了find和curl的组合之外,还有什么方法可以做到这一点吗?
有谁知道如何在常春藤中指定像Maven中的mirror/mirrorOf?我正在使用本地Maven代理(Nexus)并需要该工具来指定Nexus代理应访问哪些父存储库.
在Maven我做的很简单:
<mirrors>
<mirror>
<id>central-mirror</id>
<mirrorOf>central</mirrorOf>
<url>http://localhost:8081/content/repositories/central</url>
</mirror>
</mirrors>
Run Code Online (Sandbox Code Playgroud)
但我在常春藤找不到这种选择.
我有一个Web应用程序的pom文件,一个构建配置文件,它为qa测试做了一些必要的事情(在我的代码中).
我在svn上有这个代码,这个代码是在Hudson中编译的,它在nexus中部署了工件.
Hudson有两个职位,一个是qa profile(-P qa),另一个是客户.
我需要的是,我在部署阶段更改了我的qa配置文件中的工件名称,以便nexus有两个不同的war文件,一个用于qa,另一个用于客户.
我使用(谷歌搜索之后)以下看起来像什么都没有在hudshon!
<profile>
<id>qa</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.5</version>
<configuration>
<classifier>qa</classifier>
</configuration>
</plugin>
</plugins>
</build>
</profile>
Run Code Online (Sandbox Code Playgroud)
有人的想法吗?
我们使用Maven构建我们的项目,使用Nexus作为存储库管理器.
有没有办法知道工件在哪里是另一个工件的依赖?
例如,我们想知道我们的Release存储库中的哪些工件依赖于commons-io 1.2或我们的framework2的xy版本,或者......
我已经从http://mirrors.ibiblio.org/pub/mirrors/maven2/dot-index/nexus-maven-repository-index.gz下载了为Maven Central生成的索引.
我想列出这些索引文件中的工件信息(例如groupId,artifactId,version).我已经读过,有一个高级API.似乎我必须使用以下maven依赖项.但是,我不知道使用什么入口点(哪个类?)以及如何使用它来访问这些文件:
<dependency>
<groupId>org.sonatype.nexus</groupId>
<artifactId>nexus-indexer</artifactId>
<version>3.0.4</version>
</dependency>
Run Code Online (Sandbox Code Playgroud) 所以我们最近为我们的maven存储库管理器实现了一个Nexus服务器.我们代理大约30个外部存储库并将它们全部汇集到一个组中,我们在带有*的镜像的settings.xml中指向它们.
在此之前,我们没有这个问题......现在我们做到了.令我感到沮丧的是,这个虚拟罐子上的信息很少,来自哪里,或者我可以让它来阻止这些故障.我已经研究了几天,没有任何东西.我希望社区能够提供帮助.
18-Oct-2012 22:50:31 [ERROR] BUILD ERROR
18-Oct-2012 22:50:31 [INFO] ------------------------------------------------------------------------
18-Oct-2012 22:50:31 [INFO] Unable to generate classpath: org.apache.maven.artifact.resolver.ArtifactResolutionException: Unable to get dependency information: Unable to read the metadata file for artifact 'org.apache.maven.surefire:surefire-junit4:jar': Cannot find parent: org.apache.maven.surefire:surefire-providers for project: null:surefire-junit4:jar:null for project null:surefire-junit4:jar:null
18-Oct-2012 22:50:31 org.apache.maven.surefire:surefire-junit4:jar:2.12
18-Oct-2012 22:50:31
18-Oct-2012 22:50:31 from the specified remote repositories:
18-Oct-2012 22:50:31 central (http://repo1.maven.org/maven2),
18-Oct-2012 22:50:31 JavaNet-mirror (http://maven:8081/nexus/content/repositories/Java.net/),
18-Oct-2012 22:50:31 Releases (https://nexus:8443/nexus/content/repositories/releases/)
18-Oct-2012 22:50:31
18-Oct-2012 22:50:31 Path to dependency:
18-Oct-2012 22:50:31 1) dummy:dummy:jar:1.0
Run Code Online (Sandbox Code Playgroud) 我刚刚在远程服务器上创建了一个Nexus repo.如果我在本地计算机上访问浏览器,我会看到pom文件就好了.但是,当我尝试mvn clean编译时,我看到......
http://server:8081/nexus/content/repositories/thirdparty/com/class/module/1.0.0/module-1.0.0.pom. Return code is: 503, ReasonPhrase:Service Unavailable. ->
Run Code Online (Sandbox Code Playgroud)
我知道503意味着它无法获得服务,但这引发了我,因为我在浏览器中看到它很好.
我在settings.xml中配置了代理,如果我将referance删除到第三方依赖项,我会得到中心deps.
有任何想法吗?
我尝试将 docker 映像推送到我的私有 Nexus 3 注册表。
在推送之前,我尝试进行身份验证: docker login nexus_host:nexus_port
但我收到以下错误消息:
来自守护进程的错误响应:登录尝试 http:// nexus_host : nexus_port /v2/ 失败,状态:404 Not Found
我的 Nexus 使用 HTTP,因此将其添加到 docker insecure 注册表列表中。
编辑(08/03/2018):
我使用托管的 docker 存储库。我应该使用 HTTP 连接器吗?
回购配置:
格式:docker
类型:托管
URL:http : //192.168.0.90 :8082/repository/docker - repo/
HTTP 连接器端口:1111
登录尝试:
docker login 192.168.0.90:8082
=> 来自守护进程的错误响应:登录尝试http://192.168.0.90:8082/v2/失败,状态:404 Not Found
docker login 192.168.0.90:1111
=> 来自守护进程的错误响应:获取https://192.168.0.90:1111/v2/:拨号 tcp 192.168.0.90:1111:getsockopt:连接被拒绝
我正在尝试com.bar.baz:mapping:0.0.1-SNAPSHOT
使用Gradle从Nexus服务器复制最新的jar文件()。
使用以下build.gradle可以下载特定版本:
apply plugin: "java"
repositories {
maven {
credentials {
username = "${mavenUser}"
password = "${mavenPassword}"
}
url "https://nexus.cluster.foo.cloud/repository/maven-snapshots"
authentication {
basic(BasicAuthentication)
}
}
}
configurations {
copyConf
}
dependencies {
copyConf group: "com.bar.baz", name: "mapping", version: "0.0.1-20190508.085532-7"
}
task copyTask(type: Copy) {
from configurations.copyConf
into "."
}
Run Code Online (Sandbox Code Playgroud)
但是我想下载最新0.0.1-SNAPSHOT
版本,而不是特定0.0.1-20190508.085532-7
版本。那可能吗?怎么样?
使用version "latest.integration"
而不是"0.0.1-20190508.085532-7"
(并调用gradle copyTask --refresh-dependencies --stacktrace
)会产生:
FAILURE: Build failed with an exception.
* What went wrong: Could not resolve all …
Run Code Online (Sandbox Code Playgroud) nexus ×10
maven ×6
binaryfiles ×1
build.gradle ×1
dependencies ×1
docker ×1
gradle ×1
ivy ×1
java ×1
lucene ×1
maven-2 ×1
maven-3 ×1
profile ×1
proxy ×1
repository ×1
surefire ×1