apache ant http task 1.1.3 released

August 18, 2011 8 comments

I’ve released the missing link apache ant http task version 1.1.3.  This is mainly a bugfix and enhancement release.

I would like to thank everyone who contributed by logging issues on the google code project!  I utilized some of the patches that people have submitted.

The issues fixed for 1.1.3 can be seen here, which include the following:

  • Make the task less verbose by default, now utilizes ant log levels (can use -verbose switch to get back original logging)
  • Skip a HTTP request if writing to an outFile and new “update” attribute is set to false (user submitted patch)
  • Added an attribute “statusProperty” to save the response http status code to a property
  • Added an attribute “entityProperty” to save the response http entity to a property
  • Added an attribute “value” to the entity node which allows you to use an arbitrary value (including ant properties) as the request entity
  • Fixed a bug where writing to an outFile did not create the parent directories (user submitted patch)

Again, I would like to thank everyone for their feedback and patch submissions.

Please give me any other feedback, bug reports and or feature requests that you may have!

Thanks

apache ant http task 1.1.2 released

July 22, 2011 2 comments

I’ve released the missing link apache ant http task version 1.1.2.  This is mainly a bugfix release.

I would like to thank everyone who contributed by logging issues on the google code project!  I utilized most of the patches that people have submitted.

I must apologize in the delay for applying these patches, I’ve simply been swamped with work; but rest assured I have no intentions of letting this project go away anytime soon.  We use it every day at my workplace in our automated build processes.

The issues fixed for 1.1.2 can be seen here, which include the following:

  • Support binary entities (user submitted patch)
  • Failures do not print the requested URL (user submitted patch)
  • Added attribute to optionally print the user credentials (defaults to false)
  • The URI builder was parsing the URL with a custom regex which did not properly match with periods in URL (user submitted patch)
  • Fixed the included sample file to have the correct jar reference (now automated at build time)
  • Fixed an inconsistent name on the generated api docs zip

Again, I would like to thank everyone for their feedback and patch submissions.

Please give me any other feedback, bug reports and or feature requests that you may have!

Thanks

apache ant http task 1.1 released

March 29, 2011 5 comments

Due to a glaring feature omission from version 1.0, the ability to write the response entity to file, I’ve added a new attribute to the ant task to support this and moved the project to version 1.1.

The new version with updated documentation, samples and downloads can be found on the google code site http://code.google.com/p/missing-link/.

Sample usage to write an entity to file:

<?xml version="1.0" encoding="UTF-8"?>
<project name="ml-ant-http" basedir="." default="http-get">

<property name="ml-ant-http.jar" value="ml-ant-http-1.1.jar"/>

<fileset id="runtime.libs" dir=".">
<include name="${ml-ant-http.jar}"/>
</fileset>

<path id="runtime.classpath">
<fileset refid="runtime.libs"/>
</path>

<taskdef name="http" classname="org.missinglink.ant.task.http.HttpClientTask">
<classpath refid="runtime.classpath"/>
</taskdef>

<target name="http-get">
<http url="http://www.google.com/images/logos/ps_logo2.png" method="GET" outfile="google.png"/>
</target>
</project>
Categories: Uncategorized

apache ant http task

March 15, 2011 16 comments

A lightweight, full featured and flexible apache ant http task is ready for use, visit http://code.google.com/p/missing-link/ to download the library with documentation, source and examples.  The ant task is licensed under the Apache 2.0 license and is freely available for use in any situation.

I created this library because there simply isn’t any good ones out there.  Most don’t contain or expose access to core HTTP features such as authentication and headers.  And those that do exist usually have bugs that prevent normal usage, poorly documented or have some other limiting factor.

It’s great for use in build processes which need to invoke HTTP services (think XML RESTful web services, for example), as well as testing URLs.

Using the ant task is very simple, here is a complete working ant build file example:

<?xml version="1.0" encoding="UTF-8"?>
<project name="ml-ant-http" basedir="." default="http-get">

<property name="ml-ant-http.jar" value="ml-ant-http-1.0.jar"/>

<fileset id="runtime.libs" dir=".">
<include name="${ml-ant-http.jar}"/>
</fileset>

<path id="runtime.classpath">
<fileset refid="runtime.libs"/>
</path>

<taskdef name="http" classname="org.missinglink.ant.task.http.HttpClientTask">
<classpath refid="runtime.classpath"/>
</taskdef>

<target name="http-get">
<http url="http://www.google.com"/>
</target>
</project>