运行 grails publish-plugin
似乎没有做任何事情,我能找到的唯一文档是关于发布到 bintray。
[编辑:]
我可以通过 gradle publish
发布插件,但想知道是否有一种 grails-y 方法可以做到这一点,不知道是什么 grails publish-plugin
实际上是:/
最佳答案
我在 Ryan Vanderwerf 的帮助下弄明白了在 http://rvanderwerf.blogspot.com/2015/07/how-to-publish-grails-3-plugin.html谁写道有一堆 spring-boot 依赖项中没有版本,这导致 gradle 吓坏了。要解决此问题,请删除 pom 中没有版本的所有依赖项:
publishing {
publications {
mavenJar(MavenPublication) {
pom.withXml {
def pomNode = asNode()
pomNode.dependencyManagement.replaceNode {}
// simply remove dependencies without a version
// version-less dependencies are handled with dependencyManagement
// see https://github.com/spring-gradle-plugins/dependency-management-plugin/issues/8 for more complete solutions
pomNode.dependencies.dependency.findAll {
it.version.text().isEmpty()
}.each {
it.replaceNode {}
}
}
from components.java
}
}
repositories {
maven {
credentials {
username "username"
password "password"
}
url "http://localhost/repo"
}
}
}
那么你可以使用
grails publish-plugin
或 gradle publish
发布你的插件相关的 SO 问题:Grails 3 - How to publish to Artifactory
关于grails - 如何将 grails 3 插件发布到我的本地 nexus 存储库?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34756023/