This is an automated email from the ASF dual-hosted git repository.

elharo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-changes-plugin.git


The following commit(s) were added to refs/heads/master by this push:
     new 41fd137  [MCHANGES-439] Deprecate useJql (#56)
41fd137 is described below

commit 41fd137947a4f141901f206d259dfe959ea39bdf
Author: Elliotte Rusty Harold <elh...@users.noreply.github.com>
AuthorDate: Sat Nov 23 17:34:23 2024 +0000

    [MCHANGES-439] Deprecate useJql (#56)
    
    * Deprecate ueJql
---
 .../plugins/announcement/AnnouncementMojo.java     |  8 ++---
 .../maven/plugins/jira/AbstractJiraDownloader.java | 22 +++-----------
 .../org/apache/maven/plugins/jira/JiraReport.java  | 11 +++----
 .../apt/examples/customizing-jira-report.apt.vm    | 34 ++--------------------
 4 files changed, 13 insertions(+), 62 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 f718e15..0cd7428 100644
--- a/src/main/java/org/apache/maven/plugins/announcement/AnnouncementMojo.java
+++ b/src/main/java/org/apache/maven/plugins/announcement/AnnouncementMojo.java
@@ -209,12 +209,12 @@ 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
      */
+    @Deprecated
     @Parameter(property = "changes.useJql", defaultValue = "false")
     private boolean useJql;
 
@@ -716,8 +716,6 @@ public class AnnouncementMojo extends 
AbstractAnnouncementMojo {
             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 2132935..e417542 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.Proxy;
 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 that uses
+ * the JIRA REST API.
  *
  * @author mfran...@xebia.com
  * @author jr...@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;
 
@@ -160,10 +154,10 @@ public abstract class AbstractJiraDownloader {
     /**
      * Override this method if you need to get issues for a specific Fix For.
      *
-     * @return A Fix For id or <code>null</code> if you don't have that need
+     * @return a Fix For id or <code>null</code> 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.
 
@@ -337,14 +331,6 @@ public abstract class AbstractJiraDownloader {
         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 1399b20..e22d2bb 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;
 
@@ -213,8 +213,7 @@ public class JiraReport extends AbstractChangesReport {
      * <strong>Note:</strong> 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 <code>useJql</code> parameter 
to <code>true</code>, then the order of the
-     * fields are in normal order again. Starting with JIRA 5.1 you have to 
use JQL.
+     * version.
      * </p>
      *
      * @since 2.0
@@ -421,8 +420,6 @@ public class JiraReport extends AbstractChangesReport {
 
         issueDownloader.setSettings(settings);
 
-        issueDownloader.setUseJql(useJql);
-
         issueDownloader.setOnlyCurrentVersion(onlyCurrentVersion);
 
         issueDownloader.setVersionPrefix(versionPrefix);
diff --git a/src/site/apt/examples/customizing-jira-report.apt.vm 
b/src/site/apt/examples/customizing-jira-report.apt.vm
index 77aea85..250a5f7 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
 
- <<Note:>> Most of the features used in this document was introduced in version
+ <<Note:>> 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".
-
-+-----------------+
-<project>
-  ...
-  <reporting>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-changes-plugin</artifactId>
-        <version>${project.version}</version>
-        <configuration>
-          <useJql>true</useJql>
-        </configuration>
-        ...
-      </plugin>
-    </plugins>
-  </reporting>
-  ...
-</project>
-+-----------------+
-
-
 * 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 <Fixed> as resolution and
   sorting them by <type>, in ascending order.

Reply via email to