Publishing Bamboo Java Specs via Maven using .credentials file(with username and password) results in token property error

XMLWordPrintable

    • 1
    • Severity 3 - Minor
    • 1

      Issue Summary

      As per Bamboo Specs documentation, a ".credentials" file is used to define the username and password to be used by Maven when publishing the Specs code in Bamboo. When publishing a Bamboo Java Specs plan via Maven, the username and password properties are not recognised. FiletokenCredentials reports an error stating a 'token' property must be defined in credentials file.

      If this is expected behaviour we will need to update: https://support.atlassian.com/bamboo/kb/how-to-use-a-personal-access-token-pat-to-publish-bamboo-specs-changes/.

      Steps to Reproduce

      1. Create a Java specs plan
      2. Populate the bamboo-specs/.credentials file with your username= / password= values
      2. Try to publish it to Bamboo via `mvn -Ppublish-specs`

      Expected Results

      The plan publishing should follow the credentials and proceed

      Actual Results

      It produces an error such as:

      [INFO] Scanning <path>/bamboo-specs/target/classes for classes annotated with Bamboo plan annotation.
      [INFO] Found @BambooSpec annotation on class com.example.atlassian.bamboo.PlanSpec
      [INFO] Running class com.example.atlassian.bamboo.PlanSpec
      2026-02-16 07:06:02,917 INFO [FileTokenCredentials] Property 'token' must be defined in credentials file '.credentials' to access Bamboo
      2026-02-16 07:06:02,919 INFO [FileTokenCredentials] Please make sure that the file is in correct format (Java properties)
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD FAILURE
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time:  4.052 s
      [INFO] Finished at: 2026-02-16T07:06:02Z
      [INFO] ------------------------------------------------------------------------
       

      Workaround

      Generate a token in Bamboo and use it as the value for the token field in the .credentials file.

              Assignee:
              Mateusz Szmal
              Reporter:
              Alex (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: