Sha256: 9dd2b0994808cac73ceff40ba4aee83e3d776af13ac0a9cb02242ad574af2845

Contents?: true

Size: 779 Bytes

Versions: 8

Compression:

Stored size: 779 Bytes

Contents

require 'ant'
require 'fileutils'
include FileUtils

TARGET_DIR = 'target'
LIBS_DIR = 'trinidad-libs'
JAR_NAME = 'trinidad-hotdeploy-extension.jar'

namespace :ant do
  desc 'Clean the java target directory'
  task :clean do
    rm_f TARGET_DIR
    rm_f "#{LIBS_DIR}/#{JAR_NAME}"
  end

  desc 'Compile the java classes'
  task :compile => :clean do
    opts = {
      :fork => 'true',
      :failonerror => 'true',
      :srcdir => 'src/main/java',
      :destdir => TARGET_DIR,
      :classpath => Dir.glob('trinidad-libs/*.jar').join(':')
    }

    mkdir_p TARGET_DIR
    ant.javac(opts)
  end

  desc 'Create the jar file'
  task :build => :compile do
    opts = {
      :destfile => "#{LIBS_DIR}/#{JAR_NAME}",
      :basedir => TARGET_DIR
    }
    ant.jar(opts)
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
trinidad_hotdeploy_extension-0.4.2 rakelib/build.rake
trinidad_hotdeploy_extension-0.4.1 rakelib/build.rake
trinidad_hotdeploy_extension-0.4.0 rakelib/build.rake
trinidad_hotdeploy_extension-0.3.1 rakelib/build.rake
trinidad_hotdeploy_extension-0.3.0 rakelib/build.rake
trinidad_hotdeploy_extension-0.2.0 rakelib/build.rake
trinidad_hotdeploy_extension-0.1.1 rakelib/build.rake
trinidad_hotdeploy_extension-0.1.0 rakelib/build.rake