dcendents / android-maven-gradle-plugin

Abandoned. This is now supported by the android build plugin: https://developer.android.com/studio/build/maven-publish-plugin
Apache License 2.0
1.09k stars 136 forks source link

Error build not generating pom file #17

Closed doneill closed 9 years ago

doneill commented 9 years ago

I have used this plugin successfully in one of my aar projects to publish to an internal artifactory repository. I am trying to apply the same logic to another build project but am getting the following error on artifactoryPublish:

A problem was found with the configuration of task ':artifactoryPublish'.
> File '/Users/dev/output/api/build/poms/pom-default.xml' specified for property 'mavenDescriptor' does not exist.

Here is my android-maven-plugin usage:

    dependencies {
        classpath 'com.github.dcendents:android-maven-plugin:1.2'
    }

apply plugin: 'com.android.library'
apply plugin: 'artifactory'
apply plugin: 'android-maven'

//defined in settings file
group = GROUP 
version = VERSION_NAME
doneill commented 9 years ago

I am past the pom generation issue, it seems it was related to lib-module naming in the project. I was renaming the output aar in the build script but the pom generation expected the project name to be correct.

dcendents commented 9 years ago

Sorry I couldn't help you in time, thanks for letting us know what the problem was.

badoualy commented 8 years ago

How did you fix this finally? Because I have the same issue, the weird part is that someone else can publish the library on another computer with the same configuration... any clue?

version, group, url, password etc are specified in the same file

apply plugin: 'com.jfrog.artifactory-upload'
apply plugin: 'com.github.dcendents.android-maven'

configurations {
    published
}

task sourceJar(type: Jar) {
    from "${android.sourceSets.main.java}"
    classifier "sources"
}

artifactoryPublish {
    dependsOn sourceJar
}

artifacts {
    published sourceJar
}

configure(install.repositories.mavenInstaller) {
    pom.project {
        licenses {
            license {
                name 'The Apache Software License, Version 2.0'
                url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
                distribution 'repo'
            }
        }
    }
}

artifactory {
    contextUrl = artifactoryURL
    publish {
        repository {
            repoKey = artifactoryRepository
            username = artifactoryUser
            password = artifactoryPassword
        }
        defaults {
            publishConfigs('archives', 'published')
            publishArtifacts = true
            publishPom = true
            publishIvy = false
        }
    }
    resolve {
        repository {
            repoKey = artifactoryRepository
            username = artifactoryUser
            password = artifactoryPassword

        }
    }
}
dcendents commented 8 years ago

Just an idea, but are you using gradle wrapper or at least the same gradle version? Because if it does not work for you but works for someone else, I'd look at the version of gradle you are using.

Obviously, using the gradle wrapper will make sure you are both using the exact same version.

badoualy commented 8 years ago

Yes, we were using the same gradle version, but I managed to publish in console, the issue is just when using AndroidStudio to execute the task