Skip to content

Instantly share code, notes, and snippets.

@Arafullahi
Forked from jmruc/README.md
Created August 17, 2019 07:12
Show Gist options
  • Select an option

  • Save Arafullahi/fe82c6e56af9df80b40b05aedd16c9c7 to your computer and use it in GitHub Desktop.

Select an option

Save Arafullahi/fe82c6e56af9df80b40b05aedd16c9c7 to your computer and use it in GitHub Desktop.

Revisions

  1. Kiril Raychev created this gist Jun 24, 2013.
    3 changes: 3 additions & 0 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,3 @@
    To generate a pom.xml file just run `gradle writeNewPom`

    If you want to generate it as pom.xml in the root of the project, replace `writeTo("$buildDir/newpom.xml")` with `writeTo("pom.xml")`
    32 changes: 32 additions & 0 deletions build.gradle
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,32 @@
    apply plugin: 'maven'
    apply plugin: 'java'

    sourceCompatibility = 7
    targetCompatibility = 7

    dependencies {
    compile 'com.google.guava:guava:13.0.1'
    compile 'joda-time:joda-time:2.1'

    testCompile 'junit:junit:4.11'
    testCompile 'org.mockito:mockito-core:1.9.5'
    }

    task writeNewPom << {
    pom {
    project {
    groupId 'org.example'
    artifactId 'test'
    version '1.0.0'

    inceptionYear '2008'
    licenses {
    license {
    name 'The Apache Software License, Version 2.0'
    url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
    distribution 'repo'
    }
    }
    }
    }.writeTo("$buildDir/newpom.xml")
    }