You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ah...@apache.org on 2006/01/15 02:45:31 UTC
svn commit: r369157 - in /maven/maven-1/plugins/trunk/linkcheck: ./
src/main/org/apache/maven/plugin/linkcheck/
src/test/org/apache/maven/plugin/linkcheck/validation/ xdocs/
Author: aheritier
Date: Sat Jan 14 17:45:20 2006
New Revision: 369157
URL: http://svn.apache.org/viewcvs?rev=369157&view=rev
Log:
PR: MPLINKCHECK-5
linkcheck plugin uses global proxy settings. There is no way to perform check using a proxy while still having a non-proxied project
Modified:
maven/maven-1/plugins/trunk/linkcheck/plugin.properties
maven/maven-1/plugins/trunk/linkcheck/project.properties
maven/maven-1/plugins/trunk/linkcheck/src/main/org/apache/maven/plugin/linkcheck/LinkCheck.java
maven/maven-1/plugins/trunk/linkcheck/src/test/org/apache/maven/plugin/linkcheck/validation/HTTPLinkValidatorTest.java
maven/maven-1/plugins/trunk/linkcheck/xdocs/changes.xml
maven/maven-1/plugins/trunk/linkcheck/xdocs/properties.xml
Modified: maven/maven-1/plugins/trunk/linkcheck/plugin.properties
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/linkcheck/plugin.properties?rev=369157&r1=369156&r2=369157&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/linkcheck/plugin.properties (original)
+++ maven/maven-1/plugins/trunk/linkcheck/plugin.properties Sat Jan 14 17:45:20 2006
@@ -20,3 +20,9 @@
maven.linkcheck.cache=${maven.build.dir}/linkcheck/linkcheck.cache
maven.linkcheck.failonerror=false
maven.linkcheck.exclude=${pom.repository.url}
+maven.linkcheck.proxy.host=${maven.proxy.host}
+maven.linkcheck.proxy.port=${maven.proxy.port}
+maven.linkcheck.proxy.username=${maven.proxy.username}
+maven.linkcheck.proxy.password=${maven.proxy.password}
+maven.linkcheck.proxy.ntlm.host=${maven.proxy.ntlm.host}
+maven.linkcheck.proxy.ntlm.domain=${maven.proxy.ntlm.domain}
Modified: maven/maven-1/plugins/trunk/linkcheck/project.properties
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/linkcheck/project.properties?rev=369157&r1=369156&r2=369157&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/linkcheck/project.properties (original)
+++ maven/maven-1/plugins/trunk/linkcheck/project.properties Sat Jan 14 17:45:20 2006
@@ -20,12 +20,12 @@
maven.junit.fork=yes
# Properties required for the unit tests
maven.junit.sysproperties = \
- maven.proxy.host \
- maven.proxy.port \
- maven.proxy.username \
- maven.proxy.password \
- maven.proxy.ntlm.host \
- maven.proxy.ntlm.domain \
+ maven.linkcheck.proxy.host \
+ maven.linkcheck.proxy.port \
+ maven.linkcheck.proxy.username \
+ maven.linkcheck.proxy.password \
+ maven.linkcheck.proxy.ntlm.host \
+ maven.linkcheck.proxy.ntlm.domain \
maven.mode.online
maven.jar.override = on
Modified: maven/maven-1/plugins/trunk/linkcheck/src/main/org/apache/maven/plugin/linkcheck/LinkCheck.java
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/linkcheck/src/main/org/apache/maven/plugin/linkcheck/LinkCheck.java?rev=369157&r1=369156&r2=369157&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/linkcheck/src/main/org/apache/maven/plugin/linkcheck/LinkCheck.java (original)
+++ maven/maven-1/plugins/trunk/linkcheck/src/main/org/apache/maven/plugin/linkcheck/LinkCheck.java Sat Jan 14 17:45:20 2006
@@ -58,9 +58,17 @@
private static final long MEG = 1024 * 1024;
- private static final String MAVEN_PROXY_NTLM_HOST = "maven.proxy.ntlm.host";
+ private static final String MAVEN_PROXY_HOST = "maven.linkcheck.proxy.host";
- private static final String MAVEN_PROXY_NTLM_DOMAIN = "maven.proxy.ntlm.domain";
+ private static final String MAVEN_PROXY_PORT = "maven.linkcheck.proxy.port";
+
+ private static final String MAVEN_PROXY_USERNAME = "maven.linkcheck.proxy.username";
+
+ private static final String MAVEN_PROXY_PASSWORD = "maven.linkcheck.proxy.password";
+
+ private static final String MAVEN_PROXY_NTLM_HOST = "maven.linkcheck.proxy.ntlm.host";
+
+ private static final String MAVEN_PROXY_NTLM_DOMAIN = "maven.linkcheck.proxy.ntlm.domain";
private File basedir;
@@ -172,10 +180,16 @@
MavenJellyContext ctx = ( (Project) getProject() ).getContext();
if ( ctx.getOnline().booleanValue() )
{
- lvm.addLinkValidator( new OnlineHTTPLinkValidator( ctx.getProxyHost(), ctx.getProxyPort(), ctx
- .getProxyUserName(), ctx.getProxyPassword(), (String) ctx.getVariable( MAVEN_PROXY_NTLM_HOST ),
- (String) ctx
- .getVariable( MAVEN_PROXY_NTLM_DOMAIN ) ) );
+ lvm
+ .addLinkValidator( new OnlineHTTPLinkValidator(
+ (String) ctx.getVariable( MAVEN_PROXY_HOST ),
+ (String) ctx.getVariable( MAVEN_PROXY_PORT ),
+ (String) ctx.getVariable( MAVEN_PROXY_USERNAME ),
+ (String) ctx.getVariable( MAVEN_PROXY_PASSWORD ),
+ (String) ctx
+ .getVariable( MAVEN_PROXY_NTLM_HOST ),
+ (String) ctx
+ .getVariable( MAVEN_PROXY_NTLM_DOMAIN ) ) );
}
else
{
Modified: maven/maven-1/plugins/trunk/linkcheck/src/test/org/apache/maven/plugin/linkcheck/validation/HTTPLinkValidatorTest.java
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/linkcheck/src/test/org/apache/maven/plugin/linkcheck/validation/HTTPLinkValidatorTest.java?rev=369157&r1=369156&r2=369157&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/linkcheck/src/test/org/apache/maven/plugin/linkcheck/validation/HTTPLinkValidatorTest.java (original)
+++ maven/maven-1/plugins/trunk/linkcheck/src/test/org/apache/maven/plugin/linkcheck/validation/HTTPLinkValidatorTest.java Sat Jan 14 17:45:20 2006
@@ -39,10 +39,11 @@
System.err.println( "maven.mode.online : " + mavenOnline );
if ( mavenOnline )
{
- hlv = new OnlineHTTPLinkValidator( System.getProperty( "maven.proxy.host" ), System
- .getProperty( "maven.proxy.port" ), System.getProperty( "maven.proxy.username" ), System
- .getProperty( "maven.proxy.password" ), System.getProperty( "maven.proxy.ntlm.host" ), System
- .getProperty( "maven.proxy.ntlm.domain" ) );
+ hlv = new OnlineHTTPLinkValidator( System.getProperty( "maven.linkcheck.proxy.host" ), System
+ .getProperty( "maven.linkcheck.proxy.port" ), System.getProperty( "maven.linkcheck.proxy.username" ),
+ System.getProperty( "maven.linkcheck.proxy.password" ), System
+ .getProperty( "maven.linkcheck.proxy.ntlm.host" ), System
+ .getProperty( "maven.linkcheck.proxy.ntlm.domain" ) );
assertEquals( LinkValidationResult.VALID, checkLink( "http://www.apache.org" ).getStatus() );
assertEquals( LinkValidationResult.ERROR, checkLink( "http://www.example.com>);" ).getStatus() );
Modified: maven/maven-1/plugins/trunk/linkcheck/xdocs/changes.xml
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/linkcheck/xdocs/changes.xml?rev=369157&r1=369156&r2=369157&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/linkcheck/xdocs/changes.xml (original)
+++ maven/maven-1/plugins/trunk/linkcheck/xdocs/changes.xml Sat Jan 14 17:45:20 2006
@@ -36,6 +36,7 @@
<action dev="aheritier" type="fix" issue="MPLINKCHECK-20" due-to="Ignacio G. Mac Dowell">StackOverflowError processing apidocs/index-all.html.</action>
<action dev="aheritier" type="add" issue="MPLINKCHECK-19">Support NTLM proxies.</action>
<action dev="aheritier" type="update" issue="MPLINKCHECK-10">"Moved Permanently" sites are reported as a warning and not as an error.</action>
+ <action dev="aheritier" type="add" issue="MPLINKCHECK-5">linkcheck plugin uses global proxy settings. There is no way to perform check using a proxy while still having a non-proxied project.</action>
<action dev="aheritier" type="add">If maven is in offline mode the report doesn't test external urls. A warning is displayed in the report.</action>
<action dev="brett" type="update">Make compatible with Maven 1.1</action>
<action dev="aheritier" type="update" issue="MAVEN-1712">Update dependencies to match ones in maven 1.1 core and to unify them between plugins. The following dependency is updated : commons-collections v2.1 -> v3.0</action>
Modified: maven/maven-1/plugins/trunk/linkcheck/xdocs/properties.xml
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/linkcheck/xdocs/properties.xml?rev=369157&r1=369156&r2=369157&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/linkcheck/xdocs/properties.xml (original)
+++ maven/maven-1/plugins/trunk/linkcheck/xdocs/properties.xml Sat Jan 14 17:45:20 2006
@@ -58,7 +58,57 @@
Those urls in files that start with one of the excluded urls will be ignored.
Defaults to <code>pom.repository.url</code>.
</td>
- </tr>
+ </tr>
+
+
+ <tr>
+ <td>maven.linkcheck.proxy.host</td>
+ <td>Yes</td>
+ <td>
+ The IP or address of your proxy.
+ Defaults to <code>maven.proxy.host</code>.
+ </td>
+ </tr>
+ <tr>
+ <td>maven.linkcheck.proxy.port</td>
+ <td>Yes</td>
+ <td>
+ The port number of your proxy.
+ Defaults to <code>maven.proxy.port</code>.
+ </td>
+ </tr>
+ <tr>
+ <td>maven.linkcheck.proxy.username</td>
+ <td>Yes</td>
+ <td>
+ User name if your proxy requires authentication.
+ Defaults to <code>maven.proxy.username</code>.
+ </td>
+ </tr>
+ <tr>
+ <td>maven.linkcheck.proxy.password</td>
+ <td>Yes</td>
+ <td>
+ Password if your proxy requires authentication.
+ Defaults to <code>maven.proxy.password</code>.
+ </td>
+ </tr>
+ <tr>
+ <td>maven.linkcheck.proxy.ntlm.host</td>
+ <td>Yes</td>
+ <td>
+ The host to use if you are using NTLM authentication.
+ Defaults to <code>maven.proxy.ntlm.host</code>.
+ </td>
+ </tr>
+ <tr>
+ <td>maven.linkcheck.proxy.ntlm.domain</td>
+ <td>Yes</td>
+ <td>
+ The NT domain to use if you are using NTLM authentication.
+ Defaults to <code>maven.proxy.ntlm.domain</code>.
+ </td>
+ </tr>
</table>
</section>
</body>