Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 323343 - Ant Task doesn't use Proxies
Summary: Ant Task doesn't use Proxies
Status: RESOLVED WORKSFORME
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: 1.3   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: David Green CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 323292
  Show dependency tree
 
Reported: 2010-08-22 21:40 EDT by David Carver CLA
Modified: 2011-01-05 11:27 EST (History)
1 user (show)

See Also:


Attachments
mylyn/context/zip (6.23 KB, application/octet-stream)
2010-08-26 16:13 EDT, David Green CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Carver CLA 2010-08-22 21:40:57 EDT
It seems that the Mylyn WikiText ant tasks doesn't use proxies.   When running the Vex Editor build on the new Hudson servers it can't see wiki.eclipse.org.  In order to access these machines, it has to use a proxy.  Which is set for both the jvm default and the maven default.

Is the ant task using proxy settings?
Comment 1 David Green CLA 2010-08-26 16:10:39 EDT
Can you specify how the proxy settings are configured for the VM?
Comment 2 David Green CLA 2010-08-26 16:13:54 EDT
We're using code like this:

bc. 
URL url = ///
InputStream in = url.openStream();
// use it

attached a context with relevant locations
Comment 3 David Green CLA 2010-08-26 16:13:56 EDT
Created attachment 177561 [details]
mylyn/context/zip
Comment 4 David Carver CLA 2010-08-26 16:17:29 EDT
(In reply to comment #1)
> Can you specify how the proxy settings are configured for the VM?

In Hudson there the JVM opts are configuring the system properties:

http.proxyHost
http.proxyPort

According to this site, you need to do some special connections to use the Proxies.

http://www.rgagnon.com/javadetails/java-0085.html

There may be some additional steps that need to happen from within Ant or to use Ant's proxy support directly.
Comment 5 David Carver CLA 2010-08-26 16:22:17 EDT
Some more info on Ant and Proxy support.

http://ant.apache.org/manual/proxy.html
Comment 6 David Green CLA 2010-08-26 16:22:46 EDT
According to the referenced article it should just work.  Are those options being set on the VM that launches Ant?
Comment 7 David Carver CLA 2010-08-26 16:28:58 EDT
(In reply to comment #6)
> According to the referenced article it should just work.  Are those options
> being set on the VM that launches Ant?

They are being set in two places.

MAVEN_OPTS
ANT_OPTS

environment variables.

I could try forcing them into the build script that then makes the build specific to that machine.

Adding Matt to the conversation, as he is most familiar with how the new hudson instance is setuup.
Comment 8 David Carver CLA 2010-08-26 16:29:37 EDT
BTW, all of the other built in ant tasks are working as expected when it comes to accessing the resources out on the net.
Comment 9 David Green CLA 2010-08-26 16:32:09 EDT
Can you please attach your build script?
Comment 10 David Carver CLA 2010-08-26 16:37:55 EDT
You can see the necessary pieces here:

http://git.eclipse.org/c/webtools/org.eclipse.webtools.incubator.git/tree/sourceediting/documentation/org.eclipse.wst.xml.vex.documentation?h=vex-dev

The two pieces are:

buildHelper.xml

and

pom.xml

I have the necessary steps commented out in the pom.xml for the moment.

Output from build From the following:
https://hudson.eclipse.org/hudson/view/WTP/job/cbi-wtp-inc.vex/35/

Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.4:run (mylyn-wiki-text) on project org.eclipse.wst.xml.vex.documentation: An Ant BuildException has occured: The following error occurred while executing this line:
/opt/users/hudsonbuild/workspace/cbi-wtp-inc.vex/sourceediting/documentation/org.eclipse.wst.xml.vex.documentation/buildHelp.xml:38: Cannot read from http://wiki.eclipse.org/index.php?title=Vex%2FUserGuide&action=raw: wiki.eclipse.org: Unknown host wiki.eclipse.org
-> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :org.eclipse.wst.xml.vex.documentation
Comment 11 Eclipse Webmaster CLA 2010-08-26 16:40:54 EDT
David is correct about where the proxy data is set(it's also in the ANT_ARGS and JVM_OPTS ). However you shouldn't need a proxy to access .eclipse.org(strictly speaking), and in this case it looks like the issue was an inability to resolve the host name.  I've corrected that so let me know if that fixes things.

-M.
Comment 12 David Green CLA 2010-08-26 16:42:01 EDT
David C: Please let me know if the DNS fix (comment #11) resolves your problem.
Comment 13 David Carver CLA 2010-08-26 16:50:37 EDT
Matt, that seemed to fix it.

So marking this as WorksForMe.