Skip to content

llnek/cljant

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

67 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cljant

Build Status

Apache ant is a venerable java build tool providing numerous useful and robust tasks, ranging from file system operations to os operations. cljant provides a simple way to access those tasks in clojure by treating each as a function.

Installation

Add the following dependency to your project.clj file:

[io.czlab/cljant "2.1.0"]

Documentation

Usage

(ns demo.core
  (:require [czlab.cljant.antlib :as a]))

(defn compileAndRun [srcDir destDir]
  (a/run*
    (a/javac
      {:srcdir srcDir
       :destdir destDir
       :target "8"
       :executable "/bin/javac"
       :debugLevel "lines,vars,source"
       :includeantruntime false
       :debug true
       :fork true}
      [[:compilerarg {:line "-Xlint:deprecation"}]
       [:include {:name "**/*.java"}]
       [:classpath
        [[:path {:location "/dev/classes"}]
         [:fileset {:dir "/home/joe/maven"
                    :includes {:name "**/*.jar"}}]]]])
    (a/sleep {:seconds "2"})
    (a/java
      {:classname "demo.App"
       :fork true
       :failonerror true}
      [[:arg {:value "argvalue1"}]
       [:classpath
        [[:path {:location destDir}]]]])
    (a/sleep {:seconds "2"})))

Contacting me / contributions

Please use the project's GitHub issues page for all questions, ideas, etc. Pull requests welcome. See the project's GitHub contributors page for a list of contributors.

License

Copyright © 2013-2022 Kenneth Leung

Distributed under the Apache License either version 2.0 or (at your option) any later version.

About

apache ant wrapped in clojure

Resources

License

Stars

Watchers

Forks

Packages

No packages published