From b0abb8a86eec478a58e7fc3c678c139e6c047ffe Mon Sep 17 00:00:00 2001
From: Elliotte Rusty Harold
Date: Fri, 22 Nov 2024 13:56:06 -0500
Subject: [PATCH 1/4] Deprecate ueJql
---
.../plugins/announcement/AnnouncementMojo.java | 7 ++-----
.../plugins/jira/AbstractJiraDownloader.java | 18 ++----------------
.../apache/maven/plugins/jira/JiraReport.java | 6 +++---
3 files changed, 7 insertions(+), 24 deletions(-)
diff --git a/src/main/java/org/apache/maven/plugins/announcement/AnnouncementMojo.java b/src/main/java/org/apache/maven/plugins/announcement/AnnouncementMojo.java
index aa24b758..65969713 100644
--- a/src/main/java/org/apache/maven/plugins/announcement/AnnouncementMojo.java
+++ b/src/main/java/org/apache/maven/plugins/announcement/AnnouncementMojo.java
@@ -208,11 +208,10 @@ public class AnnouncementMojo extends AbstractAnnouncementMojo {
private String templateEncoding;
/**
- * Use the JIRA query language instead of the JIRA query based on HTTP parameters. From JIRA 5.1 and up only JQL is
- * supported. JIRA 4.4 supports both JQL and URL parameter based queries. From 5.1.1 this is obsolete, since REST
- * queries only use JQL.
+ * Obsolete, since REST queries always use JQL.
*
* @since 2.10
+ * @deprecated ignored; remove from your configs
*/
@Parameter(property = "changes.useJql", defaultValue = "false")
private boolean useJql;
@@ -725,8 +724,6 @@ protected List getJiraReleases() throws MojoExecutionException {
jiraDownloader.setJiraPassword(jiraPassword);
}
- jiraDownloader.setUseJql(useJql);
-
jiraDownloader.setWebUser(webUser);
jiraDownloader.setWebPassword(webPassword);
diff --git a/src/main/java/org/apache/maven/plugins/jira/AbstractJiraDownloader.java b/src/main/java/org/apache/maven/plugins/jira/AbstractJiraDownloader.java
index 21329356..b6084879 100644
--- a/src/main/java/org/apache/maven/plugins/jira/AbstractJiraDownloader.java
+++ b/src/main/java/org/apache/maven/plugins/jira/AbstractJiraDownloader.java
@@ -30,8 +30,8 @@
import org.apache.maven.settings.Settings;
/**
- * Abstract API, more or less, to retrieving issue information from JIRA. Intended to have subclasses for the old (RSS)
- * and new (REST) ways of doing things.
+ * Abstract API, more or less, to retrieve issue information from JIRA. Has a subclass for
+ * new (REST) ways of doing things.
*
* @author mfranken@xebia.com
* @author jruiz@exist.com
@@ -91,12 +91,6 @@ public abstract class AbstractJiraDownloader {
/** The maven settings. */
protected Settings settings;
- /**
- * Use JQL, JIRA query language, instead of URL parameter based queries. Note that this is down here to make it
- * easier for the mojo to deal with both new and old flavors.
- */
- protected boolean useJql;
-
/** Filter the JIRA query based on the current version */
protected boolean onlyCurrentVersion;
@@ -337,14 +331,6 @@ public void setSettings(Settings settings) {
this.settings = settings;
}
- public boolean isUseJql() {
- return useJql;
- }
-
- public void setUseJql(boolean useJql) {
- this.useJql = useJql;
- }
-
public boolean isOnlyCurrentVersion() {
return onlyCurrentVersion;
}
diff --git a/src/main/java/org/apache/maven/plugins/jira/JiraReport.java b/src/main/java/org/apache/maven/plugins/jira/JiraReport.java
index 1399b207..3e58d823 100644
--- a/src/main/java/org/apache/maven/plugins/jira/JiraReport.java
+++ b/src/main/java/org/apache/maven/plugins/jira/JiraReport.java
@@ -83,12 +83,12 @@ public class JiraReport extends AbstractChangesReport {
private String columnNames;
/**
- * Use the JIRA query language instead of the JIRA query based on HTTP parameters. From JIRA 5.1 and up only JQL is
- * supported. JIRA 4.4 supports both JQL and URL parameter based queries. From 5.1.1 this is obsolete, since REST
- * queries only use JQL.
+ * Obsolete, since REST queries only use JQL.
*
* @since 2.8
+ * @deprecated ignored; delete from your config
*/
+ @Deprecated
@Parameter(property = "changes.useJql", defaultValue = "false")
private boolean useJql;
From eb148028d4df79961176a345d2261a00bb49ac32 Mon Sep 17 00:00:00 2001
From: Elliotte Rusty Harold
Date: Fri, 22 Nov 2024 13:59:51 -0500
Subject: [PATCH 2/4] fix
---
.../apache/maven/plugins/jira/AbstractJiraDownloader.java | 4 ++--
src/main/java/org/apache/maven/plugins/jira/JiraReport.java | 5 +----
2 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/src/main/java/org/apache/maven/plugins/jira/AbstractJiraDownloader.java b/src/main/java/org/apache/maven/plugins/jira/AbstractJiraDownloader.java
index b6084879..c6d1e39f 100644
--- a/src/main/java/org/apache/maven/plugins/jira/AbstractJiraDownloader.java
+++ b/src/main/java/org/apache/maven/plugins/jira/AbstractJiraDownloader.java
@@ -154,10 +154,10 @@ protected void getProxyInfo(String jiraUrl) {
/**
* Override this method if you need to get issues for a specific Fix For.
*
- * @return A Fix For id or null if you don't have that need
+ * @return a Fix For id or null if you don't have that need
*/
protected String getFixFor() {
- if (onlyCurrentVersion && useJql) {
+ if (onlyCurrentVersion) {
// Let JIRA do the filtering of the current version instead of the JIRA mojo.
// This way JIRA returns less issues and we do not run into the "nbEntriesMax" limit that easily.
diff --git a/src/main/java/org/apache/maven/plugins/jira/JiraReport.java b/src/main/java/org/apache/maven/plugins/jira/JiraReport.java
index 3e58d823..e22d2bb4 100644
--- a/src/main/java/org/apache/maven/plugins/jira/JiraReport.java
+++ b/src/main/java/org/apache/maven/plugins/jira/JiraReport.java
@@ -213,8 +213,7 @@ public class JiraReport extends AbstractChangesReport {
* Note: If you are using JIRA 4 you need to put your sort column names in the reverse order. The
* handling of this changed between JIRA 3 and JIRA 4. The current default value is suitable for JIRA 3. This may
* change in the future, so please configure your sort column names in an order that works for your own JIRA
- * version. If you use JQL, by setting the useJql parameter to true, then the order of the
- * fields are in normal order again. Starting with JIRA 5.1 you have to use JQL.
+ * version.
*
*
* @since 2.0
@@ -421,8 +420,6 @@ private void configureIssueDownloader(AbstractJiraDownloader issueDownloader) {
issueDownloader.setSettings(settings);
- issueDownloader.setUseJql(useJql);
-
issueDownloader.setOnlyCurrentVersion(onlyCurrentVersion);
issueDownloader.setVersionPrefix(versionPrefix);
From e6b2e2b56db9cde773a49871c348efa721cb3d0d Mon Sep 17 00:00:00 2001
From: Elliotte Rusty Harold
Date: Fri, 22 Nov 2024 14:02:38 -0500
Subject: [PATCH 3/4] cleanup
---
.../apache/maven/plugins/announcement/AnnouncementMojo.java | 1 +
.../org/apache/maven/plugins/jira/AbstractJiraDownloader.java | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/main/java/org/apache/maven/plugins/announcement/AnnouncementMojo.java b/src/main/java/org/apache/maven/plugins/announcement/AnnouncementMojo.java
index 65969713..9abef5e1 100644
--- a/src/main/java/org/apache/maven/plugins/announcement/AnnouncementMojo.java
+++ b/src/main/java/org/apache/maven/plugins/announcement/AnnouncementMojo.java
@@ -213,6 +213,7 @@ public class AnnouncementMojo extends AbstractAnnouncementMojo {
* @since 2.10
* @deprecated ignored; remove from your configs
*/
+ @Deprecated
@Parameter(property = "changes.useJql", defaultValue = "false")
private boolean useJql;
diff --git a/src/main/java/org/apache/maven/plugins/jira/AbstractJiraDownloader.java b/src/main/java/org/apache/maven/plugins/jira/AbstractJiraDownloader.java
index c6d1e39f..e4175424 100644
--- a/src/main/java/org/apache/maven/plugins/jira/AbstractJiraDownloader.java
+++ b/src/main/java/org/apache/maven/plugins/jira/AbstractJiraDownloader.java
@@ -30,8 +30,8 @@
import org.apache.maven.settings.Settings;
/**
- * Abstract API, more or less, to retrieve issue information from JIRA. Has a subclass for
- * new (REST) ways of doing things.
+ * Abstract API, more or less, to retrieve issue information from JIRA. Has a subclass that uses
+ * the JIRA REST API.
*
* @author mfranken@xebia.com
* @author jruiz@exist.com
From 6a9767d5db673441825ab7df0638ca1757a7b2ae Mon Sep 17 00:00:00 2001
From: Elliotte Rusty Harold
Date: Sat, 23 Nov 2024 07:20:44 -0500
Subject: [PATCH 4/4] doc
---
.../examples/customizing-jira-report.apt.vm | 34 ++-----------------
1 file changed, 2 insertions(+), 32 deletions(-)
diff --git a/src/site/apt/examples/customizing-jira-report.apt.vm b/src/site/apt/examples/customizing-jira-report.apt.vm
index 77aea853..250a5f75 100644
--- a/src/site/apt/examples/customizing-jira-report.apt.vm
+++ b/src/site/apt/examples/customizing-jira-report.apt.vm
@@ -29,41 +29,11 @@
Customizing the JIRA Report
- <> Most of the features used in this document was introduced in version
+ <> Most of the features used in this document were introduced in version
<<2.0>> of the Changes Plugin. See the
{{{../jira-report-mojo.html}goal documentation}} for detailed info on which
feature was added in which version.
-
-* What version of JIRA are you using?
-
- Depending on which version of JIRA you use, you might need to add bits of
- configuration to make the JIRA Report work properly. Starting with JIRA 5.1 it
- is no longer possible to ask JIRA questions using query parameters. If you use
- JIRA 5.1 or newer you must add this configuration, or else you will see a
- stack trace saying something like "Caused by: org.xml.sax.SAXParseException".
-
-+-----------------+
-
- ...
-
-
-
- org.apache.maven.plugins
- maven-changes-plugin
- ${project.version}
-
- true
-
- ...
-
-
-
- ...
-
-+-----------------+
-
-
* Selecting version(s)
We'll start off by creating a JIRA Report for one or more versions of your
@@ -211,7 +181,7 @@ Customizing the JIRA Report
Another way to filter and sort issues is to configure the plugin using a JIRA
syntaxed filter. You can grab this from the URL if you filter and sort issues
in the Issue Navigator in JIRA. Just remember that you have to escape the
- ampersand (&) characters, when you put them into the xml based POM.
+ ampersand (&) characters, when you put them into the XML based POM.
In this example we are filtering out issues with as resolution and
sorting them by , in ascending order.