当使用gradle发布时,ivy module.xml不包含所有工件 [英] ivy module.xml doesn't contain all artifacts when gradle publish is used
问题描述
我相信这可能与发布工件覆盖Gradle中的其他工件 如果我有一组出版物,比如 '发布' 文件只包含出版物列表中的第一项 如果我将所有工件都归入单个出版物,即。 serverpub然后ivy.xml文件将包含所有正确的工件,但jar文件本身都是相同的,因此我有与上一个链接相同的错误。 我是做错了,因为到目前为止,Gradle已经证明了在发布工件的圆括号中的痛苦。 你已经声明了四个独立的出版物,每一个都会产生自己的模块描述符。要生成包含多个工件的常青藤模块,您必须在同一出版物中列出它们。关于Jar文件是相同的问题,一个最小的自包含可重现的例子将有所帮助。 请注意,新的 I believe this may be related to publish artifact overwrite other artifact in Gradle if I have a set of publications such as After doing a 'publish' the file only contains the first item in the list of publications If I make all of the artifacts fall under a single publication ie. serverpub then the ivy.xml file will contain all of the correct artifacts but the jar files themselves are all identical thus I have the same error as the previous link. Am I doing something wrong because so far Gradle has proved a pain in the parenthesis for publishing artifacts. You have declared four independent publications, each of which will produce its own module descriptor. To produce an Ivy module containing multiple artifacts, you'll have to list them under the same publication. Regarding the "Jar files are identical" problem, a minimal self-contained reproducible example would help. Note that the new 这篇关于当使用gradle发布时,ivy module.xml不包含所有工件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
发布{
publications {
serverpub(IvyPublication){
artifact(ejbJar){
name'ejb'
}
}
clientpub (IvyPublication){
artifact(clientEjbJar){
name'client-ejb'
}
}
modulepub(IvyPublication){
artifact(moduleJar) {
name'cname-core'
}
}
persistpub(IvyPublication){
artifact(persistenceJar){
name'core-entities'
< Project Name> / ivy /< version> / ivy / ivy-& lt; version> .xml
< artifact name =ejbtype =jarext =jar/>
ivy-publish <您正在使用的code>插件仍在孵化,可能有缺点。我们非常感谢反馈,让它更好。到达Gradle开发人员和专家的最佳位置是 http://forums.gradle.org 。
publishing {
publications {
serverpub(IvyPublication) {
artifact(ejbJar) {
name 'ejb'
}
}
clientpub(IvyPublication) {
artifact(clientEjbJar) {
name 'client-ejb'
}
}
modulepub(IvyPublication) {
artifact(moduleJar) {
name 'cname-core'
}
}
persistpub(IvyPublication) {
artifact(persistenceJar) {
name 'core-entities'
}
}
}
}
<Project Name>/ivy/<version>/ivy/ivy-<version>.xml
<artifact name="ejb" type="jar" ext="jar"/>
ivy-publish
plugin that you are using is still incubating and may have shortcomings. We are grateful for feedback to make it better. The best place to reach Gradle developers and experts is http://forums.gradle.org.