Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -208,12 +208,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;

Expand Down Expand Up @@ -725,8 +725,6 @@ protected List<Release> getJiraReleases() throws MojoExecutionException {
jiraDownloader.setJiraPassword(jiraPassword);
}

jiraDownloader.setUseJql(useJql);

jiraDownloader.setWebUser(webUser);

jiraDownloader.setWebPassword(webPassword);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 that uses
* the JIRA REST API.
*
* @author mfranken@xebia.com
* @author jruiz@exist.com
Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -160,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 <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.

Expand Down Expand Up @@ -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;
}
Expand Down
11 changes: 4 additions & 7 deletions src/main/java/org/apache/maven/plugins/jira/JiraReport.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -421,8 +420,6 @@ private void configureIssueDownloader(AbstractJiraDownloader issueDownloader) {

issueDownloader.setSettings(settings);

issueDownloader.setUseJql(useJql);

issueDownloader.setOnlyCurrentVersion(onlyCurrentVersion);

issueDownloader.setVersionPrefix(versionPrefix);
Expand Down
34 changes: 2 additions & 32 deletions src/site/apt/examples/customizing-jira-report.apt.vm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down