Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/231.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android gradle maven口味中缺少POM_Android_Maven 2_Android Gradle Plugin_Pom.xml - Fatal编程技术网

Android gradle maven口味中缺少POM

Android gradle maven口味中缺少POM,android,maven-2,android-gradle-plugin,pom.xml,Android,Maven 2,Android Gradle Plugin,Pom.xml,我正在为Android设计一个aar库,我面临一个问题。 自从我介绍了flavors之后,POM文件就不再上传了。 AAR文件仍然正确上载,但如果没有POM,则无法使用该库 以下是build.gradle文件的一部分: uploadArchives { repositories.mavenDeployer { snapshotRepository(url: nexus_mavenSnapshot) { authentication(userNam

我正在为Android设计一个aar库,我面临一个问题。 自从我介绍了flavors之后,POM文件就不再上传了。 AAR文件仍然正确上载,但如果没有POM,则无法使用该库

以下是build.gradle文件的一部分:

uploadArchives {
    repositories.mavenDeployer {

        snapshotRepository(url: nexus_mavenSnapshot) {
            authentication(userName: nexus_username
                    , password: nexus_password)
        }

        addFilter('legacyRelease') { artifact, file ->
            artifact.attributes.classifier.equals("legacyRelease")
        }
        addFilter('nbRelease') { artifact, file ->
            artifact.attributes.classifier.equals("nbRelease")
        }

        pom('nbRelease').artifactId = project.archivesBaseName + "-nb";
        pom('legacyRelease').artifactId = project.archivesBaseName + "-legacy";
    }
}
我发现唯一相关的文章是:

他们的答案是手动上传POM,我不想:)

有什么建议吗

编辑: 当我试图把POM拿回来时,我去掉了,但仍然没有POM。我需要删除的是,希望它能帮助某人:

publishNonDefault true

嘿,你能找到解决办法吗?