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

No goal has been specified

When I configure my Task and run, it says no goal has been specified, where do I specify the goal?

build	18-May-2015 11:35:48	[ERROR] No goals have been specified for this build. You must specify a valid lifecycle phase or a goal in the format <plugin-prefix>:<goal> or <plugin-group-id>:<plugin-artifact-id>[:<plugin-version>]:<goal>. Available lifecycle phases are: validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy, pre-site, site, post-site, site-deploy, pre-clean, clean, post-clean. -> [Help 1]


From the documentation, it says the following, however I don't see this tick box described in the Sonar Maven 3 task.

 

  • 'Sonar Plugin Pre-Configured': Tick this checkbox if you Maven build is already configured with the correct sonar.maven-plugin. This will cause the Task to configure the sonar:sonar goal instead of the org.codehaus.mojo:sonar-maven-plugin:[VERSION]:sonar goal, where [VERSION] is 1.0 for Maven 2.x and 2.0 for Maven 3.x.

2 answers

1 accepted

0 votes
Answer accepted

5-27-2015 4-49-26 PM.png

 

The documentation I was referring to is https://marvelution.atlassian.net/wiki/display/BAMSON/Sonar+Maven+Task (point 4).

I guess the problem is within your Maven 3.x task (the 2nd in the task list). Have you specified your Maven goals there?

I think I have misunderstood what the plug-in does. I thought it was used to replace the Maven Task, so I didn't define the goals there (and was wondering where I should define it). In fact, it should be a task that added to existing plan, so the Sonar badge comes up on the build result page, is that right?

The Sonar task doesn't replace your existing Maven tasks. You should still run your Maven tasks as before, but additionally add the Sonar for Bamboo Maven task which just triggers SonarQube to do the code analysis. Does that help?

Hi,

Could you please specify which documentation you are referring to?

Concerning the error: This error is yielded by Maven when no goals are specified. In the case of Sonar for Bamboo's Maven 3 Task, it should use "sonar:sonar" as the goal. Could you please attach a screenshot of your Sonar for Bamboo Maven task configuration? This would greatly help to resolve this issue.

Thanks,

Michael (author of the plug-in)

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Marketplace Apps & Integrations

Localize Smarter with the Transifex Integration for Bitbucket

Over 52% of internet users say obtaining information in their own language is more important than price and 75% of the world’s population doesn’t speak English. It’s no wonder then that successful gl...

413 views 0 5
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