Intelliji Idea在设置中添加了3个免费在线存储库 - > maven - > artifactory或nexus服务网址 http://oss.sonatype.org/service/local/ http://repo.jfrog.org/artifactory/api/ https: //repository.jboss.org/nexus/service/local/
所有这些回购都是不可传递的(404错误或密码保护).
你能不提供更多免费的神器或nexus服务网址而无需密码保护?IDEA在repo URL上没有密码设置.
正如你上面提到的,我已经更新了pom
<distributionManagement>
<repository>
<id>deployment</id>
<name>deployment</name>
<url>http://localhost:8080/nexus-webapp-1.9.2/content/repositories/releases</url>
</repository>
<snapshotRepository>
<id>snapshots</id>
<name>Internal Snapshots</name>
<url>http://localhost:8080/nexus-webapp-1.9.2/content/repositories/snapshots</url>
</snapshotRepository>
</distributionManagement>
Run Code Online (Sandbox Code Playgroud)
并且还改变了settings.xml
这样的东西
<server>
<id>deployment</id>
<username>deployment</username>
<password>deployment123</password>
</server>
<server>
<id>snapshots</id>
<username>deployment</username>
<password>deployment123</password>
</server>
Run Code Online (Sandbox Code Playgroud)
但是当我使用mvn deploy
maven命令进行部署时,我得到了这样的异常:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.5:deploy (default-deploy) on project Test: Failed to deploy artifacts: Could not transfer ar
tifact Test:Test:jar:0.0.1 from deployment (http://localhost:8080/nexus-webapp-1.9.2/content/repositories/releases): Failed to transfer file: http://localhost:8080/nexus-
webapp-1.9.2/content/repositories/releases/Test/Test/0.0.1/Test-0.0.1.jar. Return code is: 401 -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.5:deploy (default-deploy) on project Test: F
ailed to …
Run Code Online (Sandbox Code Playgroud) 我有一个项目POM,它指定一个指向沙箱位置的存储库标记.
<repositories>
<repository>
<id>mysandbox</id>
<name>Sandbox</name>
<url>http://myTestingSite.com/repositories/sandbox/</url>
</repository>
</repositories>
Run Code Online (Sandbox Code Playgroud)
这在Eclipse中工作正常并解析所有依赖项,但是当我尝试部署时,我得到以下异常.
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.5:deploy (default-depl
oy) on project myweb-web: Deployment failed: repository element was not specified in the POM insid
e distributionManagement element or in -DaltDeploymentRepository=id::layout::url parameter -> [Help
1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plug
ins:maven-deploy-plugin:2.5:deploy (default-deploy) on project myweb-web: Deployment failed: repos
itory element was not specified in the POM inside distributionManagement element or in -DaltDeployme
ntRepository=id::layout::url parameter
Run Code Online (Sandbox Code Playgroud)
在Distributionmanagement元素中包含它没有任何意义,因为我使用存储库来进行依赖项解析而不是部署.
我在我的maven私人服务器(nexus)中有一个名为brandstore-repository的jar,
为什么maven每次都会从maven中心服务器上搜索它?
[artifact:mvn] Downloading: http://search.maven.org/remotecontent?filepath=/com/jumbo/brandstore/brandstore-repository/4.0.0/brandstore-repository-4.0.0.pom
[artifact:mvn] Downloading: http://repository.jboss.com/maven2/com/jumbo/brandstore/brandstore-repository/4.0.0/brandstore-repository-4.0.0.pom
[artifact:mvn] Downloading: https://oss.sonatype.org/content/repositories/snapshots//com/jumbo/brandstore/brandstore-repository/4.0.0/brandstore-repository-4.0.0.pom
[artifact:mvn] Downloading: http://10.8.12.100/nexus/content/groups/public/com/jumbo/brandstore/brandstore-repository/4.0.0/brandstore-repository-4.0.0.pom
[artifact:mvn] 1K downloaded
[artifact:mvn] Downloading: http://search.maven.org/remotecontent?filepath=/com/jumbo/brandstore/brandstore/4.0.0/brandstore-4.0.0.pom
[artifact:mvn] Downloading: http://repository.jboss.com/maven2/com/jumbo/brandstore/brandstore/4.0.0/brandstore-4.0.0.pom
[artifact:mvn] Downloading: https://oss.sonatype.org/content/repositories/snapshots//com/jumbo/brandstore/brandstore/4.0.0/brandstore-4.0.0.pom
[artifact:mvn] Downloading: http://10.8.12.100/nexus/content/groups/public/com/jumbo/brandstore/brandstore/4.0.0/brandstore-4.0.0.pom
[artifact:mvn] 17K downloaded
[artifact:mvn] Downloading: http://search.maven.org/remotecontent?filepath=/com/jumbo/brandstore/brandstore-repository/4.0.0/brandstore-repository-4.0.0.jar
[artifact:mvn] Downloading: http://repository.jboss.com/maven2/com/jumbo/brandstore/brandstore-repository/4.0.0/brandstore-repository-4.0.0.jar
[artifact:mvn] Downloading: https://oss.sonatype.org/content/repositories/snapshots//com/jumbo/brandstore/brandstore-repository/4.0.0/brandstore-repository-4.0.0.jar
[artifact:mvn] Downloading: http://10.8.12.100/nexus/content/groups/public/com/jumbo/brandstore/brandstore-repository/4.0.0/brandstore-repository-4.0.0.jar
[artifact:mvn] 913K downloaded
Run Code Online (Sandbox Code Playgroud)
在我的setting.xml文件中,我已经在顶部设置了我的私人服务器(nexus)"http://10.8.12.100/nexus/content/groups/public"
和activeProfiles我在"maven-home"之前设置了"profile-baozun"
<profiles>
<profile>
<id>profile-baozun</id>
<repositories>
<repository>
<id>public</id>
<url>http://10.8.12.100/nexus/content/groups/public</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>loxia2</id>
<url>http://loxia2.googlecode.com/svn/repository</url>
<releases>
<enabled>true</enabled>
<checksumPolicy>warn</checksumPolicy>
</releases>
</repository>
</repositories>
</profile>
<profile>
<id>maven-home</id>
<repositories>
<repository>
<id>central</id>
<url>http://search.maven.org/remotecontent?filepath=</url>
</repository> …
Run Code Online (Sandbox Code Playgroud) 问题:在Nexus上禁用重新部署时,如何发布具有2个独占配置文件的maven项目?
示例(已编辑):我有一个maven项目MyArtifact,其中有两个配置文件pom.xml
(P1和P2),它们会生成2个不同的耳朵.每个配置文件配置maven-ear-plugin
包括不同的模块并自动生成application.xml
.生成的工件是MyArtifact-1.0-P1.ear
(2个战争模块)和MyArtifact-1.0-P2.ear
(3个战争模块).
问题1(重新部署到nexus):
mvn deploy -P P1
"一切顺利(战争和pom部署到Nexus)mvn deploy -P P2
"错误!Nexus抱怨重新部署pom.xml.问题2(maven-release-plugin):
当使用maven-release-plugin
to发布多个配置文件时,maven会做很多事情(签出和标记CSM,更新pom版本,转向标记,提交CSM等等).至少为每个配置文件执行重新发布/重新标记是不高效也不实际的.
我正在寻找一个"存储库"来存储派生信息(构建工件).我们有一个存储库(目前是Mercurial)来存储我们的源代码.当某些东西被推送到源存储库时,代码会通过一个持续集成服务器,我们会进行增量构建,因此会更改一些dll.这应该添加到一些"存储库",以便每个人都可以使用该版本,而无需再次进行构建.我正在寻找以下功能:
什么符合这些要求?
我想知道是否有一种标准方法来备份和恢复Nexus OSS 3 Artifact Repository.
是否足以备份"数据"目录并将其复制到正在运行的新实例?
我使用不同类型的存储库 - Maven,NPM,Docker等.
我想知道如何在GNU/Linux上安装Sonatype Nexus 2作为服务,以便正确配置并在启动时自动启动.
启动Sonatype Nexus 3映像(命令1)后,我尝试创建一个存储库并将一个测试映像(命令2)推送到该存储库,但出现错误405(错误1)
命令1
$ docker run -d -p 8081:8081 --name nexus sonatype/nexus3:3.14.0
Run Code Online (Sandbox Code Playgroud)
命令2
$ docker push 127.0.0.1:8081/repository/test2/image-test:0.1
Run Code Online (Sandbox Code Playgroud)
错误1
error parsing HTTP 405 response body: invalid character '<' looking for beginning of value: "\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n <title>405 - Nexus Repository Manager</title>\n <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\"/>\n\n\n <!--[if lt IE 9]>\n <script>(new Image).src=\"http://127.0.0.1:8081/favicon.ico?3.14.0-04\"</script>\n <![endif]-->\n <link rel=\"icon\" type=\"image/png\" href=\"http://127.0.0.1:8081/favicon-32x32.png?3.14.0-04\" sizes=\"32x32\">\n <link rel=\"mask-icon\" href=\"http://127.0.0.1:8081/safari-pinned-tab.svg?3.14.0-04\" color=\"#5bbad5\">\n <link rel=\"icon\" type=\"image/png\" href=\"http://127.0.0.1:8081/favicon-16x16.png?3.14.0-04\" sizes=\"16x16\">\n <link rel=\"shortcut icon\" href=\"http://127.0.0.1:8081/favicon.ico?3.14.0-04\">\n <meta name=\"msapplication-TileImage\" content=\"http://127.0.0.1:8081/mstile-144x144.png?3.14.0-04\">\n <meta name=\"msapplication-TileColor\" content=\"#00a300\">\n\n <link rel=\"stylesheet\" type=\"text/css\" href=\"http://127.0.0.1:8081/static/css/nexus-content.css?3.14.0-04\"/>\n</head>\n<body>\n<div …
Run Code Online (Sandbox Code Playgroud)