Self-signed Certificate - Unable to connect using ANT Build
<p>I'm trying to connect to all the links in a particular webpage and get the response to see if the link is broken.
<br>Some of the links are SSL that too self-certified.
So, I've followed the procedure of adding the certificate to trust store. After that it worked fine, when I tested the same in Eclipse(it returned OK/200).
<br>But, when I build and run the project using ANT in command line, the same exception appears.
And it is weird that it doesn't happen when I build using the same xml through Eclipse; it simply works!</p>

<blockquote>
  <p>sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target</p>
</blockquote>