0

I'm trying to use maven-changes-plugin to generate release-notes by Jira tasks. I Followed these instructions:

this is what I added to my pom.xml:

...
<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>Fixed,Done</resolutionIds>
                <statusIds>Closed,Resolved,QA</statusIds>
                <columnNames>Type,Key,Summary,Priority,Status,Resolution,Fix Version,Assignee</columnNames>
                <webUser>{userName}</webUser>
                <webPassword>{password}</webPassword>
            </configuration>
        </plugin>
    </plugins>
</reporting>
...
<issueManagement>
    <system>JIRA</system>
    <url>{jira.url}</url>
</issueManagement>
...

And when I'm running mvn changes:jira-report I'm getting the following error message:

org.apache.maven.plugin.MojoFailureException: Could not find status Closed.
    at org.apache.maven.plugin.jira.RestJiraDownloader.resolveOneItem (RestJiraDownloader.java:275)
    at org.apache.maven.plugin.jira.RestJiraDownloader.resolveList (RestJiraDownloader.java:256)
    at org.apache.maven.plugin.jira.RestJiraDownloader.resolveIds (RestJiraDownloader.java:221)
    at org.apache.maven.plugin.jira.RestJiraDownloader.doExecute (RestJiraDownloader.java:141)
    at org.apache.maven.plugin.jira.AdaptiveJiraDownloader.doExecute (AdaptiveJiraDownloader.java:45)
    at org.apache.maven.plugin.jira.JiraMojo.executeReport (JiraMojo.java:346)
    at org.apache.maven.reporting.AbstractMavenReport.generate (AbstractMavenReport.java:255)
    at org.apache.maven.reporting.AbstractMavenReport.generate (AbstractMavenReport.java:210)
    at org.apache.maven.plugin.changes.AbstractChangesReport.execute (AbstractChangesReport.java:203)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:566)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)

Why am I getting this message and how can I solve it?

mkrieger1
  • 19,194
  • 5
  • 54
  • 65
Evya2005
  • 410
  • 1
  • 5
  • 19

1 Answers1

1

I checked the documentation here for statusIds:

If your installation of JIRA uses custom status IDs, you can reference them here by their numeric values.

Perhaps, in your Jira instance, the default "Closed" status may be changed somehow. You can try the same code using the id of statuses.

If you have Admin permissions in Jira, you can click "." on the screen and write "statuses" and find the related ids. Or, you can use the Jira Rest API and send GET request to "/rest/api/2/status"

stuck
  • 1,477
  • 2
  • 14
  • 30
  • Hi @stuck thanks for the answer, I tries to get all the statusIds from this API "/rest/api/2/status" and adding them to statusIds tag, but it didn't worked for me. – Evya2005 Dec 27 '21 at 08:42
  • Hmm, did you get the same exception? By the way, the Jira user has access to the system, right? You may want to try `jiraUser` and `jiraPassword`, instead of the `webUser` – stuck Dec 28 '21 at 20:52
  • Yes I got the same exception. The user that I'm using has access to the Jira system. Actually I'm doing login to Jira with Goggle account - and I tried with both webUser and jiraUser and I got the same exception. – Evya2005 Dec 29 '21 at 09:46