PR: MPJIRA-10

Jira plugin does not work with NTLM proxy.


git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@373582 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
ltheussl committed 2006-01-30 20:44:09 +00:00
1 parent d54e1ee4f3
commit 9085bf2e19
5 files changed
+48 -4

No files matched your search

+2
View File
@@ -72,6 +72,8 @@
webPassword="${maven.jira.webPassword}"
jiraUser="${maven.jira.jiraUser}"
jiraPassword="${maven.jira.jiraPassword}"
proxyNtlmHost="${maven.jira.proxy.ntlm.host}"
proxyNtlmDomain="${maven.jira.proxy.ntlm.domain}"
component="${maven.jira.component}"
roadmap="${maven.jira.roadmap}"
/>
+2
View File
@@ -19,6 +19,8 @@
# -------------------------------------------------------------------
maven.jira.webUser=
maven.jira.webPassword=
maven.jira.proxy.ntlm.host=${maven.proxy.ntlm.host}
maven.jira.proxy.ntlm.domain=${maven.proxy.ntlm.domain}
maven.jira.jiraUser=
maven.jira.jiraPassword=
maven.jira.nbentries=1000
@@ -35,6 +35,7 @@ import org.apache.commons.httpclient.HttpClient;
import org.apache.commons.httpclient.HttpException;
import org.apache.commons.httpclient.HttpState;
import org.apache.commons.httpclient.HttpStatus;
import org.apache.commons.httpclient.NTCredentials;
import org.apache.commons.httpclient.StatusLine;
import org.apache.commons.httpclient.UsernamePasswordCredentials;
import org.apache.commons.httpclient.methods.GetMethod;
@@ -121,6 +122,12 @@ public final class JiraDownloader
/** The password to LOG into webserver. */
private String webPassword;
/** The host to use if you are using NTLM authentication. */
private String proxyNtlmHost;
/** The NT domain to use if you are using NTLM authentication. */
private String proxyNtlmDomain;
/** The maven project. */
private Project project;
@@ -352,6 +359,7 @@ public final class JiraDownloader
Number fixforNumber =
nf.parse( projectPage, new ParsePosition( fixforIndex + 7 ) );
String fixfor = Integer.toString( fixforNumber.intValue() );
// TODO: check if fixfor = -1: no versions scheduled in roadmap
setFilter( "&&fixfor=" + fixfor
+ "&sorter/field=status&sorter/order=ASC" );
@@ -392,8 +400,18 @@ public final class JiraDownloader
{
client.getState().setAuthenticationPreemptive( true );
Credentials defaultcreds =
new UsernamePasswordCredentials( webUser, webPassword );
Credentials defaultcreds;
if ( this.proxyNtlmHost != null && this.proxyNtlmDomain != null)
{
defaultcreds =
new NTCredentials( webUser, webPassword,
proxyNtlmHost, proxyNtlmDomain );
}
else
{
defaultcreds =
new UsernamePasswordCredentials( webUser, webPassword );
}
LOG.info( "Using username: " + webUser
+ " for Basic Authentication against the webserver at "
+1
View File
@@ -24,6 +24,7 @@
</properties>
<body>
<release version="1.3-SNAPSHOT" date="in SVN">
<action dev="ltheussl" type="fix" issue="MPJIRA-10">Jira plugin does not work with NTLM proxy.</action>
<action dev="aheritier" type="update" issue="MAVEN-1739">Upgrade to HttpClient 3.0.</action>
<action dev="ltheussl" type="fix" issue="MPJIRA-17">Plugin uses deprecated API to retrieve JIRA issues. Now requires at least JIRA 3.3.</action>
<action dev="ltheussl" type="add">Add a jira-roadmap report.</action>
+23 -2
View File
@@ -129,7 +129,7 @@
<td>Yes</td>
<td>
<p>
Defines the jira username for authentication into a private Jira instalation.<br/>
Defines the jira username for authentication into a private Jira instalation.
</p>
</td>
<td></td>
@@ -149,7 +149,7 @@
<td>Yes</td>
<td>
<p>
Defines the http user for basic authentication into the Jira webserver.<br/>
Defines the http user for basic authentication into the Jira webserver.
</p>
</td>
<td></td>
@@ -164,6 +164,27 @@
</td>
<td></td>
</tr>
<tr>
<td>maven.jira.proxy.ntlm.host</td>
<td>Yes</td>
<td>
<p>
The host to use if you are using NTLM authentication
</p>
</td>
<td><code>${maven.proxy.ntlm.host}</code></td>
</tr>
<tr>
<td>maven.jira.proxy.ntlm.domain</td>
<td>Yes</td>
<td>
<p>
The NT domain to use if you are using NTLM authentication.
</p>
</td>
<td><code>${maven.proxy.ntlm.domain}</code></td>
</tr>
<tr>
<td>maven.jira.roadmap</td>
<td>Yes</td>