Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/maven/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Rest Maven更改插件可以';生成jira报告_Rest_Maven_Jira - Fatal编程技术网

Rest Maven更改插件可以';生成jira报告

Rest Maven更改插件可以';生成jira报告,rest,maven,jira,Rest,Maven,Jira,我正试图在的帮助下通过Jira获得releasenotes。我的pom看起来像这样: <issueManagement> <system>Jira</system> <url>https://url_to_jira</url> </issueManagement> <reporting> <plugins> <plugin> <groupId

我正试图在的帮助下通过Jira获得releasenotes。我的pom看起来像这样:

<issueManagement>
    <system>Jira</system>
    <url>https://url_to_jira</url>
</issueManagement>

<reporting>
<plugins>
    <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-changes-plugin</artifactId>
        <version>2.9</version>
        <configuration>
            <fixVersionIds>14876</fixVersionIds>
            <jiraUser>myUser</jiraUser>
            <jiraPassword>myPassword</jiraPassword>
            <webUser>myUser</webUser>
            <webPassword>myPassword</webPassword>
        </configuration>
    </plugin>
</plugins>
</reporting>
这并没有真正的帮助。使用
-X
运行
mvn
会告诉我,出于某种原因,请求头没有身份验证部分

---------------------------
ID: 1
Address: https://url_to_jira/rest/api/2/serverInfo
Http-Method: GET
Content-Type: */*
Headers: {Accept=[application/json], Content-Type=[*/*]}
--------------------------------------
Feb 25, 2014 12:51:00 PM org.apache.cxf.interceptor.LoggingInIn
INFO: Inbound Message
----------------------------
ID: 1
Response-Code: 200
Encoding: UTF-8
Content-Type: application/json;charset=UTF-8
Headers: {Cache-Control=[no-cache, no-store, no-transform], con
Payload: {stuff}
--------------------------------------
Feb 25, 2014 12:51:00 PM org.apache.cxf.interceptor.LoggingOutI
INFO: Outbound Message
---------------------------
ID: 2
Address: https://url_to_jira/rest/api/2/status
Http-Method: GET
Content-Type: */*
Headers: {Accept=[application/json], Content-Type=[*/*]}
--------------------------------------
Feb 25, 2014 12:51:00 PM org.apache.cxf.interceptor.LoggingInIn
INFO: Inbound Message
----------------------------
ID: 2
Response-Code: 200
Encoding: UTF-8
Content-Type: application/json;charset=UTF-8
Headers: {//somestuff//, X-AUSERNAME=[anonymous]}
Payload: []
--------------------------------------
注意
X-AUSERNAME=[匿名]
-部分

因此,它试图获取一个状态列表,而得到一个空列表,因为它甚至不尝试使用
Jira
进行身份验证,这很奇怪,因为我在pom中提供了一个
webUser
和一个
jiraUser
,并带有密码


有什么想法吗

也许这可以回答你的问题:

从JIRA 5.1开始,不再可能使用查询参数询问JIRA问题。如果使用JIRA 5.1或更新版本,则必须添加此配置[…]


原因是您安装的JIRA使用自定义状态ID

我找到了解决办法。您应该转到下面的链接以获取
分辨率
状态

http://jira.xxx.com/rest/api/2/resolution/
http://jira.xxx.com/rest/api/2/status/
然后使用上面结果中的
id
name
配置
resolutionid
statusid

  <issueManagement>
    <system>JIRA</system>
    <url>http://jira.xxx.com/browse/PROJ_NAME</url>
  </issueManagement>

  <reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-changes-plugin</artifactId>
        <version>2.12.1</version>
        <configuration>
          <useJql>true</useJql>
          <jiraUser>username</jiraUser>
          <jiraPassword>password</jiraPassword>
          <!-- 
              <onlyCurrentVersion>true</onlyCurrentVersion>
           -->
              <!-- http://jira.xxx.com/rest/api/2/resolution/ -->
              <!-- http://jira.xxx.com/rest/api/2/status/ -->
              <resolutionIds>10010</resolutionIds>
              <statusIds>10011</statusIds>
        </configuration>
        <reportSets>
          <reportSet>
            <reports>
            <!-- 
              <report>changes-report</report>
             -->
              <report>jira-report</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
    </plugins>
  </reporting>

吉拉
http://jira.xxx.com/browse/PROJ_NAME
org.apache.maven.plugins

  <issueManagement>
    <system>JIRA</system>
    <url>http://jira.xxx.com/browse/PROJ_NAME</url>
  </issueManagement>

  <reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-changes-plugin</artifactId>
        <version>2.12.1</version>
        <configuration>
          <useJql>true</useJql>
          <jiraUser>username</jiraUser>
          <jiraPassword>password</jiraPassword>
          <!-- 
              <onlyCurrentVersion>true</onlyCurrentVersion>
           -->
              <!-- http://jira.xxx.com/rest/api/2/resolution/ -->
              <!-- http://jira.xxx.com/rest/api/2/status/ -->
              <resolutionIds>10010</resolutionIds>
              <statusIds>10011</statusIds>
        </configuration>
        <reportSets>
          <reportSet>
            <reports>
            <!-- 
              <report>changes-report</report>
             -->
              <report>jira-report</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
    </plugins>
  </reporting>