From c0dfb70ca0c7037cb2f817c762318c152df8e184 Mon Sep 17 00:00:00 2001 From: Rob Winch Date: Thu, 1 Nov 2012 11:22:41 -0500 Subject: [PATCH] Added generatePom task This can be used to generate the pom.xml for adding the Spring Security snapshot jars as a Maven Dependency to another project. For example, if mywebapp requires the Spring Security 3.1.4.CI-SNAPSHOT jars one could generate the pom.xml files and then use that to convert the project into a valid Maven project within the IDE. Then the SNAPSHOT dependendies could be added to mywebapp. This prevents the need to install the SNAPSHOT dependencies in the local Maven repository. --- gradle/maven-deployment.gradle | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/gradle/maven-deployment.gradle b/gradle/maven-deployment.gradle index b3a49525b4..2559f671df 100644 --- a/gradle/maven-deployment.gradle +++ b/gradle/maven-deployment.gradle @@ -94,4 +94,21 @@ def customizePom(pom, gradleProject) { } } } +} + +task generatePom { + group = 'Build' + description = 'Generates the Maven pom.xml' + + ext.generatedPomFileName = 'pom.xml' + + inputs.files('**/*.gradle') + outputs.files(generatedPomFileName) + + doLast() { + def p = pom {} + customizePom(p, project) + p.writeTo(generatedPomFileName) + } + } \ No newline at end of file