ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ludwig, Michael" <>
Subject ant-contrib: HTTPS <post> and unverifiable certificate
Date Thu, 04 Nov 2010 10:57:04 GMT
I'd like to capture and process the response from the ant-contrib <post> task. There
are two documented ways of capturing the response, neither of which appears to work for me.
Is there anything I'm missing?

Yes, I found out myself. The URL I was posting to was HTTPS with an unverifiable certificate.
It works fine for the simple case:

<!-- vim: set filetype=ant: -->
<project default="post">
  <taskdef resource="net/sf/antcontrib/"/>
  <!-- für HTTP POST -->
  <target name="post">
    <property name="url" value=""/>
    <post to="${url}" verbose="false" property="post.response">
      <!-- verbose="true" logfile="post.log" -->
      <prop name="bla" value="blub"/>

Does anyone know if I can instruct the <post> task, or rather the HTTP library it is
using to continue in the face of an unverifiable certificate, in the way curl can be configured
accordingly using the -k/--insecure switch?

When trying the standard <get> task in that situation, I'm getting a

<project default="get">
  <target name="get">
    <property name="url" value=""/>
    <property name="url" value=""/>
    <property name="file" location=""/>
    <get src="${url}" dest="${file}" /><!-- verbose="true" -->
      <filelist files="${file}"/>

This is Java 1.6.

Michael Ludwig 
View raw message