Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,298,026
Community Members
 
Community Events
165
Community Groups

Bamboo Specs Failing With "cannot find symbol"

I started with a very simple plan with no jobs or tasks and that worked, but when I added tasks, I'm getting

 

"cannot find symbol" when you try to validate the spec file.

 

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.7.0:compile (default-compile) on project bamboo-specs: Compilation failure: Compilation failure:
[ERROR] /Users/thomasthi/source/adjudicationdocker/bamboo-specs/src/main/java/rxsense/PlanSpec.java:[51,25] cannot find symbol
[ERROR] symbol: class Stage
[ERROR] location: class rxsense.PlanSpec
[ERROR] /Users/thomasthi/source/adjudicationdocker/bamboo-specs/src/main/java/rxsense/PlanSpec.java:[52,39] cannot find symbol
[ERROR] symbol: class Job
[ERROR] location: class rxsense.PlanSpec
[ERROR] /Users/thomasthi/source/adjudicationdocker/bamboo-specs/src/main/java/rxsense/PlanSpec.java:[54,49] cannot find symbol
[ERROR] symbol: class ScriptTask
[ERROR] location: class rxsense.PlanSpec
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

 

 

Plan Definition:

This was taken from the tutorial page.

Plan createPlan() { return new Plan(project(), "ContainerBuild", "PLAN") .description("Plan created from Bamboo Java Specs") .stages( new Stage("Stage 1") .jobs(new Job("Run", "RUN") .tasks( new ScriptTask().inlineBody("echo Hello world!")))); }

 

 

 

2 answers

Turns out it's because the required imports aren't being made.

Make sure the src/main/java/tutorial/PlanSpec.java file has the following added.

import com.atlassian.bamboo.specs.api.builders.plan.Job;
import com.atlassian.bamboo.specs.api.builders.plan.Stage;
import com.atlassian.bamboo.specs.builders.task.ScriptTask;

 

Additionally, I had to change the createPlan method to

public Plan createPlan() {

 I believe it was private before and mvn test complained.

I get the same error, straight from the tutorial page.  Haven't figured it out yet.

Suggest an answer

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

Bamboo Data Center on Kubernetes

Hi, If you are running self-managed environments and looking to adopt modern infrastructure, Bamboo Data Center can now be deployed in a Kubernetes cluster. By leveraging Kubernetes, you can easily...

955 views 3 8
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