How to add IssueBeanFactory into classpath?

Hi all!

I am trying to inject in my service class IssueBeanFactory (from package com.atlassian.jira.plugins.webhooks.serializer) like this:

import com.atlassian.jira.plugins.webhooks.serializer.IssueBeanFactory;
import com.atlassian.plugin.spring.scanner.annotation.export.ExportAsService;

import javax.inject.Inject;
import javax.inject.Named;

@Named
@ExportAsService({IIssueJiraService.class})
public class Test implements IIssueJiraService {

    private final IssueBeanFactory issueBeanFactory;

    @Inject
    public Test(IssueBeanFactory issueBeanFactory) {
        this.issueBeanFactory = issueBeanFactory;
    }
}

The screenshot shows that the dependency is connected and the jar file pulled into the project.

But after atlas-debug classes from com.atlassian.jira.plugins.webhooks didn’t appear in the classpath.

And I catched the exception : java.lang.NoClassDefFoundError: com/atlassian/jira/plugins/webhooks/serializer/IssueBeanFactory

How I can fix it?
Thank you for your help.

Hi @OleksiiSkachkov,

I don’t think it is possible. Then again, I’d like to see a solution myself. The plugin does not define any OSGi exports.

Hi, @dennis.fischer
I also tend to think that this is impossible. Now I’m trying a different approach: through an HTTP request. Perhaps you will have thoughts about this? Please see my second question here:

Thanks for your help.