Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
2.12.1
-
None
-
Apache Maven 3.5.4 (1edded0938998edf8bf061f1ceb3cfdeccf443fe; 2018-06-17T20:33:14+02:00)
Maven home: T:\apache-maven-3.5.4
Java version: 1.8.0_181, vendor: Oracle Corporation, runtime: C:\Program Files\Java\jdk1.8.0_181\jre
Default locale: fr_FR, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"Apache Maven 3.5.4 (1edded0938998edf8bf061f1ceb3cfdeccf443fe; 2018-06-17T20:33:14+02:00) Maven home: T:\apache-maven-3.5.4 Java version: 1.8.0_181, vendor: Oracle Corporation, runtime: C:\Program Files\Java\jdk1.8.0_181\jre Default locale: fr_FR, platform encoding: Cp1252 OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
Description
Hi,
Even if the statusIds are changed in the configuration section of the plugin, le statusIds variable is still "Closed" : resulting in :
[WARNING] 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:208) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146) 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:954) at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288) at org.apache.maven.cli.MavenCli.main (MavenCli.java:192) at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke (Method.java:498) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289) at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415) at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356) [DEBUG] addRuleSet() with no namespace URI [DEBUG] setDocumentLocator(org.apache.xerces.parsers.AbstractSAXParser$LocatorProxy@44eb2452) [DEBUG] startDocument() [DEBUG] startElement(,,tools) [DEBUG] Pushing body text '' [DEBUG] New match='tools' [DEBUG] Fire begin() for SetPropertiesRule[] [DEBUG] [SetPropertiesRule]{tools} Set org.apache.velocity.tools.config.XmlFactoryConfiguration properties [DEBUG] BeanUtils.populate(
with a configuration section like;
<configuration> <useJql>true</useJql> <issueLinkTemplatePerSystem> <default>%URL%/issues/%ISSUE%</default> </issueLinkTemplatePerSystem> <onlyCurrentVersion>false</onlyCurrentVersion> <columnNames>Fix Version,Key,Summary,Type,Resolution,Status</columnNames> <!-- Sort cols have to be reversed in JIRA 4 --> <sortColumnNames>Key DESC,Type,Fix Version DESC</sortColumnNames> <!-- Fixed = 1, Done = 10101 --> <resolutionIds>1,10101</resolutionIds> <!-- Status : CLOSED = 6, FINISHED = 10003 RESOLVED ? --> <statusIds>6,10003</statusIds> <!-- Don't include sub-task --> <!-- <typeIds>Bug,New Feature,Epic,Story,Task,Improvement,Wish,Test</typeIds> --> <!-- <fixVersionIds>${jira.cdis.fixVersionIds}</fixVersionIds> --> <!-- TODO add EpicId if possible or componentId. --> <filter>project = MP102ICNXNET_BLM AND status in (CLOSED, FINISHED)</filter> <versionPrefix>CDIS V</versionPrefix> <maxEntries>500</maxEntries> ... </configuration>
This following method call is performed when the client retrieve all status with /jira2/rest/api/2/status and the items is empty
private String resolveOneItem( JsonNode items, String what, String nameOrId ) throws IOException, MojoExecutionException, MojoFailureException { for ( int cx = 0; cx < items.size(); cx++ ) { JsonNode item = items.get( cx ); if ( nameOrId.equals( item.get( "id" ).asText() ) ) { return nameOrId; } else if ( nameOrId.equals( item.get( "name" ).asText() ) ) { return item.get( "id" ).asText(); } } throw new MojoFailureException( String.format( "Could not find %s %s.", what, nameOrId ) ); }
Thus, the jira-report.xml generated is empty
Best regards.