Bug 53709 - proxy for ant download-jars
Summary: proxy for ant download-jars
Status: RESOLVED DUPLICATE of bug 60886
Alias: None
Product: JMeter
Classification: Unclassified
Component: Main (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-13 08:21 UTC by ejaenv
Modified: 2017-03-17 21:40 UTC (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ejaenv 2012-08-13 08:21:02 UTC
ant download-jar doesn't work when you are behind a proxy.

I have tried this and works. If you want I can create a patch. The question is, where should the proxy values be defined? The build.properties I think is not the place as it is commited in trunk . There should be a user.properties, shouldn't it?


      <target name="proxy">
            <property name="proxy.host" value=".."/>
	    <property name="proxy.port" value=".."/>
	    <property name="proxy.user" value=".."/>
	    <property name="proxy.pass" value=".."/>
	    <setproxy proxyhost="${proxy.host}" proxyport="${proxy.port}"
	      proxyuser="${proxy.user}" proxypassword="${proxy.pass}"/>
	</target>
	
    <!-- Download all missing jars.-->
    <target name="download_jars" description="Download any missing jar files">
    	<antcall target="proxy"/>
    	
        <!-- build.dir may be needed as a temporary work area -->
        <mkdir dir="${build.dir}" />
        <antcall target="_process_all_jars">
            <param name="_get_file" value="true"/>
        </antcall>
    </target>
Comment 1 Milamber 2012-08-13 08:40:09 UTC
Ant tasks works behind a proxy server.

Please use ANT_OPTS environment variable.
http://ant.apache.org/manual/proxy.html

On Linux (bash), before ant download_jars :

export ANT_OPTS="-Dhttp.proxyHost=proxy -Dhttp.proxyPort=8080 -Dhttp.user=login -Dhttp.pass=xxxxx"

ant download_jars  (not download-jar)


Please use the JMeter dev list to ask your questions. Bugzilla isn't a support forum. 
Thanks
Comment 2 ejaenv 2012-08-13 09:59:57 UTC
(In reply to comment #1)
> Ant tasks works behind a proxy server.
> 
> Please use ANT_OPTS environment variable.
> http://ant.apache.org/manual/proxy.html
> 
> On Linux (bash), before ant download_jars :
> 
> export ANT_OPTS="-Dhttp.proxyHost=proxy -Dhttp.proxyPort=8080
> -Dhttp.user=login -Dhttp.pass=xxxxx"
> 
> ant download_jars  (not download-jar)
> 
> 
> Please use the JMeter dev list to ask your questions. Bugzilla isn't a
> support forum. 
> Thanks

Ok, thanks, I should first asked in a list.
Comment 3 Felix Schumacher 2017-03-17 21:38:45 UTC
As Michael pointed out in 60886, the usage of the environment entry might lead to leakage of passwords, as those values will be shown in tools like top or ps, when ant runs.

So I think we should add an option of adding proxy settings via property files (like the mechanism used in tomcat ant file for years).

*** This bug has been marked as a duplicate of bug 60886 ***
Comment 4 Philippe Mouawad 2017-03-17 21:40:22 UTC
(In reply to Felix Schumacher from comment #3)
> As Michael pointed out in 60886, the usage of the environment entry might
> lead to leakage of passwords, as those values will be shown in tools like
> top or ps, when ant runs.
> 
> So I think we should add an option of adding proxy settings via property
> files (like the mechanism used in tomcat ant file for years).
+1
> 
> *** This bug has been marked as a duplicate of bug 60886 ***