我在CloudBees上遇到了构建问题,我希望有人能够就解决问题提出一些建议。
我有两个项目:
我已经配置了Jenkins作业来构建“common”,以便部署到我的私有版本库,我可以看到它做了同样的事情:
...
Deploying the main artifact models-0.0.1-SNAPSHOT.jar
Downloading: dav:https://repository-myDomain.forge.cloudbees.com/release/com/myDomain/models/0.0.1-SNAPSHOT/maven-metadata.xml
Uploading: https://repository-myDomain.forge.cloudbees.com/release/com/myDomain/models/0.0.1-SNAPSHOT/models-0.0.1-20140329.091117-1.jar
Uploaded: https://repository-myDomain.forge.cloudbees.com/release/com/myDomain/models/0.0.1-SNAPSHOT/models-0.0.1-20140329.091117-1.jar (12 KB at 246.0 KB/sec)
Uploading: https://repository-myDomain.forge.cloudbees.com/release/com/myDomain/models/0.0.1-SNAPSHOT/models-0.0.1-20140329.091117-1.pom
Uploaded: https://repository-myDomain.forge.cloudbees.com/release/com/myDomain/models/0.0.1-SNAPSHOT/models-0.0.1-20140329.091117-1.pom (428 B at 11.3 KB/sec)
Downloading: https://repository-myDomain.forge.cloudbees.com/release/com/myDomain/models/maven-metadata.xml
Uploading: https://repository-myDomain.forge.cloudbees.com/release/com/myDomain/models/0.0.1-SNAPSHOT/maven-metadata.xml
Uploaded: https://repository-myDomain.forge.cloudbees.com/release/com/myDomain/models/0.0.1-SNAPSHOT/maven-metadata.xml (772 B at 19.8 KB/sec)
Uploading: https://repository-myDomain.forge.cloudbees.com/release/com/myDomain/models/maven-metadata.xml
Uploaded: https://repository-myDomain.forge.cloudbees.com/release/com/myDomain/models/maven-metadata.xml (282 B at 8.1 KB/sec)
...
我已经配置了Play应用程序的build.sbt文件,其中包含从此存储库中读取的详细信息和凭据:
...
credentials += Credentials("CloudBees private Maven repos", "repository-myDomain.forge.cloudbees.com", "username", "password")
resolvers ++= Seq(
"Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/",
"CloudBees private snapshot repo" at "https://repository-myDomain.forge.cloudbees.com/snapshot/",
"CloudBees private release repo" at "https://repository-myDomain.forge.cloudbees.com/release/"
)
...
但是,当我为我的“服务”项目运行构建作业时,无法找到依赖项:
...
[warn] module not found: com.myDomain#models;0.0.1-SNAPSHOT
[warn] ==== local: tried
[warn] /home/jenkins/.ivy2/local/com.myDomain/models/0.0.1-SNAPSHOT/ivys/ivy.xml
[warn] ==== public: tried
[warn] http://repo1.maven.org/maven2/com/myDomain/models/0.0.1-SNAPSHOT/models-0.0.1-SNAPSHOT.pom
[warn] ==== Typesafe Releases Repository: tried
[warn] http://repo.typesafe.com/typesafe/releases/com/myDomain/models/0.0.1-SNAPSHOT/models-0.0.1-SNAPSHOT.pom
[warn] ==== Typesafe repository: tried
[warn] http://repo.typesafe.com/typesafe/releases/com/myDomain/models/0.0.1-SNAPSHOT/models-0.0.1-SNAPSHOT.pom
[warn] ==== CloudBees private snapshot repo: tried
[warn] https://repository-myDomain.forge.cloudbees.com/snapshot/com/myDomain/models/0.0.1-SNAPSHOT/models-0.0.1-SNAPSHOT.pom
[warn] ==== CloudBees private release repo: tried
[warn] https://repository-myDomain.forge.cloudbees.com/release/com/myDomain/models/0.0.1-SNAPSHOT/models-0.0.1-SNAPSHOT.pom
...
我已经安装了我的CloudBees WebDAV快照和发布回购,我可以在那里看到我的“常用”模块...虽然后缀有时间戳或构建信息。
任何人都可以发现我忽略的东西吗?或者我对这种设置的理解是不准确的?任何帮助将不胜感激!
答案 0 :(得分:0)
Credentials构造函数的第一部分应该是服务器在基本身份验证中发送的域。您还可以将凭据提供为explained here。
在我的情况下,真实是clipnow repository
,我必须将以下行添加到build.sbt
(Play Framework 2.3)
credentials += Credentials("clipnow repository", "repository-clipnow.forge.cloudbees.com", "USERNAME", "PASSWORD")
resolvers += "clipnow repository" at "https://repository-clipnow.forge.cloudbees.com/snapshot/"