[ 
http://jira.codehaus.org/browse/MSITE-211?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_106512
 ] 

Cyrille Le Clerc edited comment on MSITE-211 at 9/6/07 6:36 PM:
----------------------------------------------------------------

Here is a proposed "MSITE -211.patch" patch file that :
- get the proxy associated with the repository access protocol : 
wagonManager.getProxy( repository.getProtocol() )
- check that the reposotory host is not in proxy nonProxyHosts list
- SiteDeployMojoTest JUnit test case to test proxy selection

Fixing this bug in wagon instead of fixing it in maven-site-deploy would impact 
the Wagon signature.

Wagon currently ave two connect() signatures : one with ProxyInfo as parameter 
and another without. 
This implies that the calling the Wagon.connect(Repository, AuthenticationInfo, 
ProxyInfo) method will force usage of the given ProxyInfo even if the proxyInfo 
protocol or nonProxyHosts do not match. On the other side, 
Wagon.connect(Repository, AuthenticationInfo) implies that no proxyInfo will be 
deduced from settings.xml or POM.
Fixing MSTE-211 in Wagon would lead to the removal of these two Wagon.connect() 
methods to replace them with something like 
Wagon.connectPossiblyUsingProxy(Repository, AuthenticationInfo). Moreover, 
fixing MSITE-211 in Wagon would limit possible extensions of maven-site-plugin 
properties to override global proxy settings by a specific plugin specific 
proxy configuration.

Hope this helps,
Cyrille


 was:
Here is a proposed MSITE-211.patch patch file that :
- get the proxy associated with the repository access protocol : 
wagonManager.getProxy( repository.getProtocol() )
- check that the reposotory host is not in proxy nonProxyHosts list
- SiteDeployMojoTest JUnit test case to test proxy selection

Hope this helps,
Cyrille

> Can't deploy site using site:deploy due to a ProxyHTTP error
> ------------------------------------------------------------
>
>                 Key: MSITE-211
>                 URL: http://jira.codehaus.org/browse/MSITE-211
>             Project: Maven 2.x Site Plugin
>          Issue Type: Bug
>          Components: site:deploy
>    Affects Versions: 2.0-beta-5
>         Environment: linux ubuntu dapper drake
>            Reporter: Elid OR
>            Priority: Blocker
>         Attachments: MSITE-211.patch
>
>
> When I execute the site deployment (with version that comes with maven 2.0.5) 
> "mvn site:deploy " I got an error see log en debug mode below. This used to 
> work correctly with maven version 2.04 (so maybe site plugin version 
> 2.0-beta-4 :
> [INFO] 
> ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] Error uploading site
> Embedded error: Cannot connect. Reason: ProxyHTTP: java.io.IOException: proxy 
> error: Forbidden
> [INFO] 
> ------------------------------------------------------------------------
> [DEBUG] Trace
> org.apache.maven.lifecycle.LifecycleExecutionException: Error uploading site
>         at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:564)
>         at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:493)
>         at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:463)
>         at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311)
>         at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278)
>         at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:330)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:123)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:272)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:324)
>         at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>         at 
> org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> Caused by: org.apache.maven.plugin.MojoExecutionException: Error uploading 
> site
>         at 
> org.apache.maven.plugins.site.SiteDeployMojo.execute(SiteDeployMojo.java:184)
>         at 
> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:420)
>         at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539)
>         ... 16 more
> Caused by: org.apache.maven.wagon.authentication.AuthenticationException: 
> Cannot connect. Reason: ProxyHTTP: java.io.IOException: proxy error: 
> Forbidden
>         at 
> org.apache.maven.wagon.providers.ssh.jsch.AbstractJschWagon.openConnection(AbstractJschWagon.java:186)
>         at 
> org.apache.maven.wagon.AbstractWagon.connect(AbstractWagon.java:143)
>         at 
> org.apache.maven.plugins.site.SiteDeployMojo.execute(SiteDeployMojo.java:149)
>         ... 18 more
> Caused by: com.jcraft.jsch.JSchException: ProxyHTTP: java.io.IOException: 
> proxy error: Forbidden
>         at com.jcraft.jsch.ProxyHTTP.connect(Unknown Source)
>         at com.jcraft.jsch.Session.connect(Unknown Source)
>         at com.jcraft.jsch.Session.connect(Unknown Source)
>         at 
> org.apache.maven.wagon.providers.ssh.jsch.AbstractJschWagon.openConnection(AbstractJschWagon.java:158)
>         ... 20 more
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] Total time: 3 seconds
> [INFO] Finished at: Wed Feb 21 12:00:41 CET 2007
> [INFO] Final Memory: 3M/7M
> [INFO] 
> ------------------------------------------------------------------------

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to