[英]Gradle only downloads pom from mavenCentral - Android
I have successfully deployed an AAR artifact to mavenCentral using Sonatype's OSS Nexus but when i reference it on another project gradle is only downloading the pom and it's respective ASC file to ~/.gradle/cache. 我已经使用Sonatype的OSS Nexus成功地将AAR工件部署到了mavenCentral,但是当我在另一个项目gradle上引用它时,仅将pom及其相应的ASC文件下载到〜/ .gradle / cache。
This is my build.gradle http://pastie.org/private/zaxa13hsd52e4elfpnne4w This is the build.gradle for the library https://github.com/Machinarius/PreferenceFragment-Compat/blob/master/build.gradle 这是我的build.gradle http://pastie.org/private/zaxa13hsd52e4elfpnne4w这是图书馆的build.gradle https://github.com/Machinarius/PreferenceFragment-Compat/blob/master/build.gradle
Can anyone point me in the right direction? 谁能指出我正确的方向?
The aar.asc
packaging is coming from this section in your gradle configuration: aar.asc
包装来自您的gradle配置中的此部分:
configurations {
archives {
extendsFrom configurations.default
}
}
Remove those lines from your build.gradle file and deploy again. 从build.gradle文件中删除这些行,然后再次部署。 You should see the packaging be
aar
now. 您应该看到包装是
aar
现在。
The value for the POM's packaging
element ( aar.asc
) looks wrong. POM的
packaging
元素( aar.asc
)的值看起来错误。 You should nevertheless be able to fetch the artifact with something like dependencies { compile 'com.github.machinarius:preferencefragment:0.1@aar' }
. 尽管如此,您仍应该能够使用
dependencies { compile 'com.github.machinarius:preferencefragment:0.1@aar' }
来获取工件。 With this "artifact only" notation, you won't get transitive dependencies, but you can always declare those yourself. 使用这种“仅工件”表示法,您将不会获得传递依赖,但是您始终可以自己声明这些依赖。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.