[GRADLE-1135] Gradle generates the wrong artifactId in the pom.xml for project dependencies in multi project builds Created: 26/Aug/10  Updated: 04/Jan/13  Resolved: 23/Jul/12

Status: Resolved
Project: Gradle
Affects Version/s: 0.9.1
Fix Version/s: 1.1-rc-1

Type: Bug
Reporter: Graeme Rocher Assignee: Unassigned
Resolution: Fixed Votes: 4

Attachments: Zip Archive gradle-pom-bug.zip    


See the attached example. If you have multi-project build with inter project dependencies such as:

dependencies {
	compile project(":core")

The dependencies in the POM don't take into account the archiveBaseName resulting in an invalid POM definition:


Comment by Brian Saville [ 07/May/12 ]

Just ran into this same exact problem. Is there a known workaround for how to customize the POM file dependencies besides placing them in different configurations or something?

Comment by Brian Saville [ 07/May/12 ]

Found a workaround here under Example 45.7. Modifying auto-generated content:

[installer, deployer]*.pom*.whenConfigured {pom ->
    pom.dependencies.find {dep -> dep.groupId == 'group3' && dep.artifactId == 'runtime' }.optional = true

I had to modify this to use the mavenDeployer:

Comment by Jonathan Imperial [ 22/Jun/12 ]

The only way I've been able to work around this is to change the subproject names via the settings.gradle file.

Generated at Wed Jun 30 11:47:49 CDT 2021 using Jira 8.4.2#804003-sha1:d21414fc212e3af190e92c2d2ac41299b89402cf.