Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No such property: sonatypeUserName for class: org.gradle.api.publication.maven.internal.ant.DefaultGroovyMavenDeployer

I'm trying to use this blibioteca android-maps-extensions because I need to fix more than 1000 markers on my map .

Added the project dependencies in my project :

compile project (':android-maps-extensions')

But when I update build.gradle get the following error :

No such property : for class sonatypeUserName : org.gradle.api.publication.maven.internal.ant.DefaultGroovyMavenDeployer

The username and password appear to be incorrect or something , this code is part of the project I'm build.gradle matter how library:

...

pom.project {
    name 'Android Maps Extensions'
    description 'Library extending capabilities of Google Maps Android API v2'
    inceptionYear '2013'
    url 'http://AndroidMapsExtensions.com'
    packaging 'aar'

    developers {
        developer {
            name 'Maciej Górski'
            id 'mg6maciej'
            email '[email protected]'
            url 'http://mg6.pl'
        }
    }

    licenses {
        license {
            name 'The Apache Software License, Version 2.0'
            url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
            distribution 'repo'
       }
    }

    scm {
        url 'https://github.com/mg6maciej/android-maps-extensions'
        connection 'scm:git:https://github.com/mg6maciej/android-maps-extensions.git'
        developerConnection 'scm:git:https://github.com/mg6maciej/android-maps-extensions.git'
        }
    }

...

Any suggestions ?

like image 681
jucajl Avatar asked Mar 28 '14 13:03

jucajl


4 Answers

Open the gradle.properties file inside the projects android-maps-utils-master that you may have downloaded from GitHub

You will find

version=0.4-SNAPSHOT

# variables required to allow build.gradle to parse,
# override in ~/.gradle/gradle.properties
signing.keyId=
signing.password=
signing.secretKeyRingFile=

sonatypeUsername=
sonatypePassword=

inside it, just copy and put it in your projects gradle.properties.

like image 121
DeltaCap019 Avatar answered Nov 08 '22 22:11

DeltaCap019


modify your gradle.properties file:

#To fix compile error. 
sonatypeRepo=null  
sonatypeUsername=null  
sonatypePassword=null 
like image 9
HelloWorld Avatar answered Nov 08 '22 20:11

HelloWorld


When using gradle, you don't normally copy the project into your own, but instead just add dependency like this:

dependencies {
    // your other dependencies
    compile 'com.androidmapsextensions:android-maps-extensions:2.1.+';
    compile 'com.google.android.gms:play-services:4.1.+'
}

To see the latest versions of libraries, you may use Gradle, please.

But if you want to use the project directly, you also need to have gradle.properties with variables defined:

sonatypeUserName=
sonatypePassword=
like image 1
MaciejGórski Avatar answered Nov 08 '22 21:11

MaciejGórski


I believe This line shows error:

authentication(userName: ossrhUsername, password: ossrhPassword)

Replace it with:

authentication(userName: hasProperty('ossrhUsername')?ossrhUsername:'', password: hasProperty('ossrhPassword')?ossrhPassword:'')

like image 1
Guru Surend Avatar answered Nov 08 '22 22:11

Guru Surend