[英]Gradle + Jenkins + Artifactory Maven Repo?
我有一個使用Jenkins構建的Java項目,使用Jenkins CI服務器,我想使用與Maven兼容的工件發布到Artifactory服務器。 該項目正在使用Git。 如果可能的話,我還想使用Jenkins的發布管理功能。
這非常令人困惑。 至少有五個插件,具有很多重疊的冗余功能。 一些插件似乎取代了其他插件。 有些插件似乎需要其他插件。
僅供參考,五個相關的插件似乎是:
1)Jenkins Artifactory插件https://wiki.jenkins-ci.org/display/JENKINS/Artifactory+Plugin
2)Gradle“maven”插件http://www.gradle.org/docs/current/userguide/maven_plugin.html
3)Gradle“maven-publish”插件http://www.gradle.org/docs/current/userguide/publishing_maven.html
4)Gradle“artifactory”插件https://www.jfrog.com/confluence/display/RTF/Gradle+Artifactory+Plugin
5)Gradle“artifactory-publish”插件http://www.jfrog.com/confluence/display/RTF/Gradle+1.6+Publishing+Artifactory+Plugin
設置它的最佳方法是什么?
如果我使用Jenkins Artifactory插件沒有提到任何其他插件,我收到一個錯誤:
No publish configurations specified for project ':' and the default 'archives' configuration does not exist.
Cannot publish pom for project ':my-great-app' since it does not contain the Maven plugin install task and task ':my-great-app:artifactoryPublish' does not specify a custom pom path.
我假設我需要在build.gradle中使用maven
或maven-publish
?
maven-publish
被標記為maven
插件的孵化后繼者。 它有多好? 它有多穩定?
如何使用Gradle Artifactory插件與標准maven發布插件相比使用Jenkins插件?
artifactory
插件與maven
插件一起使用並發布由maven
插件生成的configurations
。 artifactory-publish
插件可用於maven-publish
插件,並出版publications
所產生maven-publish
插件。 artifactory
或artifactory-publish
插件中指定的設置。 artifactory
插件添加並配置到Gradle腳本。 那么,這就是你需要決定的:
maven
或maven-publish
。 雖然后者仍在“孵化”,但它比前者靈活得多。 一旦您知道要使用哪個maven插件,請選擇適當的artifactory插件。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.