My favorites | Sign in
Project Home Downloads Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions

Issue 181 attachment: BuildJmesaBehindAProxy.txt (2.9 KB)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
Building JMesa when behind a Proxy



When building behind a Proxy that requeries authentication there are two things that need to be done in order to download (from SVN) and build Jmesa succesfully.


1) Configure your SVN client to use Proxy Auth when downloading the code as specified here:

http://vikashazrati.wordpress.com/2009/01/25/http-proxy-sv/

And conveniently copied here = )

There is a “servers” file in svn which is present at the following location

Win : C:\Documents and Settings\[username]\Application Data\Subversion\servers

Linux: /etc/subversion/servers

Here you need to set the proxy server and port settings so that command line SVN can access the external world form the proxy. Uncomment and change the lines necessary

[global]
# http-proxy-exceptions = *.exception.com, www.internal-site.org
http-proxy-host = myproxy.us.com
http-proxy-port = 8080
http-proxy-username = username
http-proxy-password = password
# http-compression = no
# http-auth-types = basic;digest;negotiate
# No http-timeout, so just use the builtin default.
# No neon-debug-mask, so neon debugging is disabled.

If you get something like

svn: C:\Documents and Settings\[username]\Application Data\Subversion\servers:73:
Option expected

then it means that you have a space at the start of the property which you have un-commented. Make sure that there is no space in the beginning of the property in the servers file.


2)Configure the build.groovy Script to instruct Ant (AntBuilder) and Ivy, to use the proxy server when trying to resolve dependincies from a remote repository


In your build.groovy Script, before any call to ivyresolve() , add the following line to setup the proxy

ant.setproxy(proxyhost:'xxx.xxx.xxx.xxx.',proxyport:'8080',proxyuser:'username',proxypassword:'yourpassword')

this will call the Setproxy Ant Task (http://ant.apache.org/manual/OptionalTasks/setproxy.html)

if you want to get more detail about posible erros use:

ant.record(name:'log.txt',action:'start',loglevel:'debug')


my modified dist() function looks like these


def dist() {
clean()
init()
testInit()
ant.record(name:'log.txt',action:'start',loglevel:'debug')
ant.setproxy(proxyhost:'xxx.xxx.xxx.xxx.',proxyport:'8080',proxyuser:'username',proxypassword:'yourpassword')
ivyresolve()
ivyretrieve()
ant.record(name:'log.txt',action:'stop',loglevel:'debug')
classpaths()
compile()
jar()
ivypublish()
testClasspaths()
testCompile()
junit()
retro()
copy()
zip()
docs()
}
Powered by Google Project Hosting