apply plugin: ‘maven‘group = ‘com.company.root‘// artifactId is taken by default, from folder nameversion = ‘0.0.1-SNAPSHOT‘task writeNewPom << {pom {project {inceptionYear ‘2014‘licenses {license {name ‘The Apache Software License, Version 2.0‘url ‘http://www.apache.org/licenses/LICENSE-2.0.txt‘distribution ‘repo‘}}}}.writeTo("pom.xml")}
gradle writeNewPom

根据build.gradle 生成maven pox.xml
原文:http://www.cnblogs.com/java-sky/p/7200150.html