I found some time to test this according to instructions found here.
http://www.sonatype.com/people/2010/01/how-to-generate-pgp-signatures-with-maven/

At the end of this post you will find working instructions to generate
a complete POM. It works fine, but I am having problems to execute the
gpg plugin. According to the link, this is what would be needed:

        // pgp
        def pgpPlugin = new org.apache.maven.model.Plugin(
                groupId: 'org.apache.maven.plugins',
                artifactId: 'maven-gpg-plugin'
        )
        def pluginExecution = new
org.apache.maven.model.PluginExecution(id: 'sign-artifacts', phase:
'verify')
        pluginExecution.addGoal 'sign'
        pgpPlugin.addExecution pluginExecution
        mp.addPlugin pgpPlugin

Obviously this doesn't work, since maven is not executing any
configured plugins (and I don't think it should). That means that I
need a way to configure and execute a maven plugin in gradle, and
could find no documented way of doing so. Any help?

-- Nacho.

===

* gradle.properties:

description=Blah, blah blah...
projectUrl=http://code.google.com/p/simpleds/
nexusSnapshotUploadUrl=http://oss.sonatype.org/nexus/content/repositories/snapshots
nexusReleaseUploadUrl=http://oss.sonatype.org/nexus/content/repositories/releases
scmBrowseUrl=http://code.google.com/p/simpleds/source/browse/
scmUrl=scm:svn:http://simpleds.googlecode.com/svn/trunk/
nexusUsername=<your username>

* ~/.gradle/gradle.properties

nexusPassword=<your password>

* build.gradle:

repositories.mavenDeployer {
                // pom elements
                pom.name = project.name
                pom.description = project.description
                pom.url = project.projectUrl
                def mp = pom.mavenProject
                mp.addLicense new org.apache.maven.model.License(
                        name: 'The Apache Software License, Version 2.0',
                        url: 'http://www.apache.org/licenses/LICENSE-2.0.txt'
                )
                mp.scm = new org.apache.maven.model.Scm( url: scmBrowseUrl,
connection: scmUrl )
                mp.addDeveloper new org.apache.maven.model.Developer(
                        id:'icoloma',
                        name: 'Ignacio Coloma',
                        email: '[email protected]'
                )
        
        // deploy
        configuration = configurations.deployerJars
        credentials = [userName: project.nexusUsername, password:
project.nexusPassword]
        uniqueVersion = false
        snapshotRepository(url: project.nexusSnapshotUploadUrl) {
                authentication(credentials)
        }
        repository(url: project.nexusReleaseUploadUrl) {
                authentication(credentials)
        }
}

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

    http://xircles.codehaus.org/manage_email


Reply via email to