# Copy over the JavaDoc for all projects to api/java.
require 'fileutils'
include FileUtils

puts "Copy over the JavaDoc for all projects to api/java"

source = "../target/site/apidocs"
dest = "api/java"

puts "Making directory " + dest
mkdir_p dest

puts "cp -r " + source + "/. " + dest
cp_r(source + "/.", dest)

cd("..")

# Copy over the JavaDoc for all projects to api/java.
require 'fileutils'
include FileUtils

puts "Copy over the JavaDoc for all projects to api/java"

source = "../target/site/apidocs"
dest = "api/java"

puts "Making directory " + dest
mkdir_p dest

if !File.directory?(source)
  puts source + " not found, continuing without javadoc"
else
  puts "cp -r " + source + "/. " + dest
  cp_r(source + "/.", dest)
end

cd("..")

Allow docs to build without javadoc
Allow docs to build without javadoc

This is useful when developing documentation since building javadoc
takes a while.
