I'm attempting to include a generated pom.xml in the jar that I'm creating with gradle.
So far, in my parent project, I have
subprojects { apply plugin: 'maven-publish' publishing { publications { maven(MavenPublication) { from(components.java) } } } } and in the sub-project I have:
tasks.build.dependsOn install sourceSets { main { resources { srcDirs = [ "src/main/resources", "build/poms" ] } } } This will generate ./build/poms/pom-default.xml, but it will not add it to the JAR.
Creating a dependency on an earlier phase than build creates circular dependencies (and I don't know whether this is the problem anyway).
Also, I'd like the pom.xml to show up inside META-INF with name pom.xml (not pom-default.xml), so this may not be the right approach anyway.
Somehow I'm thinking it can't be as complicated as this looks?
dependencies { compile project(':moduleA') }to the build.gradle file for module-B