Maven Changes Plugin JIRA Report Fails with Status Not Found Error

I’m working on creating release notes using the maven-changes-plugin with JIRA integration. When I run the command to generate the report, I get an error saying it can’t find a specific status.

Here’s my configuration in the POM file:

<reporting>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-changes-plugin</artifactId>
            <version>2.12.1</version>
            <configuration>
                <onlyCurrentVersion>true</onlyCurrentVersion>
                <issueManagementSystems>
                    <issueManagementSystem>JIRA</issueManagementSystem>
                </issueManagementSystems>
                <resolutionIds>Complete,Finished</resolutionIds>
                <statusIds>Closed,Done,Testing</statusIds>
                <columnNames>Type,Key,Summary,Priority,Status,Resolution,Version,Assignee</columnNames>
                <webUser>{myUsername}</webUser>
                <webPassword>{myPassword}</webPassword>
            </configuration>
        </plugin>
    </plugins>
</reporting>

<issueManagement>
    <system>JIRA</system>
    <url>{my.jira.url}</url>
</issueManagement>

When I execute mvn changes:jira-report, I get this error:

org.apache.maven.plugin.MojoFailureException: Could not find status Closed.
    at org.apache.maven.plugin.jira.RestJiraDownloader.resolveOneItem
    at org.apache.maven.plugin.jira.RestJiraDownloader.resolveList
    at org.apache.maven.plugin.jira.RestJiraDownloader.resolveIds

What could be causing this issue and how do I fix it?

This got me too! Hit /rest/api/2/project/{projectkey}/statuses in your browser while logged into Jira to grab the exact status names. The plugin’s super picky about exact matches and case sensitivity. Also check if plugin version 2.12.1 works with your Jira version - newer instances sometimes return different API responses.

This happens when your status names don’t match exactly what’s in JIRA. The maven-changes-plugin is case-sensitive and needs perfect matches. I ran into this same issue when our JIRA admin renamed workflow statuses without telling the dev team. Check your JIRA workflow directly - go to Project Settings > Workflows and look at the actual status names in your project’s workflow scheme. You can also temporarily remove the statusIds config entirely and let the plugin grab all statuses, then narrow it down once you see what’s available. Different JIRA projects can have different workflow schemes with different status names, so make sure you’re checking the right project workflow.

Encountered a similar issue previously after a JIRA upgrade. It appears that the hardcoded status names used by the maven-changes-plugin may not correspond to your current JIRA configuration. Even though you refer to a status as “Closed,” it could be labeled differently in your setup. To resolve this, access {your-jira-url}/rest/api/2/status while logged in. This will provide you with a JSON list of all statuses along with their exact names and IDs. Subsequently, replace the statusIds in your configuration with the accurate names. I mistakenly believed my status was “Done,” but its correct designation was actually “Complete.” Moreover, consider using numeric IDs instead of status names, as they are less prone to changes during JIRA upgrades.