Skip to content

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

@Flitskikker

Description

@Flitskikker

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! :)

Activity

eyalbe4

eyalbe4 commented on May 4, 2016

@eyalbe4
Contributor

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

yujintao529 commented on Nov 19, 2016

@yujintao529

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

yujintao529 commented on Nov 20, 2016

@yujintao529

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

yakivmospan

yakivmospan commented on Dec 22, 2016

@yakivmospan

Facing the same issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @yakivmospan@Flitskikker@yujintao529@eyalbe4

        Issue actions

          POM / AAR / artifact naming not working properly, even on 1.6 · Issue #117 · bintray/gradle-bintray-plugin