Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal


  • Give kudos
  • Received
  • Given


  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to give .class files path in from target folder Edited

Hi All

Recently I am facing an issue while setting binary path in my sonar maven 3 task in bamboo pipeline.

I am using below 

-Dsonar.login=some login key -Dsonar.test.inclusions=src/main/java

But when I pass the binary path as gen/main/java or target/classes system bamboo is unable to find that location or .class files.

So how to set .class files path in to get it from generated target folder.

Or what exactly yhe path I need to provide.


1 answer


If you have defined your Sonar binaries as a Bamboo capability in Bamboo you can use this capability in your Maven 3.x task like so:

-Dsonar.login=some login key -Dsonar.test.inclusions=src/main/java${bamboo.capability.<your-sonar-capability-label>}

Bamboo will translate your ${bamboo.capability.<your-sonar-capability-label>} variable to the path of the Sonar binaries eg. /pack/sonar-home/.

Hope this will help you.


Lasse Langhorn

Hi @Lasse Langhorn 

Thanks for your replay.

So I have set it like below

-Dsonar.login=loginkey -Dsonar.test.inclusions=src/main/java${}

but I getting below error

[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin: (default-cli) on project ui-test-framework: No files nor directories matching '${}' -> [Help 1]




What is your Sonar capability key in Bamboo for the Sonar capability?

Go to Bamboo administration > Server capabilities -> Click on your Sonar capability and then look the capabilityKey parameter in the URL of the page: eg. capabilityKey=system.jdk.JDK+

Then you can use the capabilityKey in the Maven task:

-Dsonar.login=loginkey -Dsonar.test.inclusions=src/main/java${bamboo.capability.<sonar.capability.key>}

Is this capability key the same as ""?


Lasse Langhorn

Hi @Lasse Langhorn 

Thanks for the quick response. But I don't have the admin permission.

Can we give the path like${WORKSPACE}/**/target/classes

is that possible ?


Try this:${}/target/classes


Lasse Langhorn

Hi @Lasse Langhorn 

I have tried that and looks like there are no .class files inside target.

Do you have any idea whre the class files will get generate ?



@Lasse Langhorn thanks

It works${}/target/classes  but  before that I added a maven 3.x task to generate the target with goal clean compile.

Hi @tanmoysahat

That is great. I assumed your project was had a Maven setup so that is why I gave you the path /target/classes.


Lasse Langhorn

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Bamboo

Bamboo 7.2 is here!

I'm happy to announce that Bamboo 7.2 has been released and it’s overflowing with awesome new features. This will be the last major Server release before the launch of Bamboo DC. Bamboo logs We...

490 views 5 7
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you