I have a hierarchical gradle 2.4 project like this:
Root
|- subProject1
|- subProject2
|- subProject3
For each sub project, I want to publish a .jar file and a .pom file and store them in a maven repository. All regular compile('com.example:awesome-lib')
commands are properly exported in the *.pom files.
Let's assume that subProject2
has a compile project(':subProject1')
dependency in it. This dependency will not be contained in the generated *.pom file.
My gradle publishing structure looks like this:
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
groupId project.group
artifactId jar.baseName
version project.version
}
}
}
... am I doing something wrong? Why will my compile project
dependencies not be exported in the *.pom files? Are there any workarounds? For clarification, what I expect as outcome in the example above is that the subProject2.pom declares a dependency to subProject1.jar.