wagon-git and Gradle

This nice little tool promise help me upload artifacts up to a private Bitbucket repo.

http://synergian.github.io/wagon-git/bitbucket.html

I am having troubles using this guide in my Gradle build...

I've found this short and limited example, https://github.com/UniconLabs/ssl-utils/blob/master/build.gradle

Most unclear for me is this section about how to prepare the settings.xml inside my maven home. Am I supposed to use my .gradle folder instead since I work with Gradle?

Bitbucket Private Repositories

Proceed the same way, but add basic authentication in your Maven settings.xml (usually located at your $MAVEN_HOME directory, check out http://maven.apache.org/settings.html for a full guide).

<settings>
        ...
        <servers>
                <server>
                        <id>your-repo-id</id>
                        <username>yourbitbucketusername</username>
                        <password>yourbitbucketpassword</password>
                </server>
                ...
        </servers>
        ...
</settings>

Answers


Easiest thing to do is go to your ~/.gradle/gradle.properties file, and add the following two lines:

yourbitbucketusername = [bitbucket username]
yourbitbucketpassword  = [bitbucket password]

Then you can add the following in your build.gradle:

uploadArchives {
    repositories {
        mavenDeployer {
        repository(url: "repo url") {
        authentication(userName: yourbitbucketusername, 
                password: yourbitbucketpassword)
}

Need Your Help

How to disable resizing of the subview of NSSplitView in Interface Builder?

cocoa interface-builder nssplitview

I've created in Interface Builder a NSSplitView with two subviews. I want the left-side view to have fixed width. I've tried to define autosizing rules for both subviews but the left subview still

How to use container-managed security with SPNEGO and Kerberos?

java-ee kerberos spnego

I'm having a problem with my web app (JSF+JPA). I deploy it on Glassfish (3.1.1). For authentication I must use AD with Kerberos (LDAP auth is not allowed in my organization). I created an SPNEGO f...