echo "----------------------------------------------------------------"
echo "Creating JavaDocs for cocoon-ajax-impl:1.0.0"
f=cocoon-ajax-impl-1.0.0-javadoc.jar
jd=org/apache/cocoon/cocoon-ajax-impl/1.0.0/$f
dl=0

if [ -f $f ]
then
else
  wget --header "User-Agent: Mozilla/5.0 Firefox/2.0.0.7" http://repo1.maven.org/maven2/$jd
  dl=1
fi

if [ -f $f ]
then
else
  wget --header "User-Agent: Mozilla/5.0 Firefox/2.0.0.7" http://people.apache.org/builds/cocoon/$jd
  dl=1
fi

if [ $dl -eq 0 ]
then
  echo "No downloads."
  exit 0
else
  unzip -qo $f
fi

exit 0
