I’m adding dependencies to my gradle project, where inside the pom.xml of those dependencies there are artifactIds which are parameterized.
For example the referenced pom contains the following section:
This is a valid pom.xml, as far as I know and it works with maven.
But gradle does not resolve the parameters and tries to resolve a dependency with the literal artifactId, which of course does not work.
Does anyone have any ideas how I can work around this problem?
I guess in the long run, gradle should work with parameterized artifactIds correcly.
Would you mind providing your full pom.xml so I can reproduce the issue? Generally speaking, Gradle is supposed to handle property replacements as close as possible to a Maven implementation. You might still run into some feature parity here and there.
I can’t give you the pom files and you would not be able to reproduce it anyways, since a lot of the dependecies and in particular the ones causing the problems are private and only reside in our on-site Nexus Repository.
I will try to create a toy project to reproduce the problem.
The properties project.parent.groupId and project.parent.version are resolved properly. The property project.parent.artifactId is not resolved properly - the literal is used.
I raised the issue GRADLE-3299. The fix should be pretty straight forward. Would you be interested in contributing the fix?