2

我需要添加附录来发布工件。对于构建任务,这很容易。但是当我尝试通过 maven-publish 插件发布工件时它不起作用。未添加附录。

plugins {
    id 'maven-publish'
    id 'org.springframework.boot' version '1.5.19.RELEASE'
    id 'org.asciidoctor.convert' version '1.5.3'
}

def env = 'something'

jar {
    enabled = true
    appendix env
}

sourceJar {
    appendix env
}


apiDocZip {
    appendix env
}

结果我得到以下工件:

artifact-something-0.0.0.jar
artifact-something-0.0.0-sources.jar
artifact-something-0.0.0-apidoc.zip

但是当我使用任务 publishToMavenLocal 时,我得到了关注:

artifact-0.0.0.jar
artifact-0.0.0.pom
artifact-0.0.0-sources.jar
artifact-0.0.0-apidoc.zip

你怎么能看到附录没有添加。是否有任何解决方案可以添加附录以发布工件?

4

0 回答 0