Dependency on a project with multiple publications


(steve) #1

Essentially trying to do what https://github.com/gradle/gradle/blob/master/subprojects/docs/src/samples/maven-publish/multiple-publications/build.gradle does (thanks Peter!).

This is part of a multi-project build. One project (hibernate-core) defines 2 publishing, Another project (hibernate-c3p0) defines just one publishing, and has a dependency on hibernate-core. I end up getting an error from Gradle in regards to hibernate-c3p0:

A problem occurred configuring project ‘:hibernate-c3p0’. > Publishing is not yet able to resolve a dependency on a project with multiple different publications.

In terms of the docs sample, I have the reverse relationship. The doc sample has project2 depend on project1 where project1 only defines the one publishing.

How can I get this working? Or is this a limitation in publishing?


(Peter Niederwieser) #2

I’m afraid you are hitting a known limitation of the incubating ‘maven-publish’ plugin. I expect this limitation to go away before the plugin gets promoted.


Publishing Maven relocations via Gradle
(steve) #3

Any Jira I can watch?


(Peter Niederwieser) #4

Couldn’t find one. Filed GRADLE-2966.


(Niklaus Bucher) #5

Hello Devs,

the errormessage implies, that the “maven-publish” plugin would be able to resolve project’s with multiple different publications in future. When will this be supported?

Regards, Nik