Author: dennisl Date: Thu Jan 3 12:16:29 2013 New Revision: 1428311 URL: http://svn.apache.org/viewvc?rev=1428311&view=rev Log: [MCHANGES-301] Impossible to use ParameterBasedQuery in combination with JIRA authentication
Modified: maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/jira/ClassicJiraDownloader.java Modified: maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/jira/ClassicJiraDownloader.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/jira/ClassicJiraDownloader.java?rev=1428311&r1=1428310&r2=1428311&view=diff ============================================================================== --- maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/jira/ClassicJiraDownloader.java (original) +++ maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/jira/ClassicJiraDownloader.java Thu Jan 3 12:16:29 2013 @@ -86,19 +86,10 @@ public final class ClassicJiraDownloader client.setState( state ); - String fullUrl = null; - - if ( useJql ) - { - fullUrl = getJqlQueryURL(); - } - else - { - fullUrl = getParameterBasedQueryURL( client ); - } - String baseUrl = JiraHelper.getBaseUrl( fullUrl ); + String baseUrl = JiraHelper.getBaseUrl( project.getIssueManagement().getUrl() ); getLog().debug( "JIRA lives at: " + baseUrl ); + // Here we only need the host part of the URL determineProxy( baseUrl, client ); prepareBasicAuthentication( client ); @@ -106,12 +97,23 @@ public final class ClassicJiraDownloader boolean jiraAuthenticationSuccessful = false; if ( isJiraAuthenticationConfigured() ) { + // Here we only need the parts up to and including the host part of the URL jiraAuthenticationSuccessful = doJiraAuthentication( client, baseUrl ); } if ( ( isJiraAuthenticationConfigured() && jiraAuthenticationSuccessful ) || !isJiraAuthenticationConfigured() ) { + String fullUrl = null; + + if ( useJql ) + { + fullUrl = getJqlQueryURL(); + } + else + { + fullUrl = getParameterBasedQueryURL( client ); + } if ( log.isDebugEnabled() ) { log.debug( "download jira issues from url " + fullUrl );