You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by lt...@apache.org on 2006/01/30 21:44:12 UTC
svn commit: r373582 - in /maven/maven-1/plugins/trunk/jira: plugin.jelly
plugin.properties src/main/org/apache/maven/jira/JiraDownloader.java
xdocs/changes.xml xdocs/properties.xml
Author: ltheussl
Date: Mon Jan 30 12:44:09 2006
New Revision: 373582
URL: http://svn.apache.org/viewcvs?rev=373582&view=rev
Log:
PR: MPJIRA-10
Jira plugin does not work with NTLM proxy.
Modified:
maven/maven-1/plugins/trunk/jira/plugin.jelly
maven/maven-1/plugins/trunk/jira/plugin.properties
maven/maven-1/plugins/trunk/jira/src/main/org/apache/maven/jira/JiraDownloader.java
maven/maven-1/plugins/trunk/jira/xdocs/changes.xml
maven/maven-1/plugins/trunk/jira/xdocs/properties.xml
Modified: maven/maven-1/plugins/trunk/jira/plugin.jelly
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/jira/plugin.jelly?rev=373582&r1=373581&r2=373582&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/jira/plugin.jelly (original)
+++ maven/maven-1/plugins/trunk/jira/plugin.jelly Mon Jan 30 12:44:09 2006
@@ -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}"
/>
Modified: maven/maven-1/plugins/trunk/jira/plugin.properties
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/jira/plugin.properties?rev=373582&r1=373581&r2=373582&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/jira/plugin.properties (original)
+++ maven/maven-1/plugins/trunk/jira/plugin.properties Mon Jan 30 12:44:09 2006
@@ -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
Modified: maven/maven-1/plugins/trunk/jira/src/main/org/apache/maven/jira/JiraDownloader.java
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/jira/src/main/org/apache/maven/jira/JiraDownloader.java?rev=373582&r1=373581&r2=373582&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/jira/src/main/org/apache/maven/jira/JiraDownloader.java (original)
+++ maven/maven-1/plugins/trunk/jira/src/main/org/apache/maven/jira/JiraDownloader.java Mon Jan 30 12:44:09 2006
@@ -35,6 +35,7 @@
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 @@
/** 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 @@
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 @@
{
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 "
Modified: maven/maven-1/plugins/trunk/jira/xdocs/changes.xml
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/jira/xdocs/changes.xml?rev=373582&r1=373581&r2=373582&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/jira/xdocs/changes.xml (original)
+++ maven/maven-1/plugins/trunk/jira/xdocs/changes.xml Mon Jan 30 12:44:09 2006
@@ -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>
Modified: maven/maven-1/plugins/trunk/jira/xdocs/properties.xml
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/jira/xdocs/properties.xml?rev=373582&r1=373581&r2=373582&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/jira/xdocs/properties.xml (original)
+++ maven/maven-1/plugins/trunk/jira/xdocs/properties.xml Mon Jan 30 12:44:09 2006
@@ -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>