import org.apache.maven.settings.Settings

apply plugin: 'java'
// START SNIPPET use-plugin
apply plugin: 'maven'
// END SNIPPET use-plugin

group = 'gradle'
version = '1.0'

// Configure the repository

uploadArchives {
    repositories {
        mavenDeployer {
            repository(url: "file://localhost/$projectDir/pomRepo/")
        }
    }
}

// For our integration tests

install.doLast {
    Settings settings = repositories.mavenInstaller.settings
    new File(buildDir, "localRepoPath.txt").write(settings.localRepository)
}

clean {
    delete 'pomRepo'
}
