Importing old packages such as com.atlassian.jira.workflow.migration

I need to use the com.atlassian.jira.workflow.migration package. It’s listed in the docs but I can’t find how to import it. I tried finding a dependency to add but couldn’t find an artifact that contained this package. I tried using the tag but that doesn’t work either.

I’ve scoured the web to find any hint of it, including looking through maven.atlassian.com/repository/public and looking for any plugin that might use it. I used the OSGi browser in our company’s JIRA dev and found it provided by our System Bundle as an Export-Package. I’m not sure how to access that though and want to be able to reproduce it locally, even if it would work on that dev instance.

I found it used by JIRA Greenhopper Plugin (https://maven.atlassian.com/maven-public/com/atlassian/jira/plugins/jira-greenhopper-plugin/6.1.6) and tried to use their POM as a reference but still couldn’t get it to work. They mention in the comments there that it is “only required so long as we support JIRA 5.0.x” so that leads me to believe this package is depreciated, but that isn’t reflected in the docs.

Is this package no longer available? If so, why is it still in the docs?

I am new to Maven so apologies for any misused terminology.

It’s available but either in the jira-api or the jira-core area (sorry I can’t tell from the javadoc which one):
https://docs.atlassian.com/software/jira/docs/api/7.2.2/com/atlassian/jira/workflow/migration/package-summary.html

What are you trying to do? Which service do you need?

After several, SEVERAL hours looking at this, I accidentally found it looking at a project made through the atlas-create-jira-plugin command.

In the pom.xml:

<!-- Add dependency on jira-core if you want access to JIRA implementation classes as well as the sanctioned API. -->
<!-- This is not normally recommended, but may be required eg when migrating a plugin originally developed against JIRA 4.x -->
<!--
<dependency>
    <groupId>com.atlassian.jira</groupId>
    <artifactId>jira-core</artifactId>
    <version>${jira.version}</version>
    <scope>provided</scope>
</dependency>
-->

Adding that dependency allowed me to find the package.

Thank you for your reply. You are exactly right, I found it shortly after I posted the question. I wish they would include that information in the javadoc, that would have saved me a lot of headache.

I am trying to programmatically assign a workflow scheme to a project. In previous research, I thought I found that this was not possible, so I thought this was the only way to do it. But now I found Solved: how to programatically change a project's workflow... and will try that soon.

It seems I’ve been off my game haha

Does the project that you’re manipulating have issues? If so - highly recommend taking a look at the JIRA source and trace it. There are some “interesting” steps you have to do in some cases.