You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ivy-commits@incubator.apache.org by "Nigel Charman (JIRA)" <ji...@apache.org> on 2007/06/21 08:20:26 UTC

[jira] Created: (IVY-529) Ivy:retrieve fails through proxy server

Ivy:retrieve fails through proxy server
---------------------------------------

                 Key: IVY-529
                 URL: https://issues.apache.org/jira/browse/IVY-529
             Project: Ivy
          Issue Type: Bug
          Components: Ant
    Affects Versions: 2.0.0-alpha-1
         Environment: Win XP, Ant 1.6.5, Java 5.  
            Reporter: Nigel Charman


I'm working at a site that connects to the net using a proxy server that requires authentication.

Our ant script uses the setproxy task to set the proxy details.  Calling the ivy:retrieve task after setproxy results in the error:

   [ivy:retrieve] :: problems summary ::
   [ivy:retrieve] :::: WARNINGS
   [ivy:retrieve]  Your proxy requires authentication.
   [ivy:retrieve]  Your proxy requires authentication.
   [ivy:retrieve]          module not found: [ commons-lang | commons-lang | 2.1 ]

However, there is a workaround.  Calling the get task before ivy:retrieve fixes the problem.

It appears that get must be doing something with the proxy details that ivy:retrieve is not.  Please can ivy:retrieve be updated to perform the authentication magic that get is doing?

I have managed to reproduce this with the hello ivy example.  The failing Ant Script contains:

    <target name="proxy">
            <property name="proxy.host" value="proxy.myorg.com"/>
            <property name="proxy.port" value="8080"/>
                <input message="Please enter proxy username" addproperty="proxy.user" />
                <input message="Please enter proxy password - NOTE: CLEAR TEXT" addproperty="proxy.pass"/>
            <setproxy proxyhost="${proxy.host}" proxyport="${proxy.port}" proxyuser="${proxy.user}" proxypassword="${proxy.pass}"/>
      </target>

    <!-- =================================
          target: resolve
         ================================= -->
    <target name="resolve" depends="proxy" description="--> retreive dependencies with ivy">
        <ivy:retrieve/>
    </target>

which produces the output

    resolve:
    [ivy:retrieve] :: Ivy 2.0.0-alpha-1-incubating - 20070416155158 :: 
    http://incubator.apache.org/ivy/ ::
    [ivy:retrieve] no settings file found, using default...
    [ivy:retrieve] :: loading settings :: url = jar:file:/C:/Program%20Files/Ant/lib/ivy-2.0.0-alpha-1-incubating.jar!/org/apache/ivy/core/settings/ivysettings.xml
    [ivy:retrieve] :: resolving dependencies :: [ apache | hello-ivy | working@hpac-keay47z ]
    [ivy:retrieve]  confs: [default]
    [ivy:retrieve] :: resolution report ::
     ---------------------------------------------------------------------
      |                  |            modules            ||   artifacts  |
      |       conf       | number| search|dwnlded|evicted|| number|dwnlded|
     ---------------------------------------------------------------------
      |      default     |   1   |   0   |   0   |   0   ||   0   |   0  
      |
     ---------------------------------------------------------------------
    [ivy:retrieve]
    [ivy:retrieve] :: problems summary ::
    [ivy:retrieve] :::: WARNINGS
    [ivy:retrieve]  Your proxy requires authentication.
    [ivy:retrieve]  Your proxy requires authentication.
    [ivy:retrieve]          module not found: [ commons-lang | commons-lang | 2.1 ]
    [ivy:retrieve]  ==== local: tried
    [ivy:retrieve]    C:\Documents and Settings\charmann\.ivy/local/commons-lang/commons-lang/2.1/ivys/ivy.xml
    [ivy:retrieve]    -- artifact [ commons-lang | commons-lang | 2.1 ]/commons-lang.jar[jar]:
    [ivy:retrieve]    C:\Documents and Settings\charmann\.ivy/local/commons-lang/commons-lang/2.1/jars/commons-lang.jar
    [ivy:retrieve]  ==== shared: tried [ivy:retrieve]    C:\Documents and Settings\charmann\.ivy/shared/commons-lang/commons-lang/2.1/ivys/ivy.xml
    [ivy:retrieve]    -- artifact [ commons-lang | commons-lang | 2.1 ]/commons-lang.jar[jar]:
    [ivy:retrieve]    C:\Documents and Settings\charmann\.ivy/shared/commons-lang/commons-lang/2.1/jars/commons-lang.jar
    [ivy:retrieve]  ==== public: tried[ivy:retrieve] http://repo1.maven.org/maven2/commons-lang/commons-lang/2.1/commons-lang-2.1.pom
    [ivy:retrieve]    -- artifact [ commons-lang | commons-lang | 2.1 ]/commons-lang.jar[jar]:
    [ivy:retrieve] http://repo1.maven.org/maven2/commons-lang/commons-lang/2.1/commons-lang-2.1.jar
    [ivy:retrieve]          ::::::::::::::::::::::::::::::::::::::::::::::
    [ivy:retrieve]          ::          UNRESOLVED DEPENDENCIES         ::
    [ivy:retrieve]          ::::::::::::::::::::::::::::::::::::::::::::::
    [ivy:retrieve]          :: [ commons-lang | commons-lang | 2.1 ]: not found
    [ivy:retrieve]          ::::::::::::::::::::::::::::::::::::::::::::::
    [ivy:retrieve]
    [ivy:retrieve]
    [ivy:retrieve] :: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS

    BUILD FAILED

Changing the ant script to include a get task fixes the problem:

        <target name="proxy">
            <property name="proxy.host" value="proxy.myorg.com"/>
            <property name="proxy.port" value="8080"/>
                <input message="Please enter proxy username" addproperty="proxy.user" />
                <input message="Please enter proxy password - NOTE: CLEAR TEXT" addproperty="proxy.pass"/>
            <setproxy proxyhost="${proxy.host}" proxyport="${proxy.port}" proxyuser="${proxy.user}" proxypassword="${proxy.pass}"/>
            <get src="http://www.google.co.nz" dest="temp.html" usetimestamp="true"/>
          </target>
 
    <!-- ================================= 
          target: resolve 
         ================================= -->
    <target name="resolve" depends="proxy" description="--> retreive dependencies with ivy">
        <ivy:retrieve/>
    </target> 

with the following output:

    resolve:
    [ivy:retrieve] :: Ivy 2.0.0-alpha-1-incubating - 20070416155158 :: http://incubator.apache.org/ivy/ ::
    [ivy:retrieve] no settings file found, using default...
    [ivy:retrieve] :: loading settings :: url = jar:file:/C:/Program%20Files/Ant/lib/ivy-2.0.0-alpha-1-incubating.jar!/org/apache/ivy/core/settings/ivysettings.xml
    [ivy:retrieve] :: resolving dependencies :: [ apache | hello-ivy | working@h097-kea ]
    [ivy:retrieve]  confs: [default]
    [ivy:retrieve]  found [ commons-lang | commons-lang | 2.1 ] in public
    [ivy:retrieve] downloading http://repo1.maven.org/maven2/commons-lang/commons-lang/2.1/commons-lang-2.1.jar ...
    [ivy:retrieve] ..................
    [ivy:retrieve] .................................... (202kB)
    [ivy:retrieve] .. (0kB)
    [ivy:retrieve]  [SUCCESSFUL ] [ commons-lang | commons-lang | 2.1 ]/commons-lang.jar[jar] (6923ms)
    [ivy:retrieve] :: resolution report ::
     ---------------------------------------------------------------------
        |                  |            modules            ||   artifacts  |
        |       conf       | number| search|dwnlded|evicted|| number|dwnlded|
     ---------------------------------------------------------------------
        |      default     |   1   |   1   |   0   |   0   ||   1   |   1  |
     ---------------------------------------------------------------------
    [ivy:retrieve] :: retrieving :: [ apache | hello-ivy ]
    [ivy:retrieve]  confs: [default]
    [ivy:retrieve]  1 artifacts copied, 0 already retrieved

    run:
         [java] standard message : hello ivy !
         [java] capitalized by org.apache.commons.lang.WordUtils : Hello Ivy !

    BUILD SUCCESSFUL


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (IVY-529) Ivy:retrieve fails through proxy server

Posted by "Maarten Coene (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/IVY-529?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Maarten Coene resolved IVY-529.
-------------------------------

       Resolution: Fixed
    Fix Version/s:     (was: 2.0)
                   2.0.0-beta-1
         Assignee: Maarten Coene

I think I've fixed it, but I couldn't properly test it because I don't have a proxy server which requires authentication.
Can you try with the latest trunk and reopen this issue if it is still not working?

Maarten

> Ivy:retrieve fails through proxy server
> ---------------------------------------
>
>                 Key: IVY-529
>                 URL: https://issues.apache.org/jira/browse/IVY-529
>             Project: Ivy
>          Issue Type: Bug
>          Components: Ant
>    Affects Versions: 2.0.0-alpha-1
>         Environment: Win XP, Ant 1.6.5, Java 5.  
>            Reporter: Nigel Charman
>            Assignee: Maarten Coene
>             Fix For: 2.0.0-beta-1
>
>
> I'm working at a site that connects to the net using a proxy server that requires authentication.
> Our ant script uses the setproxy task to set the proxy details.  Calling the ivy:retrieve task after setproxy results in the error:
>    [ivy:retrieve] :: problems summary ::
>    [ivy:retrieve] :::: WARNINGS
>    [ivy:retrieve]  Your proxy requires authentication.
>    [ivy:retrieve]  Your proxy requires authentication.
>    [ivy:retrieve]          module not found: [ commons-lang | commons-lang | 2.1 ]
> However, there is a workaround.  Calling the get task before ivy:retrieve fixes the problem.
> It appears that get must be doing something with the proxy details that ivy:retrieve is not.  Please can ivy:retrieve be updated to perform the authentication magic that get is doing?
> I have managed to reproduce this with the hello ivy example.  The failing Ant Script contains:
>     <target name="proxy">
>             <property name="proxy.host" value="proxy.myorg.com"/>
>             <property name="proxy.port" value="8080"/>
>                 <input message="Please enter proxy username" addproperty="proxy.user" />
>                 <input message="Please enter proxy password - NOTE: CLEAR TEXT" addproperty="proxy.pass"/>
>             <setproxy proxyhost="${proxy.host}" proxyport="${proxy.port}" proxyuser="${proxy.user}" proxypassword="${proxy.pass}"/>
>       </target>
>     <!-- =================================
>           target: resolve
>          ================================= -->
>     <target name="resolve" depends="proxy" description="--> retreive dependencies with ivy">
>         <ivy:retrieve/>
>     </target>
> which produces the output
>     resolve:
>     [ivy:retrieve] :: Ivy 2.0.0-alpha-1-incubating - 20070416155158 :: 
>     http://incubator.apache.org/ivy/ ::
>     [ivy:retrieve] no settings file found, using default...
>     [ivy:retrieve] :: loading settings :: url = jar:file:/C:/Program%20Files/Ant/lib/ivy-2.0.0-alpha-1-incubating.jar!/org/apache/ivy/core/settings/ivysettings.xml
>     [ivy:retrieve] :: resolving dependencies :: [ apache | hello-ivy | working@hpac-keay47z ]
>     [ivy:retrieve]  confs: [default]
>     [ivy:retrieve] :: resolution report ::
>      ---------------------------------------------------------------------
>       |                  |            modules            ||   artifacts  |
>       |       conf       | number| search|dwnlded|evicted|| number|dwnlded|
>      ---------------------------------------------------------------------
>       |      default     |   1   |   0   |   0   |   0   ||   0   |   0  
>       |
>      ---------------------------------------------------------------------
>     [ivy:retrieve]
>     [ivy:retrieve] :: problems summary ::
>     [ivy:retrieve] :::: WARNINGS
>     [ivy:retrieve]  Your proxy requires authentication.
>     [ivy:retrieve]  Your proxy requires authentication.
>     [ivy:retrieve]          module not found: [ commons-lang | commons-lang | 2.1 ]
>     [ivy:retrieve]  ==== local: tried
>     [ivy:retrieve]    C:\Documents and Settings\charmann\.ivy/local/commons-lang/commons-lang/2.1/ivys/ivy.xml
>     [ivy:retrieve]    -- artifact [ commons-lang | commons-lang | 2.1 ]/commons-lang.jar[jar]:
>     [ivy:retrieve]    C:\Documents and Settings\charmann\.ivy/local/commons-lang/commons-lang/2.1/jars/commons-lang.jar
>     [ivy:retrieve]  ==== shared: tried [ivy:retrieve]    C:\Documents and Settings\charmann\.ivy/shared/commons-lang/commons-lang/2.1/ivys/ivy.xml
>     [ivy:retrieve]    -- artifact [ commons-lang | commons-lang | 2.1 ]/commons-lang.jar[jar]:
>     [ivy:retrieve]    C:\Documents and Settings\charmann\.ivy/shared/commons-lang/commons-lang/2.1/jars/commons-lang.jar
>     [ivy:retrieve]  ==== public: tried[ivy:retrieve] http://repo1.maven.org/maven2/commons-lang/commons-lang/2.1/commons-lang-2.1.pom
>     [ivy:retrieve]    -- artifact [ commons-lang | commons-lang | 2.1 ]/commons-lang.jar[jar]:
>     [ivy:retrieve] http://repo1.maven.org/maven2/commons-lang/commons-lang/2.1/commons-lang-2.1.jar
>     [ivy:retrieve]          ::::::::::::::::::::::::::::::::::::::::::::::
>     [ivy:retrieve]          ::          UNRESOLVED DEPENDENCIES         ::
>     [ivy:retrieve]          ::::::::::::::::::::::::::::::::::::::::::::::
>     [ivy:retrieve]          :: [ commons-lang | commons-lang | 2.1 ]: not found
>     [ivy:retrieve]          ::::::::::::::::::::::::::::::::::::::::::::::
>     [ivy:retrieve]
>     [ivy:retrieve]
>     [ivy:retrieve] :: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS
>     BUILD FAILED
> Changing the ant script to include a get task fixes the problem:
>         <target name="proxy">
>             <property name="proxy.host" value="proxy.myorg.com"/>
>             <property name="proxy.port" value="8080"/>
>                 <input message="Please enter proxy username" addproperty="proxy.user" />
>                 <input message="Please enter proxy password - NOTE: CLEAR TEXT" addproperty="proxy.pass"/>
>             <setproxy proxyhost="${proxy.host}" proxyport="${proxy.port}" proxyuser="${proxy.user}" proxypassword="${proxy.pass}"/>
>             <get src="http://www.google.co.nz" dest="temp.html" usetimestamp="true"/>
>           </target>
>  
>     <!-- ================================= 
>           target: resolve 
>          ================================= -->
>     <target name="resolve" depends="proxy" description="--> retreive dependencies with ivy">
>         <ivy:retrieve/>
>     </target> 
> with the following output:
>     resolve:
>     [ivy:retrieve] :: Ivy 2.0.0-alpha-1-incubating - 20070416155158 :: http://incubator.apache.org/ivy/ ::
>     [ivy:retrieve] no settings file found, using default...
>     [ivy:retrieve] :: loading settings :: url = jar:file:/C:/Program%20Files/Ant/lib/ivy-2.0.0-alpha-1-incubating.jar!/org/apache/ivy/core/settings/ivysettings.xml
>     [ivy:retrieve] :: resolving dependencies :: [ apache | hello-ivy | working@h097-kea ]
>     [ivy:retrieve]  confs: [default]
>     [ivy:retrieve]  found [ commons-lang | commons-lang | 2.1 ] in public
>     [ivy:retrieve] downloading http://repo1.maven.org/maven2/commons-lang/commons-lang/2.1/commons-lang-2.1.jar ...
>     [ivy:retrieve] ..................
>     [ivy:retrieve] .................................... (202kB)
>     [ivy:retrieve] .. (0kB)
>     [ivy:retrieve]  [SUCCESSFUL ] [ commons-lang | commons-lang | 2.1 ]/commons-lang.jar[jar] (6923ms)
>     [ivy:retrieve] :: resolution report ::
>      ---------------------------------------------------------------------
>         |                  |            modules            ||   artifacts  |
>         |       conf       | number| search|dwnlded|evicted|| number|dwnlded|
>      ---------------------------------------------------------------------
>         |      default     |   1   |   1   |   0   |   0   ||   1   |   1  |
>      ---------------------------------------------------------------------
>     [ivy:retrieve] :: retrieving :: [ apache | hello-ivy ]
>     [ivy:retrieve]  confs: [default]
>     [ivy:retrieve]  1 artifacts copied, 0 already retrieved
>     run:
>          [java] standard message : hello ivy !
>          [java] capitalized by org.apache.commons.lang.WordUtils : Hello Ivy !
>     BUILD SUCCESSFUL

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (IVY-529) Ivy:retrieve fails through proxy server

Posted by "James P. White (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/IVY-529?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12519771 ] 

James P. White commented on IVY-529:
------------------------------------

Eyeballing the code shows that Ant's SetProxy task just sets the system properties, so that should be good for both approaches.

The Ant Get task is doing a lot less work than ivy:retreive as it simply does a URL.openConnection(), so the problem must lie either in Commons HttpClient or, more likely, Ivy's org.apache.ivy.util.url.HttpClientHandler.    Something that looks mildly suspicious (although perhaps is correct) is:

            if (status == HttpStatus.SC_PROXY_AUTHENTICATION_REQUIRED) {
                Message.error("Your proxy requires authentication.");

You should run Ant with verbose logging enabled for Ivy tasks and look to see that the proxy configuration is at least being picked up by HttpClientHandler properly.

These notes are relevant of course, although probably not too helpful:
http://ant.apache.org/manual/install.html#proxy


> Ivy:retrieve fails through proxy server
> ---------------------------------------
>
>                 Key: IVY-529
>                 URL: https://issues.apache.org/jira/browse/IVY-529
>             Project: Ivy
>          Issue Type: Bug
>          Components: Ant
>    Affects Versions: 2.0.0-alpha-1
>         Environment: Win XP, Ant 1.6.5, Java 5.  
>            Reporter: Nigel Charman
>             Fix For: 2.0
>
>
> I'm working at a site that connects to the net using a proxy server that requires authentication.
> Our ant script uses the setproxy task to set the proxy details.  Calling the ivy:retrieve task after setproxy results in the error:
>    [ivy:retrieve] :: problems summary ::
>    [ivy:retrieve] :::: WARNINGS
>    [ivy:retrieve]  Your proxy requires authentication.
>    [ivy:retrieve]  Your proxy requires authentication.
>    [ivy:retrieve]          module not found: [ commons-lang | commons-lang | 2.1 ]
> However, there is a workaround.  Calling the get task before ivy:retrieve fixes the problem.
> It appears that get must be doing something with the proxy details that ivy:retrieve is not.  Please can ivy:retrieve be updated to perform the authentication magic that get is doing?
> I have managed to reproduce this with the hello ivy example.  The failing Ant Script contains:
>     <target name="proxy">
>             <property name="proxy.host" value="proxy.myorg.com"/>
>             <property name="proxy.port" value="8080"/>
>                 <input message="Please enter proxy username" addproperty="proxy.user" />
>                 <input message="Please enter proxy password - NOTE: CLEAR TEXT" addproperty="proxy.pass"/>
>             <setproxy proxyhost="${proxy.host}" proxyport="${proxy.port}" proxyuser="${proxy.user}" proxypassword="${proxy.pass}"/>
>       </target>
>     <!-- =================================
>           target: resolve
>          ================================= -->
>     <target name="resolve" depends="proxy" description="--> retreive dependencies with ivy">
>         <ivy:retrieve/>
>     </target>
> which produces the output
>     resolve:
>     [ivy:retrieve] :: Ivy 2.0.0-alpha-1-incubating - 20070416155158 :: 
>     http://incubator.apache.org/ivy/ ::
>     [ivy:retrieve] no settings file found, using default...
>     [ivy:retrieve] :: loading settings :: url = jar:file:/C:/Program%20Files/Ant/lib/ivy-2.0.0-alpha-1-incubating.jar!/org/apache/ivy/core/settings/ivysettings.xml
>     [ivy:retrieve] :: resolving dependencies :: [ apache | hello-ivy | working@hpac-keay47z ]
>     [ivy:retrieve]  confs: [default]
>     [ivy:retrieve] :: resolution report ::
>      ---------------------------------------------------------------------
>       |                  |            modules            ||   artifacts  |
>       |       conf       | number| search|dwnlded|evicted|| number|dwnlded|
>      ---------------------------------------------------------------------
>       |      default     |   1   |   0   |   0   |   0   ||   0   |   0  
>       |
>      ---------------------------------------------------------------------
>     [ivy:retrieve]
>     [ivy:retrieve] :: problems summary ::
>     [ivy:retrieve] :::: WARNINGS
>     [ivy:retrieve]  Your proxy requires authentication.
>     [ivy:retrieve]  Your proxy requires authentication.
>     [ivy:retrieve]          module not found: [ commons-lang | commons-lang | 2.1 ]
>     [ivy:retrieve]  ==== local: tried
>     [ivy:retrieve]    C:\Documents and Settings\charmann\.ivy/local/commons-lang/commons-lang/2.1/ivys/ivy.xml
>     [ivy:retrieve]    -- artifact [ commons-lang | commons-lang | 2.1 ]/commons-lang.jar[jar]:
>     [ivy:retrieve]    C:\Documents and Settings\charmann\.ivy/local/commons-lang/commons-lang/2.1/jars/commons-lang.jar
>     [ivy:retrieve]  ==== shared: tried [ivy:retrieve]    C:\Documents and Settings\charmann\.ivy/shared/commons-lang/commons-lang/2.1/ivys/ivy.xml
>     [ivy:retrieve]    -- artifact [ commons-lang | commons-lang | 2.1 ]/commons-lang.jar[jar]:
>     [ivy:retrieve]    C:\Documents and Settings\charmann\.ivy/shared/commons-lang/commons-lang/2.1/jars/commons-lang.jar
>     [ivy:retrieve]  ==== public: tried[ivy:retrieve] http://repo1.maven.org/maven2/commons-lang/commons-lang/2.1/commons-lang-2.1.pom
>     [ivy:retrieve]    -- artifact [ commons-lang | commons-lang | 2.1 ]/commons-lang.jar[jar]:
>     [ivy:retrieve] http://repo1.maven.org/maven2/commons-lang/commons-lang/2.1/commons-lang-2.1.jar
>     [ivy:retrieve]          ::::::::::::::::::::::::::::::::::::::::::::::
>     [ivy:retrieve]          ::          UNRESOLVED DEPENDENCIES         ::
>     [ivy:retrieve]          ::::::::::::::::::::::::::::::::::::::::::::::
>     [ivy:retrieve]          :: [ commons-lang | commons-lang | 2.1 ]: not found
>     [ivy:retrieve]          ::::::::::::::::::::::::::::::::::::::::::::::
>     [ivy:retrieve]
>     [ivy:retrieve]
>     [ivy:retrieve] :: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS
>     BUILD FAILED
> Changing the ant script to include a get task fixes the problem:
>         <target name="proxy">
>             <property name="proxy.host" value="proxy.myorg.com"/>
>             <property name="proxy.port" value="8080"/>
>                 <input message="Please enter proxy username" addproperty="proxy.user" />
>                 <input message="Please enter proxy password - NOTE: CLEAR TEXT" addproperty="proxy.pass"/>
>             <setproxy proxyhost="${proxy.host}" proxyport="${proxy.port}" proxyuser="${proxy.user}" proxypassword="${proxy.pass}"/>
>             <get src="http://www.google.co.nz" dest="temp.html" usetimestamp="true"/>
>           </target>
>  
>     <!-- ================================= 
>           target: resolve 
>          ================================= -->
>     <target name="resolve" depends="proxy" description="--> retreive dependencies with ivy">
>         <ivy:retrieve/>
>     </target> 
> with the following output:
>     resolve:
>     [ivy:retrieve] :: Ivy 2.0.0-alpha-1-incubating - 20070416155158 :: http://incubator.apache.org/ivy/ ::
>     [ivy:retrieve] no settings file found, using default...
>     [ivy:retrieve] :: loading settings :: url = jar:file:/C:/Program%20Files/Ant/lib/ivy-2.0.0-alpha-1-incubating.jar!/org/apache/ivy/core/settings/ivysettings.xml
>     [ivy:retrieve] :: resolving dependencies :: [ apache | hello-ivy | working@h097-kea ]
>     [ivy:retrieve]  confs: [default]
>     [ivy:retrieve]  found [ commons-lang | commons-lang | 2.1 ] in public
>     [ivy:retrieve] downloading http://repo1.maven.org/maven2/commons-lang/commons-lang/2.1/commons-lang-2.1.jar ...
>     [ivy:retrieve] ..................
>     [ivy:retrieve] .................................... (202kB)
>     [ivy:retrieve] .. (0kB)
>     [ivy:retrieve]  [SUCCESSFUL ] [ commons-lang | commons-lang | 2.1 ]/commons-lang.jar[jar] (6923ms)
>     [ivy:retrieve] :: resolution report ::
>      ---------------------------------------------------------------------
>         |                  |            modules            ||   artifacts  |
>         |       conf       | number| search|dwnlded|evicted|| number|dwnlded|
>      ---------------------------------------------------------------------
>         |      default     |   1   |   1   |   0   |   0   ||   1   |   1  |
>      ---------------------------------------------------------------------
>     [ivy:retrieve] :: retrieving :: [ apache | hello-ivy ]
>     [ivy:retrieve]  confs: [default]
>     [ivy:retrieve]  1 artifacts copied, 0 already retrieved
>     run:
>          [java] standard message : hello ivy !
>          [java] capitalized by org.apache.commons.lang.WordUtils : Hello Ivy !
>     BUILD SUCCESSFUL

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (IVY-529) Ivy:retrieve fails through proxy server

Posted by "Steve Loughran (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/IVY-529?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12520197 ] 

Steve Loughran commented on IVY-529:
------------------------------------

1. <get> does no magic. I know this, having written a lot of it :)
2. <setproxy> does nothing special either. I know this, having written all of it :)
3. Look at  http://ant.apache.org/manual/proxy.html for the details of how Ant works with proxies. 
4. There is even more up to date commentary in the next release of this document
http://svn.apache.org/viewvc/ant/core/trunk/docs/manual/proxy.html?revision=528522

this document is, AFAIK, the best docs out there on the subject of JVM proxies, including information gained by email discussion with Sun people.

1. the best way to do proxy setup is in ANT_ARGS; set the values, leave them as is

2. Maybe httpclient isnt picking things up. When I used httpclient in the past, I had to configure its own proxy class. this makes sense as (a) system properties are flawed (JVM-wide, etc), and the java5 proxy classes are java5 only. 

-steve

'official maintainer of proxy support in ant'


> Ivy:retrieve fails through proxy server
> ---------------------------------------
>
>                 Key: IVY-529
>                 URL: https://issues.apache.org/jira/browse/IVY-529
>             Project: Ivy
>          Issue Type: Bug
>          Components: Ant
>    Affects Versions: 2.0.0-alpha-1
>         Environment: Win XP, Ant 1.6.5, Java 5.  
>            Reporter: Nigel Charman
>             Fix For: 2.0
>
>
> I'm working at a site that connects to the net using a proxy server that requires authentication.
> Our ant script uses the setproxy task to set the proxy details.  Calling the ivy:retrieve task after setproxy results in the error:
>    [ivy:retrieve] :: problems summary ::
>    [ivy:retrieve] :::: WARNINGS
>    [ivy:retrieve]  Your proxy requires authentication.
>    [ivy:retrieve]  Your proxy requires authentication.
>    [ivy:retrieve]          module not found: [ commons-lang | commons-lang | 2.1 ]
> However, there is a workaround.  Calling the get task before ivy:retrieve fixes the problem.
> It appears that get must be doing something with the proxy details that ivy:retrieve is not.  Please can ivy:retrieve be updated to perform the authentication magic that get is doing?
> I have managed to reproduce this with the hello ivy example.  The failing Ant Script contains:
>     <target name="proxy">
>             <property name="proxy.host" value="proxy.myorg.com"/>
>             <property name="proxy.port" value="8080"/>
>                 <input message="Please enter proxy username" addproperty="proxy.user" />
>                 <input message="Please enter proxy password - NOTE: CLEAR TEXT" addproperty="proxy.pass"/>
>             <setproxy proxyhost="${proxy.host}" proxyport="${proxy.port}" proxyuser="${proxy.user}" proxypassword="${proxy.pass}"/>
>       </target>
>     <!-- =================================
>           target: resolve
>          ================================= -->
>     <target name="resolve" depends="proxy" description="--> retreive dependencies with ivy">
>         <ivy:retrieve/>
>     </target>
> which produces the output
>     resolve:
>     [ivy:retrieve] :: Ivy 2.0.0-alpha-1-incubating - 20070416155158 :: 
>     http://incubator.apache.org/ivy/ ::
>     [ivy:retrieve] no settings file found, using default...
>     [ivy:retrieve] :: loading settings :: url = jar:file:/C:/Program%20Files/Ant/lib/ivy-2.0.0-alpha-1-incubating.jar!/org/apache/ivy/core/settings/ivysettings.xml
>     [ivy:retrieve] :: resolving dependencies :: [ apache | hello-ivy | working@hpac-keay47z ]
>     [ivy:retrieve]  confs: [default]
>     [ivy:retrieve] :: resolution report ::
>      ---------------------------------------------------------------------
>       |                  |            modules            ||   artifacts  |
>       |       conf       | number| search|dwnlded|evicted|| number|dwnlded|
>      ---------------------------------------------------------------------
>       |      default     |   1   |   0   |   0   |   0   ||   0   |   0  
>       |
>      ---------------------------------------------------------------------
>     [ivy:retrieve]
>     [ivy:retrieve] :: problems summary ::
>     [ivy:retrieve] :::: WARNINGS
>     [ivy:retrieve]  Your proxy requires authentication.
>     [ivy:retrieve]  Your proxy requires authentication.
>     [ivy:retrieve]          module not found: [ commons-lang | commons-lang | 2.1 ]
>     [ivy:retrieve]  ==== local: tried
>     [ivy:retrieve]    C:\Documents and Settings\charmann\.ivy/local/commons-lang/commons-lang/2.1/ivys/ivy.xml
>     [ivy:retrieve]    -- artifact [ commons-lang | commons-lang | 2.1 ]/commons-lang.jar[jar]:
>     [ivy:retrieve]    C:\Documents and Settings\charmann\.ivy/local/commons-lang/commons-lang/2.1/jars/commons-lang.jar
>     [ivy:retrieve]  ==== shared: tried [ivy:retrieve]    C:\Documents and Settings\charmann\.ivy/shared/commons-lang/commons-lang/2.1/ivys/ivy.xml
>     [ivy:retrieve]    -- artifact [ commons-lang | commons-lang | 2.1 ]/commons-lang.jar[jar]:
>     [ivy:retrieve]    C:\Documents and Settings\charmann\.ivy/shared/commons-lang/commons-lang/2.1/jars/commons-lang.jar
>     [ivy:retrieve]  ==== public: tried[ivy:retrieve] http://repo1.maven.org/maven2/commons-lang/commons-lang/2.1/commons-lang-2.1.pom
>     [ivy:retrieve]    -- artifact [ commons-lang | commons-lang | 2.1 ]/commons-lang.jar[jar]:
>     [ivy:retrieve] http://repo1.maven.org/maven2/commons-lang/commons-lang/2.1/commons-lang-2.1.jar
>     [ivy:retrieve]          ::::::::::::::::::::::::::::::::::::::::::::::
>     [ivy:retrieve]          ::          UNRESOLVED DEPENDENCIES         ::
>     [ivy:retrieve]          ::::::::::::::::::::::::::::::::::::::::::::::
>     [ivy:retrieve]          :: [ commons-lang | commons-lang | 2.1 ]: not found
>     [ivy:retrieve]          ::::::::::::::::::::::::::::::::::::::::::::::
>     [ivy:retrieve]
>     [ivy:retrieve]
>     [ivy:retrieve] :: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS
>     BUILD FAILED
> Changing the ant script to include a get task fixes the problem:
>         <target name="proxy">
>             <property name="proxy.host" value="proxy.myorg.com"/>
>             <property name="proxy.port" value="8080"/>
>                 <input message="Please enter proxy username" addproperty="proxy.user" />
>                 <input message="Please enter proxy password - NOTE: CLEAR TEXT" addproperty="proxy.pass"/>
>             <setproxy proxyhost="${proxy.host}" proxyport="${proxy.port}" proxyuser="${proxy.user}" proxypassword="${proxy.pass}"/>
>             <get src="http://www.google.co.nz" dest="temp.html" usetimestamp="true"/>
>           </target>
>  
>     <!-- ================================= 
>           target: resolve 
>          ================================= -->
>     <target name="resolve" depends="proxy" description="--> retreive dependencies with ivy">
>         <ivy:retrieve/>
>     </target> 
> with the following output:
>     resolve:
>     [ivy:retrieve] :: Ivy 2.0.0-alpha-1-incubating - 20070416155158 :: http://incubator.apache.org/ivy/ ::
>     [ivy:retrieve] no settings file found, using default...
>     [ivy:retrieve] :: loading settings :: url = jar:file:/C:/Program%20Files/Ant/lib/ivy-2.0.0-alpha-1-incubating.jar!/org/apache/ivy/core/settings/ivysettings.xml
>     [ivy:retrieve] :: resolving dependencies :: [ apache | hello-ivy | working@h097-kea ]
>     [ivy:retrieve]  confs: [default]
>     [ivy:retrieve]  found [ commons-lang | commons-lang | 2.1 ] in public
>     [ivy:retrieve] downloading http://repo1.maven.org/maven2/commons-lang/commons-lang/2.1/commons-lang-2.1.jar ...
>     [ivy:retrieve] ..................
>     [ivy:retrieve] .................................... (202kB)
>     [ivy:retrieve] .. (0kB)
>     [ivy:retrieve]  [SUCCESSFUL ] [ commons-lang | commons-lang | 2.1 ]/commons-lang.jar[jar] (6923ms)
>     [ivy:retrieve] :: resolution report ::
>      ---------------------------------------------------------------------
>         |                  |            modules            ||   artifacts  |
>         |       conf       | number| search|dwnlded|evicted|| number|dwnlded|
>      ---------------------------------------------------------------------
>         |      default     |   1   |   1   |   0   |   0   ||   1   |   1  |
>      ---------------------------------------------------------------------
>     [ivy:retrieve] :: retrieving :: [ apache | hello-ivy ]
>     [ivy:retrieve]  confs: [default]
>     [ivy:retrieve]  1 artifacts copied, 0 already retrieved
>     run:
>          [java] standard message : hello ivy !
>          [java] capitalized by org.apache.commons.lang.WordUtils : Hello Ivy !
>     BUILD SUCCESSFUL

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (IVY-529) Ivy:retrieve fails through proxy server

Posted by "Gilles Scokart (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/IVY-529?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gilles Scokart updated IVY-529:
-------------------------------

    Fix Version/s: 2.0

> Ivy:retrieve fails through proxy server
> ---------------------------------------
>
>                 Key: IVY-529
>                 URL: https://issues.apache.org/jira/browse/IVY-529
>             Project: Ivy
>          Issue Type: Bug
>          Components: Ant
>    Affects Versions: 2.0.0-alpha-1
>         Environment: Win XP, Ant 1.6.5, Java 5.  
>            Reporter: Nigel Charman
>             Fix For: 2.0
>
>
> I'm working at a site that connects to the net using a proxy server that requires authentication.
> Our ant script uses the setproxy task to set the proxy details.  Calling the ivy:retrieve task after setproxy results in the error:
>    [ivy:retrieve] :: problems summary ::
>    [ivy:retrieve] :::: WARNINGS
>    [ivy:retrieve]  Your proxy requires authentication.
>    [ivy:retrieve]  Your proxy requires authentication.
>    [ivy:retrieve]          module not found: [ commons-lang | commons-lang | 2.1 ]
> However, there is a workaround.  Calling the get task before ivy:retrieve fixes the problem.
> It appears that get must be doing something with the proxy details that ivy:retrieve is not.  Please can ivy:retrieve be updated to perform the authentication magic that get is doing?
> I have managed to reproduce this with the hello ivy example.  The failing Ant Script contains:
>     <target name="proxy">
>             <property name="proxy.host" value="proxy.myorg.com"/>
>             <property name="proxy.port" value="8080"/>
>                 <input message="Please enter proxy username" addproperty="proxy.user" />
>                 <input message="Please enter proxy password - NOTE: CLEAR TEXT" addproperty="proxy.pass"/>
>             <setproxy proxyhost="${proxy.host}" proxyport="${proxy.port}" proxyuser="${proxy.user}" proxypassword="${proxy.pass}"/>
>       </target>
>     <!-- =================================
>           target: resolve
>          ================================= -->
>     <target name="resolve" depends="proxy" description="--> retreive dependencies with ivy">
>         <ivy:retrieve/>
>     </target>
> which produces the output
>     resolve:
>     [ivy:retrieve] :: Ivy 2.0.0-alpha-1-incubating - 20070416155158 :: 
>     http://incubator.apache.org/ivy/ ::
>     [ivy:retrieve] no settings file found, using default...
>     [ivy:retrieve] :: loading settings :: url = jar:file:/C:/Program%20Files/Ant/lib/ivy-2.0.0-alpha-1-incubating.jar!/org/apache/ivy/core/settings/ivysettings.xml
>     [ivy:retrieve] :: resolving dependencies :: [ apache | hello-ivy | working@hpac-keay47z ]
>     [ivy:retrieve]  confs: [default]
>     [ivy:retrieve] :: resolution report ::
>      ---------------------------------------------------------------------
>       |                  |            modules            ||   artifacts  |
>       |       conf       | number| search|dwnlded|evicted|| number|dwnlded|
>      ---------------------------------------------------------------------
>       |      default     |   1   |   0   |   0   |   0   ||   0   |   0  
>       |
>      ---------------------------------------------------------------------
>     [ivy:retrieve]
>     [ivy:retrieve] :: problems summary ::
>     [ivy:retrieve] :::: WARNINGS
>     [ivy:retrieve]  Your proxy requires authentication.
>     [ivy:retrieve]  Your proxy requires authentication.
>     [ivy:retrieve]          module not found: [ commons-lang | commons-lang | 2.1 ]
>     [ivy:retrieve]  ==== local: tried
>     [ivy:retrieve]    C:\Documents and Settings\charmann\.ivy/local/commons-lang/commons-lang/2.1/ivys/ivy.xml
>     [ivy:retrieve]    -- artifact [ commons-lang | commons-lang | 2.1 ]/commons-lang.jar[jar]:
>     [ivy:retrieve]    C:\Documents and Settings\charmann\.ivy/local/commons-lang/commons-lang/2.1/jars/commons-lang.jar
>     [ivy:retrieve]  ==== shared: tried [ivy:retrieve]    C:\Documents and Settings\charmann\.ivy/shared/commons-lang/commons-lang/2.1/ivys/ivy.xml
>     [ivy:retrieve]    -- artifact [ commons-lang | commons-lang | 2.1 ]/commons-lang.jar[jar]:
>     [ivy:retrieve]    C:\Documents and Settings\charmann\.ivy/shared/commons-lang/commons-lang/2.1/jars/commons-lang.jar
>     [ivy:retrieve]  ==== public: tried[ivy:retrieve] http://repo1.maven.org/maven2/commons-lang/commons-lang/2.1/commons-lang-2.1.pom
>     [ivy:retrieve]    -- artifact [ commons-lang | commons-lang | 2.1 ]/commons-lang.jar[jar]:
>     [ivy:retrieve] http://repo1.maven.org/maven2/commons-lang/commons-lang/2.1/commons-lang-2.1.jar
>     [ivy:retrieve]          ::::::::::::::::::::::::::::::::::::::::::::::
>     [ivy:retrieve]          ::          UNRESOLVED DEPENDENCIES         ::
>     [ivy:retrieve]          ::::::::::::::::::::::::::::::::::::::::::::::
>     [ivy:retrieve]          :: [ commons-lang | commons-lang | 2.1 ]: not found
>     [ivy:retrieve]          ::::::::::::::::::::::::::::::::::::::::::::::
>     [ivy:retrieve]
>     [ivy:retrieve]
>     [ivy:retrieve] :: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS
>     BUILD FAILED
> Changing the ant script to include a get task fixes the problem:
>         <target name="proxy">
>             <property name="proxy.host" value="proxy.myorg.com"/>
>             <property name="proxy.port" value="8080"/>
>                 <input message="Please enter proxy username" addproperty="proxy.user" />
>                 <input message="Please enter proxy password - NOTE: CLEAR TEXT" addproperty="proxy.pass"/>
>             <setproxy proxyhost="${proxy.host}" proxyport="${proxy.port}" proxyuser="${proxy.user}" proxypassword="${proxy.pass}"/>
>             <get src="http://www.google.co.nz" dest="temp.html" usetimestamp="true"/>
>           </target>
>  
>     <!-- ================================= 
>           target: resolve 
>          ================================= -->
>     <target name="resolve" depends="proxy" description="--> retreive dependencies with ivy">
>         <ivy:retrieve/>
>     </target> 
> with the following output:
>     resolve:
>     [ivy:retrieve] :: Ivy 2.0.0-alpha-1-incubating - 20070416155158 :: http://incubator.apache.org/ivy/ ::
>     [ivy:retrieve] no settings file found, using default...
>     [ivy:retrieve] :: loading settings :: url = jar:file:/C:/Program%20Files/Ant/lib/ivy-2.0.0-alpha-1-incubating.jar!/org/apache/ivy/core/settings/ivysettings.xml
>     [ivy:retrieve] :: resolving dependencies :: [ apache | hello-ivy | working@h097-kea ]
>     [ivy:retrieve]  confs: [default]
>     [ivy:retrieve]  found [ commons-lang | commons-lang | 2.1 ] in public
>     [ivy:retrieve] downloading http://repo1.maven.org/maven2/commons-lang/commons-lang/2.1/commons-lang-2.1.jar ...
>     [ivy:retrieve] ..................
>     [ivy:retrieve] .................................... (202kB)
>     [ivy:retrieve] .. (0kB)
>     [ivy:retrieve]  [SUCCESSFUL ] [ commons-lang | commons-lang | 2.1 ]/commons-lang.jar[jar] (6923ms)
>     [ivy:retrieve] :: resolution report ::
>      ---------------------------------------------------------------------
>         |                  |            modules            ||   artifacts  |
>         |       conf       | number| search|dwnlded|evicted|| number|dwnlded|
>      ---------------------------------------------------------------------
>         |      default     |   1   |   1   |   0   |   0   ||   1   |   1  |
>      ---------------------------------------------------------------------
>     [ivy:retrieve] :: retrieving :: [ apache | hello-ivy ]
>     [ivy:retrieve]  confs: [default]
>     [ivy:retrieve]  1 artifacts copied, 0 already retrieved
>     run:
>          [java] standard message : hello ivy !
>          [java] capitalized by org.apache.commons.lang.WordUtils : Hello Ivy !
>     BUILD SUCCESSFUL

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.