I have a multi-project configuration that’s correctly publishing all modules to an ivy repository, including (in one module) a jar file that belongs to a non compile configuration. However, the generated ivy.xml only includes dependencies for the compile configuration. I expect to see dependencies listed for the extra configuration.I’m sure I’m missing something obvious, but can’t find anything about this in the current docs.
From main build.gradle
----
publishing {
publications {
ivyJava(IvyPublication) {
from components.java
configurations {
testCompile {
extend "compile"
}
integrationTestCompile {
extend "testCompile"
}
testArtifacts {
extend "integrationTestCompile"
}
}
}
}
repositories {
ivy {
url "${System.properties['user.home']}/.ivy2/local"
layout "pattern", {
artifact "[organisation]/[revision]/[module]/[type]s/[artifact]-[revision](-[classifier]).[ext]"
ivy "[organisation]/[revision]/[module]/ivy.xml"
}
}
}
}
----
From subproject build.gradle
----
configurations {
testArtifacts.extendsFrom integrationTestCompile
}
task testJar(type: Jar) {
classifier "test"
from sourceSets.integrationTest.output
}
artifacts {
testArtifacts testJar
}
publishing {
publications {
ivyJava(IvyPublication) {
artifact(testJar) {
type "jar"
classifier "test"
conf "testArtifacts"
}
}
}
}
dependencies {
compile "org.springframework.data:spring-data-rest-webmvc"
compile "org.springframework.boot:spring-boot-starter-data-jpa"
compile "org.springframework.security:spring-security-core"
compile "com.graphql-java:graphql-spring-boot-starter:3.10.0"
compile "com.graphql-java:graphql-java-tools:4.3.0"
compile "org.flywaydb:flyway-core:${flywayVersion}"
testCompile project(":hub-test-tools")
testCompile "org.junit.jupiter:junit-jupiter-api:${junitVersion}"
testCompile "org.junit.platform:junit-platform-launcher:${junitPlatformVersion}"
testCompile "org.junit.platform:junit-platform-runner:${junitPlatformVersion}"
integrationTestCompile project(":hub-test-tools")
integrationTestCompile "org.springframework.boot:spring-boot-starter-test"
integrationTestCompile "org.springframework.security:spring-security-test"
integrationTestCompile "com.github.sbrannen:spring-test-junit5:${jitPackVersion}"
integrationTestCompile "org.springframework.ws:spring-ws-test"
integrationTestCompile "org.awaitility:awaitility:${awaitilityVersion}"
integrationTestCompile "org.apiguardian:apiguardian-api:${apiGuardianVersion}"
}
----
Generated subproject ivy.xml (the only dependencies generated are for compile->default)
----
<?xml version="1.0" encoding="UTF-8"?>
<ivy-module version="2.0" xmlns:m="http://ant.apache.org/ivy/maven">
<info organisation="e2x-ihub" module="hub-model" revision="1.0.0" status="integration" publication="20180529152136"/>
<configurations>
<conf name="compile" visibility="public"/>
<conf name="default" visibility="public" extends="compile,runtime"/>
<conf name="integrationTestCompile" visibility="public" extends="testCompile"/>
<conf name="runtime" visibility="public"/>
<conf name="testArtifacts" visibility="public" extends="integrationTestCompile"/>
<conf name="testCompile" visibility="public" extends="compile"/>
</configurations>
<publications>
<artifact name="hub-model" type="jar" ext="jar" conf="compile"/>
<artifact name="hub-model" type="jar" ext="jar" conf="testArtifacts" m:classifier="test"/>
</publications>
<dependencies>
<dependency org="org.apache.commons" name="commons-lang3" rev="3.5" conf="compile->default"/>
<dependency org="org.springframework.data" name="spring-data-rest-webmvc" rev="" conf="compile->default"/>
<dependency org="org.springframework.boot" name="spring-boot-starter-data-jpa" rev="" conf="compile->default"/>
<dependency org="org.springframework.security" name="spring-security-core" rev="" conf="compile->default"/>
<dependency org="com.graphql-java" name="graphql-spring-boot-starter" rev="3.10.0" conf="compile->default"/>
<dependency org="com.graphql-java" name="graphql-java-tools" rev="4.3.0" conf="compile->default"/>
<dependency org="org.flywaydb" name="flyway-core" rev="4.1.2" conf="compile->default"/>
</dependencies>
</ivy-module>
----