All Downloads are FREE. Search and download functionalities are using the official Maven repository.

META-INF.archetype-post-generate.groovy Maven / Gradle / Ivy

There is a newer version: 5.0.0
Show newest version
dir = new File(new File(request.outputDirectory), request.artifactId)
idea = new File(dir, ".idea")

def run(String cmd) {
    def process = cmd.execute([], dir)
    process.waitForProcessOutput((Appendable)System.out, System.err)
    if (process.exitValue() != 0) {
        throw new Exception("Command '$cmd' exited with code: ${process.exitValue()}")
    }
}

def writeCodeStyle() {
    def sb = new StringBuilder()
    sb.append('\n')
    new URL(request.properties["intellijCodeStyleUrl"]).eachLine {
        sb.append("  " + it + "\n")
    }
    sb.append("")
    xml = sb.toString()
    xml = xml.replaceFirst('\n')
    def url = request.properties["intellijInspectionProfileUrl"]
    new URL(url).eachLine {
        sb.append("  " + it + "\n")
    }
    sb.append("")
    xml = sb.toString()
    def m = (~/




© 2015 - 2024 Weber Informatics LLC | Privacy Policy