;ELC   
;;; Compiled by leavens@CMC3251632-A on Thu Sep 04 23:31:09 2003
;;; from file d:/emacs/jde/lisp/jde-ant.el
;;; in Emacs version 21.3.1
;;; with bytecomp version 2.85.4.1
;;; with all optimizations.

;;; This file uses dynamic docstrings, first added in Emacs 19.29.
(if (and (boundp 'emacs-version)
	 (< (aref emacs-version (1- (length emacs-version))) ?A)
	 (or (and (boundp 'epoch::version) epoch::version)
	     (string-lessp emacs-version "19.29")))
    (error "`jde-ant.el' was compiled for Emacs 19.29 or later"))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


(custom-declare-group 'jde-ant nil "JDE Ant" :group 'jde :prefix "jde-ant-")
#@193 *Specifies how to invoke ant. Ant can be invoked in one of three
ways. The first is via the ant script/program that comes with ant.
The second is via java and the third is via the Ant Server.
(custom-declare-variable 'jde-ant-invocation-method '(list "Script") '(#$ . -677) :group 'jde-ant :type '(list (radio-button-choice (const "Script") (const "Java") (const "Ant Server"))))
#@36 *Directory where ant is installed.
(custom-declare-variable 'jde-ant-home '"" '(#$ . -1063) :group 'jde-ant :type 'file)
#@52 *Specifies jar files that hold user-defined tasks.
(custom-declare-variable 'jde-ant-user-jar-files 'nil '(#$ . -1190) :group 'jde-ant :type '(repeat (file :tag "Path")))
#@40 *Specifies name of ant program/script.
(custom-declare-variable 'jde-ant-program '"ant" '(#$ . -1367) :group 'jde-ant :type 'string)
#@52 *Specifies arguments to be passed to make program.
(custom-declare-variable 'jde-ant-args '"-emacs" '(#$ . -1506) :group 'jde-ant :type 'string)
#@42 *Specifies the default buildfile to use.
(custom-declare-variable 'jde-ant-buildfile '"build.xml" '(#$ . -1657) :group 'jde-ant :type 'string)
#@344 *Specify whether to prompt for a buildfile. If non-nil, the jde-ant-build
command prompts you for an ant buildfile.  Note that when `jde-ant-enable-find'
is enable the value entered for `jde-ant-read-buildfile' is used as a
default. If no value is entered, or the file is non-existent, or is a
directory, the code tries to find the buildfile.
(custom-declare-variable 'jde-ant-read-buildfile 'nil '(#$ . -1807) :group 'jde-ant :type 'boolean)
#@118 *Specify whether to prompt for a build target. If non-nil, the 
jde-ant-build command prompts you for an ant target.
(custom-declare-variable 'jde-ant-read-target 'nil '(#$ . -2257) :group 'jde-ant :type 'boolean)
#@57 Defauilt buildfile to use when prompting interactively.
(defvar jde-ant-interactive-buildfile nil (#$ . 2477))
#@47 History of targets entered in the minibuffer.
(defvar jde-ant-interactive-target-history nil (#$ . 2594))
#@149 *Specify whether to prompt for additional arguments to pass to ant. If
non-nil, the jde-ant-build command prompts you for the additional arguments.
(custom-declare-variable 'jde-ant-read-args 'nil '(#$ . -2707) :group 'jde-ant :type 'boolean)
#@47 History of targets entered in the minibuffer.
(defvar jde-ant-buildfile-history nil (#$ . 2956))
#@384 This variable is used to indicate that we have passed the
java.lang.SecurityException in the output. The JDESecurityManager throws an
exception when ANT tries exiting the JVM using System.exit(0). This exception
causes an stack trace in the compilation buffer. This variable is used to
indicate the start of the exception, therefore no more output should be
inserted into the buffer
(defvar jde-ant-passed-security-exception nil (#$ . 3060))
#@59 Used to indicated the status of build, success or failure
(defvar jde-ant-build-status nil (#$ . 3508))
#@370 *Specify whether jde-ant find the build.xml file based on your current
directory. If non-nil, we will search up the directory hierarchy from the
current directory for the build definition file. Also note that, if non-nil,
this will relax the requirement for an explicit jde project file.  If
`jde-ant-read-buildfile' is enable that value is used as a default if valid.
(custom-declare-variable 'jde-ant-enable-find 'nil '(#$ . -3619) :group 'jde-ant :type 'boolean)
#@341 *Specify whether to enable completion of build target names in the
minibuffer.

If non-nil, the jde-ant-build command allows you to use tab completion
in the minibuffer to specify the build target name.  This list of
valid build targets is determined by parsing the Ant build file.  This
option has no effect if jde-ant-read-target is nil.
(custom-declare-variable 'jde-ant-complete-target 't '(#$ . -4092) :group 'jde-ant :type 'boolean)
#@80 *Specify whether to enable use of `jde-global-classpath' when running jde-ant.
(custom-declare-variable 'jde-ant-use-global-classpath 'nil '(#$ . -4537) :group 'jde-ant :type 'boolean)
#@68 *Regular expression used to match target names in Ant build files.
(custom-declare-variable 'jde-ant-target-regexp '"<\\s-*target\\s-[^...]*?name\\s-*=\\s-*\"\\s-*\\([^\"]+\\)" '(#$ . -4728) :group 'jde-ant :type 'string)
#@186 *List of hook functions run by `jde-ant-build' (see `run-hooks'). Each
function should accept two arguments: the compilation buffer and a string
describing how the compilation finished
(custom-declare-variable 'jde-ant-build-hook ''(jde-compile-finish-kill-buffer jde-compile-finish-refresh-speedbar jde-compile-finish-flush-completion-cache) '(#$ . -4957) :group 'jde-ant :type 'hook)
#@229 *Path of the working directory to use in 'ant' build mode. This string must
end in a slash, for example, c:/foo/bar/ or ./ . If this string is empty, the
'ant' build mode uses the current file location as its working directory.
(custom-declare-variable 'jde-ant-working-directory '"" '(#$ . -5350) :group 'jde-ant :type 'string)
#@155 Constructs the java ant command. The variable `jde-ant-home' is used
if it is set, otherwise it gets the ant home from the environment
variable ANT_HOME.
(defalias 'jde-build-ant-command #[(target more-args &optional buildfile) "\204 	\306\307!\310\230\203 \n\205 \311\n!\202 \311!@\312\230\203) \313\202* \314@\315\230\2055 @\312\230\205f \316\317!\320\321=\205Q \322\323\"\205Q \324 \321=\205d \322\323\"\205d \260\325\f@\312\230\205p \326\260\310\230\204\210 \327\311!\260\310\230\204\227 \330Q\203\253 \310\230\204\253 \330Q \310\230\204\273 \330 \330R,\207" [buildfile jde-ant-buildfile ANT_HOME_ENV jde-ant-home ant-home jde-ant-invocation-method getenv "ANT_HOME" "" jde-normalize-path "Java" "'" "\"" "Script" jde-get-jdk-prog java " -classpath " windows-nt string-match "sh$" jde-ant-build-classpath " -Dant.home=" " org.apache.tools.ant.Main" " -buildfile " " " delimiter jde-ant-program system-type shell-file-name ant-command jde-ant-args more-args target] 8 (#$ . 5686)])
#@118 Build the classpath we should use when running ant.  This returns a
classpath normalized with `jde-build-classpath'.
(defalias 'jde-ant-build-classpath #[nil "\306\230\203 \307\310\311!!\202 \307!\312\313\314\315	\"\316 D\"\f\203( \313\n\"\317\n!*\207" [jde-ant-home ant-home classpath jde-ant-user-jar-files jde-ant-use-global-classpath jde-global-classpath "" jde-normalize-path getenv "ANT_HOME" nil append expand-file-name "lib" jde-get-tools-jar jde-build-classpath] 4 (#$ . 6749)])
#@224 Get a buildfile interactively.  This is used so that code that needs to read
  a buildfile from interactive can share the same type of behavior.  This will
  return a new filename which points to the build.xml file to use.
(defalias 'jde-ant-interactive-get-buildfile #[nil "\306	\203' \306\211\f\203 \307\f!\310\f!\202 \311 \312\313\314\306\315\n%*\203/ 	\203M \203e 	\203e \203M \312\230\204M \316!\203e \317!\203e \320\311 !\211\204Z \321\322!\210\316!\204e \321\323\"\210\204r 	\204r \324!)\207" [buildfile jde-ant-read-buildfile prompt-filename prompt-directory jde-ant-interactive-buildfile jde-ant-enable-find nil file-name-directory file-name-nondirectory jde-ant-get-default-directory "" read-file-name "Buildfile: " t file-exists-p file-directory-p jde-ant-find-build-file error "Could not find Ant build file" "File does not exist %s " jde-normalize-path jde-ant-buildfile] 7 (#$ . 7254)])
#@107 Build the current project using Ant.  If interactive, we try to prompt the
  user for certain variables..
(defalias 'jde-ant-build #[(buildfile target &optional interactive-args) "\306	\n#\211\205X \f\307=\203* \204* \310\311?\312\"\210)\2021 \311?\312\"\210\313@\314\230\203T \315\316\"\203M \317\320\312\211$\202< \321\322\"\202X \323\322\")\207" [target interactive-args buildfile compile-command system-type jde-xemacsp jde-build-ant-command windows-nt t save-some-buffers nil #[(buf msg) "\303\304	#\210\305\211\207" [buf msg compilation-finish-function run-hook-with-args jde-ant-build-hook nil] 4] "Ant Server" string-match "\"" replace-match "" jde-ant-compile-internal "No more errors" compile-internal last-nonmenu-event temp compilation-ask-about-save compilation-finish-function jde-ant-invocation-method] 6 (#$ . 8187) (let (buildfile history target interactive-args) (setq buildfile (jde-ant-interactive-get-buildfile)) (setq history (jde-ant-get-from-history buildfile)) (if jde-ant-read-target (if jde-ant-complete-target (setq target (completing-read "Target to build: " (jde-ant-get-target-alist buildfile) nil t (car history) 'history)) (setq target (read-from-minibuffer "Target to build: " (car history) nil nil 'history)))) (jde-ant-add-to-history buildfile history) (setq target (jde-ant-escape target)) (if jde-ant-read-args (setq interactive-args (read-from-minibuffer "Additional build args: " (nth 0 jde-ant-interactive-args-history) nil nil '(jde-ant-interactive-args-history . 1)))) (setq jde-ant-interactive-buildfile buildfile) (list buildfile target interactive-args))])
(byte-code "\301B\302\301!\204\f \303\303\207" [current-load-list jde-ant-comint-filter boundp nil] 2)
#@46 Looks for characters and escape them, i.e. \
(defalias 'jde-ant-escape #[(target) "??\205. \303\211\304\230\204, \305\306O\211\307\230\203 \n	P\n	P\306\303O\211\202 \n*\207" [target c temp nil "" 0 1 "\\"] 4 (#$ . 9930)])
#@162 This method displays ant output in a compilation buffer.
error-message is a string to print if the user asks to see another error
and there are no more errors. 
(defalias 'jde-ant-compile-internal #[(command error-message) "\306\306\306\306\306%\306&\212\307\310!\211&q\210\311 \210)'?\205(  '?\2051 !'?\205: \"'?\205C #\306(\312 )\306*\212\313 \204Y \314\315 !\210\316 (&q\210\317 \210\306+\320p!\210\321 \210\322p!\210\323&!\210\324c\210,\325\261\210\326\306!\210\327(!-\330(\331\"\210\306.\332(\333,\334\325R\"\210)\323&!*\212\335\305!%L\210\335\336!/L\210\335\337!L\210'\204\327 \335\340!	L\210\335\341!\nL\210\335\342!L\210\335\343!\fL\210)\2110C1\344*!\210'\204\362 2\203\362 2 \210,&\2113.\207" [error-regexp-alist enter-regexp-alist leave-regexp-alist file-regexp-alist nomessage-regexp-alist compilation-parse-errors-function nil get-buffer-create "*compilation*" kill-all-local-variables jde-ant-get-default-directory bsh-running-p bsh-eval jde-create-prj-values-str bsh-get-process compilation-mode buffer-disable-undo erase-buffer buffer-enable-undo display-buffer "AntServer output:\n" "\n" set-buffer-modified-p process-filter set-process-filter jde-ant-filter process-send-string "jde.util.AntServer.start(\"" "\");" make-local-variable compilation-error-message compilation-error-regexp-alist compilation-enter-directory-regexp-alist compilation-leave-directory-regexp-alist compilation-file-regexp-alist compilation-nomessage-regexp-alist compilation-set-window-height parser outbuf jde-xemacsp proc thisdir outwin buffer-read-only command jde-ant-comint-filter jde-ant-passed-security-exception error-message default-directory compilation-directory-stack compilation-process-setup-function compilation-last-buffer] 7 (#$ . 10171)])
#@131 This filter prints out the result of the process without buffering.
The result is inserted as it comes in the compilation buffer.
(defalias 'jde-ant-filter #[(proc string) "r\306\307!q\210\310\311\"\310\312\"\313\307!\212db\210\2034 \314\315Oc\210\316\317!\210\320\321!\210\322\323 !\210\324 \210\n\203X \f\204R \315\nOc\210\316\317!\210\320\321!\210\322\323 !\210\324 \210\325\"\210\n\204c \f\204c c\210)?\205\204 \205\204 \326 \327\216	\203\200 \330	!\210db\210\331\315!*,\207" [string win end-of-result stack-trace jde-ant-passed-security-exception proc get-buffer "*compilation*" string-match "java.lang.SecurityException" ".*bsh % " get-buffer-window t 0 set-buffer-modified-p nil compilation-mode "Compilation" jde-ant-set-build-status buffer-string jde-ant-handle-exit set-process-filter selected-window ((byte-code "\301!\203\n \302!\210\301\207" [save-selected-window-window window-live-p select-window] 2)) select-window sit-for jde-ant-comint-filter jde-xemacsp compilation-scroll-output save-selected-window-window] 4 (#$ . 11984)])
#@30 Handles the compilation exit
(defalias 'jde-ant-handle-exit #[nil "\301\302\211\303\230\203 \304\202 \305#\207" [jde-ant-build-status compilation-handle-exit exit "0" "finished\n" "exited abnormally with code 1\n"] 5 (#$ . 13057)])
#@52 Sets the build status based on the BUFFER-CONTENTS
(defalias 'jde-ant-set-build-status #[(buffer-contents) "\302\303\"\203	 \304\302\305\"\205 \306\211\207" [buffer-contents jde-ant-build-status string-match ".*BUILD SUCCESSFUL.*" "0" ".*BUILD FAILED.*" "1"] 3 (#$ . 13298)])
#@275 Display Ant project help for the current project.
This will execute the Ant program with the `-projecthelp' switch to output
available targets with their descriptions for the current buildfile. This
function uses the same rules as `jde-ant-build' for finding the buildfile.
(defalias 'jde-ant-projecthelp #[(buildfile) "\301\302\303#\207" [buildfile jde-ant-build nil "-projecthelp"] 4 (#$ . 13586) (list (jde-ant-interactive-get-buildfile))])
#@149 Find the next Ant build file upwards in the directory tree from DIR.
Returns nil if it cannot find a project file in DIR or an ascendant directory.
(defalias 'jde-ant-find-build-file #[(dir) "\303\304\230\203 \305\202\f \306	!\307\310$\211\203 \311\n	\"\202+ \312	!\204+ \313	\314P!\n)\207" [jde-ant-buildfile dir file find "" "build.xml" directory-files :test string= expand-file-name jde-root-dir-p jde-ant-find-build-file "../"] 6 (#$ . 14038)])
#@55 Returns asociation list of valid Ant project targets.
(defalias 'jde-ant-get-target-alist #[(buildfile) "\304\305\306!\307\216\212q\210\310 \210\311\n!\210eb\210\312d\313#\203* \314	\315\316!CC\"\202 *	*\207" [temp-buf targets buildfile jde-ant-target-regexp nil get-buffer-create "*jde-ant-get-target-list-temp-buffer*" ((kill-buffer temp-buf)) erase-buffer insert-file-contents re-search-forward t append match-string 1] 4 (#$ . 14500)])
#@33 Show the JDE Ant Options panel.
(defalias 'jde-ant-show-options #[nil "\300\301\302\"\207" [customize-apropos "jde-ant" groups] 3 (#$ . 14952) nil])
#@82 Gets the default-directory according to the value of
'jde-ant-working-directory.
(defalias 'jde-ant-get-default-directory #[nil "\302\230\203 	\207\207" [jde-ant-working-directory default-directory ""] 2 (#$ . 15107)])
(defalias 'jde-ant-add-to-history #[(buildfile history) "@\306\307\203\" 	\204\" \nT\2118\211@\f\230\203 \310\202 	\203, \241\2026 \311\f@DC\"\211+\207" [jde-ant-interactive-target-history found index temp buildfile history -1 nil t append] 5])
(defalias 'jde-ant-get-from-history #[(buildfile) "@\305\306\203\" 	\204\" \nT\2118\211@\f\230\203 \307\202 	\205( A+\207" [jde-ant-interactive-target-history found index temp buildfile -1 nil t] 4])
(byte-code "\300 \210\301\302!\207" [jde-update-autoloaded-symbols provide jde-ant] 2)
