I am writing PlanSpec.java for a build plan I have which contains After Deployment Triggers, however I cannot get it to compile. Here is a relevant portion of the code, apologies for the poor formatting:
new AfterDeploymentTrigger()
.description("After test Prod Environment Deployment")
.deploymentProject("test")
.environment("prod")
*/
new AnyTrigger(new AtlassianModule("com.atlassianlab.bamboo.plugins.bamboo-after-deployment-trigger-plugin:afterDeployment"))
.name("After deployment")
.description("After test Prod Environment Deployment")
.configuration(new MapBuilder()
.put("deployment.trigger.afterDeployment.deploymentProjectId", "449904641")
.put("deployment.trigger.afterDeployment.deploymentEnvironmentId", "449118216")
.build()),
The compile error is:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.7.0:compile (default-compile) on project attcs-bamboo-plans: Compilation failure: Compilation failure:
[ERROR] /bamboo-specs/src/main/java/deploymentevents/PlanSpec.java:[32,28] cannot find symbol
[ERROR] symbol: class plugins
[ERROR] location: package com.atlassian.bamboo
[ERROR] /bamboo-specs/src/main/java/deploymentevents/PlanSpec.java:[135,17] cannot find symbol
[ERROR] symbol: class AnyTrigger
[ERROR] location: class deploymentevents.PlanSpec
[ERROR] /bamboo-specs/src/main/java/deploymentevents/PlanSpec.java:[148,17] cannot find symbol
[ERROR] symbol: class AnyTrigger
[ERROR] location: class deploymentevents.PlanSpec
[ERROR] -> [Help 1]
[ERROR]
I have tried adding:
import com.atlassian.bamboo.plugins;
however, no change in behavior.
I also do not understand the `Add com.atlassian.bamboo.plugins:afterdeployment-bamboo-specs:0.9 as dependency to your specs pom.xml to make use of this trigger builder.` comment. I have a colleague who believes I do not need to touch the pom.xml.
What am I missing to get this to compile? I used the View Plan As Java Specs option in bamboo for the above code.
Thank you!