Results 1 to 5 of 5

Thread: Problem with ant build

  1. #1

    Default Problem with ant build

    Hi,
    I am trying to build a jar file using a ant script provided by a vendor and while running the script, I am getting the below connection time out error when it tries to download a jar file.

    Code:
    C:\ccuapi-java>ant run 
    
    Buildfile: build.xml
    
    get_libs:
          [get] Getting: http://download.java.net/maven/2/args4j/args4j/2.0.12/args4j-2.0.12.jar
          [get] To: C:\ccuapi-java\args4j-2.0.12\args4j-2.0.12.jar
          [get] local file date : Thu Jun 02 13:59:56 IST 2011
          [get] Error getting http://download.java.net/maven/2/args4j/args4j/2.0.12/args4j-2.0.12.jar to C:\ccuapi-java\args4j-2.0.12\args4j-2.0.12.jar
    
    BUILD FAILED
    java.net.ConnectException: Connection timed out: connect
            at java.net.PlainSocketImpl.socketConnect(Native Method)
            at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
            at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
            at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
            at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
            at java.net.Socket.connect(Socket.java:525)
            at java.net.Socket.connect(Socket.java:475)
            at sun.net.NetworkClient.doConnect(NetworkClient.java:163)
            at sun.net.www.http.HttpClient.openServer(HttpClient.java:394)
            at sun.net.www.http.HttpClient.openServer(HttpClient.java:529)
            at sun.net.www.http.HttpClient.<init>(HttpClient.java:233)
            at sun.net.www.http.HttpClient.New(HttpClient.java:306)
            at sun.net.www.http.HttpClient.New(HttpClient.java:323)
            at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:860)
            at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:801)
            at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:726)
            at org.apache.tools.ant.taskdefs.Get.doGet(Get.java:145)
            at org.apache.tools.ant.taskdefs.Get.execute(Get.java:78)
            at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
            at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:597)
            at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
            at org.apache.tools.ant.Task.perform(Task.java:348)
            at org.apache.tools.ant.Target.execute(Target.java:357)
            at org.apache.tools.ant.Target.performTasks(Target.java:385)
            at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
            at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
            at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
            at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
            at org.apache.tools.ant.Main.runBuild(Main.java:758)
            at org.apache.tools.ant.Main.startAnt(Main.java:217)
            at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
            at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
    Can someone help me?

    Thanks,
    Madhu.

  2. #2

    Default Re: Problem with ant build

    Can you get the file manually from that machine?
    Software is like sex: it's better when it's free. --Linus Torvalds

  3. #3

    Default Re: Problem with ant build

    Yes, I can get the files manually but in order to get the latest jar's every time the links are configured in script.

    When I put the file on my local ftp and change the urls to my local ftp, there is no issue. So, the issue is with getting the files from the external links.

  4. #4

    Default Re: Problem with ant build

    madhu84 wrote:
    > Hi,
    > I am trying to build a jar file using a ant script provided by a vendor
    > and while running the script, I am getting the below connection time out
    > error when it tries to download a jar file.
    >
    >
    > Code:
    > --------------------
    >
    > Cccuapi-java>ant run
    >
    > Buildfile: build.xml
    >
    > get_libs:
    > [get] Getting: http://download.java.net/maven/2/arg...s4j-2.0.12.jar
    > [get] To: Cccuapi-java\args4j-2.0.12\args4j-2.0.12.jar
    > [get] local file date : Thu Jun 02 13:59:56 IST 2011
    > [get] Error getting http://download.java.net/maven/2/arg...s4j-2.0.12.jar to Cccuapi-java\args4j-2.0.12\args4j-2.0.12.jar


    It looks like you are building on Windoze. What does this question have
    to do with opensuse?

    Also, what does the vendor say about the problem?

  5. #5
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,686
    Blog Entries
    4

    Default Re: Problem with ant build

    Looks like you are on a Windows machine, so I don't see what this has to do with Linux. You might have better luck in a Java forum or the forum for that piece of software. But if you are behind a HTTP proxy, you may need to specify the proxy in your build script. Sorry, it's been a while since I tangled with Java so I couldn't tell you.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •