maven-changes-plugin Jira-report 找不到状态已关闭
Posted
技术标签:
【中文标题】maven-changes-plugin Jira-report 找不到状态已关闭【英文标题】:maven-changes-plugin Jira-report Could not find status Closed 【发布时间】:2022-01-23 20:03:00 【问题描述】:我正在尝试使用 maven-changes-plugin
通过 Jira 任务生成发布说明。
我遵循了这些说明:
这是我添加到我的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>
...
当我运行 mvn changes:jira-report
时,我收到以下错误消息:
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)
知道为什么我会收到此消息,我该如何解决? 提前致谢。
【问题讨论】:
【参考方案1】:我检查了here 的文档statusIds
:
如果您的 JIRA 安装使用自定义状态 ID,您可以在此处通过其数值引用它们。
也许,在您的 Jira 实例中,默认的“已关闭”状态可能会以某种方式更改。您可以使用 statuses 的 id 尝试相同的代码。
如果您在 Jira 中具有管理员权限,则可以单击“。”在屏幕上写下“状态”并找到相关的 ID。 或者,您可以使用 Jira Rest API 并将 GET 请求发送到“/rest/api/2/status”
【讨论】:
嗨@stuck 感谢您的回答,我尝试从这个 API "/rest/api/2/status" 获取所有 statusIds 并将它们添加到 statusIds 标签,但它没有工作我。 嗯,你有同样的例外吗?顺便说一句,Jira 用户可以访问系统,对吧?你可能想试试jiraUser
和jiraPassword
,而不是webUser
是的,我遇到了同样的异常。我使用的用户可以访问 Jira 系统。实际上,我正在使用 Goggle 帐户登录 Jira - 我尝试使用 webUser 和 jiraUser 并遇到相同的异常。以上是关于maven-changes-plugin Jira-report 找不到状态已关闭的主要内容,如果未能解决你的问题,请参考以下文章