Following https://developer.atlassian.com/bamboodev/bamboo-tasks-api/executing-external-processes-using-processservice I would like to invoke some command using the ProcessService bean. Injection, as described in the link, does not work. I checked the source of several other plugins in Bitbucket, but each one uses the concept as described in the link.
My class:
import com.atlassian.bamboo.process.ProcessService;
public class CheckTask implements TaskType {
private final ProcessService processService;
public CheckTask(@NotNull final ProcessService processService) {
this.processService = processService;
}
However, Bamboo does not find the ProcessService bean and does not work with the following:
(org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean named "bamboo.tasks.CheckTask": unsatisfactory dependency expressed through constructor argument with index 0 of type [com.atlassian.bamboo.process.ProcessService] :: no qualification bean of type [com.atlassian.bamboo.process.ProcessService] found for dependency: at least 1 bean is expected that qualifies as a self-timer candidate for this dependency Dependency Annotations: {}; nested exception org.springframework.beans.factory. NoSuchBeanDefinitionException: No qualification bean of type [com.atlassian.bamboo.process.ProcessService] found for the dependency: given at least 1 bean that qualifies as an autwire candidate for this dependency. Dependency Annotations: {})
- ?
: 5.13.0
AMPS: 6.2.6