Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Attempting to publish artifact to Packages but getting a Bad Request Response

Derek Worden
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 18, 2026

I have a Spring Boot project and I am trying to use the maven-publish plugin to publish my war file to Packages. But I am getting a code 400 response Bad Request. I get no other information than that. 

 

This is how my config is set up in build.gradle (with somethings removed): 

publishing {
    publications {
        pluginMaven(MavenPublication) {
            from components.java
            artifact bootWar
            groupId = '{COM.GROUP}'
            artifactId = 'test-management-system'
        }
    }

    repositories {
        maven {
            name = "BitbucketPackages"
            url = uri("https://maven.apkg.io/{WORKSPACESNAME}")
            credentials {
                username = atlassianEmail
                password = atlassianApiToken
            }
        }
    }
}
I'm sure that the authentication is correct, if I change anything I get Unauthorized instead. I've changed the details in the publications section based on a couple examples, but no changes. 

1 answer

0 votes
Ben
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 19, 2026

Hi @Derek Worden 

I can see based on our documentation that your configuration appears to be correct as far as Gradle is concerned.

I would suggest creating a new API token and ensuring it has been set up with the correct permission scopes necessary for package management:

1. Navigate here https://id.atlassian.com/manage-profile/security/api-tokens

2. Select Create API Token With Scopes (you must select with scopes, the no scopes option will not work)

3. If the token is purely used to push/pull from the package registry - the 

read:package:bitbucket and write:package:bitbucket token scopes should suffice

4. Finish by selecting Create token and make note of the token

5. Create it as a repo variable and update your config

 

Please try this for me and let me know how it goes.

If it's still not working - it would help if you raised a formal support ticket, as this will allow us to access your environment and analyse your config/build logs in greater detail:

If you're not able to raise a support ticket - please let me know your timezone so that I may raise one on your behalf with a teammate that operates within your working hours.

Cheers!

- Ben (Bitbucket Cloud Support)

 

 

 

Derek Worden
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 20, 2026

Even with an API Token With Scopes I get the same error. I will open a support ticket, thank you!

Derek Worden
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 20, 2026

When working on submitting the ticket the AI response stated that Packages does not support WAR files. Could you confirm if this is correct? and If so is there a possible timeline for when that might be supported?

Ben
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 20, 2026

Hi @Derek Worden 

Ahh, my apologies. you're correct - WAR isn't yet supported (checked with our engineering teams).

Only the following file types are supported at this stage:

  • "jar", "pom", "module", "aar"

I've raised a feature request ticket on your behalf with our developers, you may Watch it to receive future updates and Vote for it to improve its visibility with regard to customer demand:

We don't have an exact timeframe, unfortunately - but Watching the ticket above is the best way to receive updates from our development teams regarding it.

Kind Regards,

- Ben (Bitbucket Cloud Support)

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin Site Admin
TAGS
AUG Leaders

Atlassian Community Events