Skip to content

POM / AAR / artifact naming not working properly, even on 1.6 #117

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Flitskikker opened this issue May 1, 2016 · 4 comments
Open

POM / AAR / artifact naming not working properly, even on 1.6 #117

Flitskikker opened this issue May 1, 2016 · 4 comments

Comments

@Flitskikker
Copy link

Flitskikker commented May 1, 2016

Hi all,

I was looking on publishing one of my libraries to JCenter/Maven, so I looked around and stumbled upon the following guide:
https://inthecheesefactory.com/blog/how-to-upload-library-to-jcenter-maven-central-as-dependency/en

Everything went fine, until I wanted to upload the files. The bintray plugin refuses to use the artifact id I specified, and instead names everything as the name of the module.

The structure of my project is as follows:


"app" is an example project and "library" is the library I want to upload.

My library/bintray config is as follows:
https://github.com/AVOdev/AWSPushManager/blob/edb9c50f3e3b2b7c20967339931ed71ae83885e0/library/build.gradle

"aws-push-manager" is how I want my library to be named on Bintray, but everything gets uploaded as library-***.

I found #103, #81 and @eyalbe4's comments and updated to plugin version 1.6. Now the pom file gets generated correctly, but the sources are still generated under "library". Now it's even fragmented!

As a temporary fix, I reverted to 1.4 and renamed my library project to "aws-push-manager" and it works instantly:

However, I would like to keep the name "library" for my library project. Could you please advise on how to achieve this?

Thanks in advance! :)

@eyalbe4
Copy link
Contributor

eyalbe4 commented May 4, 2016

Hi @Flitskikker,
What names do your artifacts have before they are uploaded to Bintray (on your file-system)? I'm asking this because the Bintray Plugin simply collects the artifacts from the defined Configurations (the "archives" Configuration for example).

@yujintao529
Copy link

yujintao529 commented Nov 19, 2016

i happen the same problems,and i found some founds.
Firstly,
image
you must renamed the androidSourcesJar and androidJavadocsJar of name . and you will get correct androidJavadocsJar and androidSourcesJar.
so i try to renamed the outputFile's name.like this,
image
and then , i think i resolve the problems and print all files of the "archives" Configuration like this,
image

and gradle print message :
files length 3
files mixdpic-1.0.5-sources.jar
files mixdpic-1.0.5-javadoc.jar
files mixdpic.aar

now, i think i can upload correct arr'file.but!!!!!!!!
when i exec gradle clean bintrayUpload --info ,i found some problems!!!!!!:
image

just you see ,the name of aar is still module's name-aar。
this is bug?


ok,finally,i solve the problem like this!!!!
the method is simple.i just create configuration named "jcenter_upload" like this configurations.create("jcenter_upload")
and then configure install like this
image
and configure artifacts
image
finally
image

you can see my project

@yujintao529
Copy link

ok,i find a simple method, you just set the value of project.archivesBaseName to your POM_ARTIFACT_ID

@yakivmospan
Copy link

Facing the same issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants