On 28/08/2011, at 9:50 AM, Etienne Studer wrote:

> How can I adjust the order in which the dependencies are listed in a pom
> file generated by gradle as aprt of the upload task? For example, I would
> like to first list all compile-time dependencies, then all runtime
> dependencies, etc.

You need to have your uploadArchives task look something like this:

def deployer = null
uploadArchives {
    repositories {
        deployer = mavenDeployer {

        }
    }
}

The important bit is capturing the return from the mavenDeployer(Closure) 
method.

Then after you can do this:

[install.repositories.mavenInstaller, deployer]*.pom*.whenConfigured { pom ->
        def scopeOrder = [compile: 1, runtime: 2, test: 3].withDefault { 100 }
        pom.dependencies = pom.dependencies.sort { scopeOrder[it.scope] }
}

-- 
Luke Daley
Principal Engineer, Gradleware 
http://gradleware.com


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to