Skipping upload for missing aar and pom file

Skipping upload for missing aar and pom file



I'm building an aar Library for Android and im facing an issue. POM and ARR files are not uploaded.


aar



There is a error



Skipping upload for missing file 'F:AndroidPersonal_ProjectsampleMavenLibsinalibbuildoutputsaarsinalib-release.aar'.
Skipping upload for missing file 'F:AndroidPersonal_ProjectsampleMavenLibsinalibbuildpublicationsProductionpom-default.xml'.



I checked these two path and the aar file was there and its generated but there isnt any path for pom file



this is my gradle


apply plugin: 'com.android.library'
apply plugin: 'com.jfrog.bintray'
apply plugin: 'maven-publish'

android
compileSdkVersion 28

defaultConfig
minSdkVersion 17
targetSdkVersion 28
versionCode 1
versionName "1.0.2"

testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"


buildTypes
release
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'




buildscript
repositories
jcenter()

dependencies
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'



ext
bintrayRepo = 'maven'
bintrayName = 'sinalib'

publishedGroupId = 'come.sinarahimi.sinalib'
libraryName = 'Sinalib'
artifact = 'sinalib'

libraryDescription = 'This view is a container that supports diagonal scroll and fling gesture. It is based on AOSP HorizontalScrollView.'

siteUrl = 'https://github.com/Sinarahimi/sampleMavenLib'
gitUrl = 'https://github.com/Sinarahimi/sampleMavenLib.git'

libraryVersion = '1.0.2'

developerId = 'sinarahimi'
developerName = 'Sina RAHIMI'
developerEmail = 'develop.rahimi95@gmail.com'

licenseName = 'The Apache Software License, Version 2.0'
licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
allLicenses = ["Apache-2.0"]




publishing
publications
Production(MavenPublication)
artifact("$buildDir/outputs/aar/sinalib-release.aar")
groupId publishedGroupId
artifactId artifact
version libraryVersion

//The publication doesn't know about our dependencies, so we have to manually add them to the pom
pom.withXml
def dependenciesNode = asNode().appendNode('dependencies')

//Iterate over the compile dependencies (we don't want the test ones), adding a <dependency> node for each
configurations.compile.allDependencies.each
def dependencyNode = dependenciesNode.appendNode('dependency')
dependencyNode.appendNode('groupId', it.group)
dependencyNode.appendNode('artifactId', it.name)
dependencyNode.appendNode('version', it.version)




bintray
// Get Bintray credential from environment variable

Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStrea(
))
user = properties.getProperty('user')
key = properties.getProperty('apikey')
override = true
pkg
repo = bintrayRepo
name = project.name
userOrg = 'sinara'
licenses = allLicenses
desc = libraryDescription
websiteUrl = siteUrl
vcsUrl = gitUrl
version
name = libraryVersion

publish = true

publications = ['Production']


dependencies
implementation fileTree(dir: 'libs', include: ['*.jar'])

implementation 'com.android.support:appcompat-v7:28.0.0-rc02'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'





2 Answers
2



After I tried a lot of things i found two points :



1 - i changed this


artifact("$buildDir/outputs/aar/sinalib-release.aar")



to


artifact("build/outputs/aar/sinalib-release.aar")



2 - The repository that you create in bintray.com should be the same as the repo in the pkg part.


pkg



this solved the Error Skipping upload for missing file and it uploaded the arr file.
But One error still remains that it cant upload and generate pom file.


Skipping upload for missing file


pom



So i found this command:


clean build generatePomFileForProductionPublication bintrayUpload



It was working for me but still, have a problem with adding dependencies into pom
although I have this code it doesn't work :


//The publication doesn't know about our dependencies, so we have to manually add them to the pom
pom.withXml {
def dependenciesNode = asNode().appendNode('dependencies')

//Iterate over the compile dependencies (we don't want the test ones), adding a <dependency> node for each
configurations.compile.allDependencies.each
def dependencyNode = dependenciesNode.appendNode('dependency')
dependencyNode.appendNode('groupId', it.group)
dependencyNode.appendNode('artifactId', it.name)
dependencyNode.appendNode('version', it.version)



try generatePomFileForReleasePublication or publishReleasePublicationToMavenLocal.



The full commend is:


./gradlew clean build generatePomFileForReleasePublicationbintrayUpload -PbintrayUser=<BINTRAY_USER> -PbintrayKey=<BINTRAY_KEY> -PdryRun=false






i get error ' Task 'generatePomFileForReleasePublicationbintrayUpload' not found in project ':sinalib'.'

– Sina Rahimi
Sep 10 '18 at 9:45






Do you give BINTRAY_USER and key properly??

– Jamil Hasnine Tamim
Sep 10 '18 at 9:46






Yes, But its said that there is no task like 'generatePomFileForReleasePublicationbintrayUpload'

– Sina Rahimi
Sep 10 '18 at 10:00






Please follow this link : github.com/novoda/bintray-release/issues/96

– Jamil Hasnine Tamim
Sep 10 '18 at 10:03






Another solutions for POM missing : stackoverflow.com/questions/28827593/…

– Jamil Hasnine Tamim
Sep 10 '18 at 10:18



Thanks for contributing an answer to Stack Overflow!



But avoid



To learn more, see our tips on writing great answers.



Required, but never shown



Required, but never shown




By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

𛂒𛀶,𛀽𛀑𛂀𛃧𛂓𛀙𛃆𛃑𛃷𛂟𛁡𛀢𛀟𛁤𛂽𛁕𛁪𛂟𛂯,𛁞𛂧𛀴𛁄𛁠𛁼𛂿𛀤 𛂘,𛁺𛂾𛃭𛃭𛃵𛀺,𛂣𛃍𛂖𛃶 𛀸𛃀𛂖𛁶𛁏𛁚 𛂢𛂞 𛁰𛂆𛀔,𛁸𛀽𛁓𛃋𛂇𛃧𛀧𛃣𛂐𛃇,𛂂𛃻𛃲𛁬𛃞𛀧𛃃𛀅 𛂭𛁠𛁡𛃇𛀷𛃓𛁥,𛁙𛁘𛁞𛃸𛁸𛃣𛁜,𛂛,𛃿,𛁯𛂘𛂌𛃛𛁱𛃌𛂈𛂇 𛁊𛃲,𛀕𛃴𛀜 𛀶𛂆𛀶𛃟𛂉𛀣,𛂐𛁞𛁾 𛁷𛂑𛁳𛂯𛀬𛃅,𛃶𛁼

Edmonton

Crossroads (UK TV series)