diff --git a/build.gradle b/build.gradle index 06966d9..6c571e6 100644 --- a/build.gradle +++ b/build.gradle @@ -112,6 +112,28 @@ publishing { url = 'https://github.com/graceframework/grace-geb' } } + + pom.withXml { + def pomNode = asNode() + try { + pomNode.dependencyManagement.replaceNode {} + } catch (Throwable e) { + // ignore + } + + // simply remove dependencies without a version + // version-less dependencies are handled with dependencyManagement + // see https://github.com/spring-gradle-plugins/dependency-management-plugin/issues/8 for more complete solutions + pomNode.dependencies.dependency.findAll { + it.version.text().isEmpty() + }.each { + try { + it.replaceNode {} + } catch (Throwable e) { + // ignore + } + } + } } } }