浏览代码

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.
Rob Winch 12 年之前
父节点
当前提交
c0dfb70ca0
共有 1 个文件被更改,包括 17 次插入0 次删除
  1. 17 0
      gradle/maven-deployment.gradle

+ 17 - 0
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)
+    }
+
 }