RE: Getting jde and ant to play nicely.
[EMAIL PROTECTED] writes: > Hi Paul, > > The lisp function would need to: > > find the build.xml file > Can you send me an example of a real build.xml file with its associated entity files for using in testing? - Paul > parse any entity declarations, including references to external files. > Example: > > > > > ]> > > > > &properties; > > > &tasks; > > > > expand those entities in the remainder of the build.xml wherever they > appear. > > Return the value of the "name" attribute for every element of type "target" > from this pre-processed parse tree. Those values are what is used in tab > completion when doing jde builds with ant. > > Cheers, > Eric > > -Original Message- > From: Paul Kinnucan [mailto:[EMAIL PROTECTED] > Sent: Monday, July 14, 2003 2:28 PM > To: [EMAIL PROTECTED] > Cc: [EMAIL PROTECTED] > Subject: RE: Getting jde and ant to play nicely. > > > [EMAIL PROTECTED] writes: > > There is, alas, a limit to how far one can get with the currently > approach > > to parsing Ant build files in JDE. For my project, I've got several > > components, each of which has its own build files. These build files all > > have a number of targets in common along with a number of common > properties. > > > > The standard way to share XML markup chunks of this kind is to push them > out > > into separate files and then define external entities for them in the > > document type declaration. The entities are then included in the parse > tree > > by reference: &tasks; &properties; and so on. > > > > To make a short story long, this means that the parser needs to > understand > > this feature of XML and that it needs to look in external places for task > > definitions. Obviously the regexp used by jde-ant on the single > 'build.xml' > > buffer is not up to the task. I don't know whether psgml could handle > this > > or not, but the upshot is that it makes target completion in jde non > > functional. This is not a big deal as I just write lisp code to call > > jde-ant-build with the target names "directly" and everything is fine. > > > > Hi Eric, > > I believe psgml knows how to resolve external entities. Alternatively, > it would be no big deal to include a Java-based parser (e.g., Xerces) > in the JDEE distribution (it's just another jar file) and have the > Beanshell invoke it to extract info from Ant build files. > > I'm currently developing a Java app that uses Xerces to extract information > from complex XML files so I could help someone who knows Ant to solve the > problem you describe. I don't know Ant so someone would have to tell > me "I need a Lisp function that, given an Ant build file, returns the > following > info." I could then write a Lisp function to invoke Xerces via the BeanShell > to get the info. > > > - Paul > > > > Eric > > > > -Original Message- > > From: Paul Kinnucan [mailto:[EMAIL PROTECTED] > > Sent: Monday, July 14, 2003 2:11 PM > > To: [EMAIL PROTECTED] > > Cc: [EMAIL PROTECTED] > > Subject: Getting jde and ant to play nicely. > > > > > > Sean Ross writes: > > > > > > Hi all, > > > > > > I'm busy struggling to get ant and jde to cooperate. > > > Our build files currently use the ant filter tag to > > > replace @SHORTNAME@ with our package names (which are horribly long), > > > the downside is that this confuses the heck out of semantic and > > > friends ie. wrecking various wonderful beanshell utils. > > > > > > I was wondering if anyone knows of a fix for this? > > > > > > > One approach might be to define a file load hook function > > that would replace the tag with its expansion whenever > > one of your files is loaded into an Emacs buffer and a file save > > hook function that would perform the inverse operation when you > > save a file. > > > > - Paul
Re: JDE and ANT
Albert, Jürgen wrote: > When I try to start "JDE"->"Build" with ANT I get the error: > > Wrong type argument: char-or-string-p, nil > > jde-build-function is set to jde-ant-build in my .emacs: > '(jde-build-function (quote (jde-ant-build))) I used to have this problem too. I found out the following: When a file prj.el (even of 0 byte size) is present in the root of the project directory, the problem disappears. JDE (2.2.8 at least) tries to execute the shell-command cd c:/Java-Projekte/GuiLib/prj.el (in my case) before executing ant and fails with the above error when the file is not there. > Thanks for any hint, > juergen Michael
JDE and ANT
When I try to start "JDE"->"Build" with ANT I get the error: Wrong type argument: char-or-string-p, nil jde-build-function is set to jde-ant-build in my .emacs: '(jde-build-function (quote (jde-ant-build))) trying to start the Lisp debugger ("Options"->"Enter Debugger on Error" set) results in a total Emacs crash. I am using NTEmacs 21.2 Did I forget to configure something else? Thanks for any hint, juergen
Re: JDE and ant?
On Tue, 16 Jan 2001, Paul Kinnucan wrote: > >ps. The reason for differentiate classpath and extdirs and not just > >concatente them is that extdirs and classpath has differences in their > >semantics for classloading... > > > > Thanks, this information is very helpful. It sounds like I need to read up > on extdirs. Also, what you suggest would require some way to detect which > version of javac is running. I have been thinking of adding a variable to > specify which version of the JDK you are using. Another possibliity is for > the JDE to invoke java -version at the beginning of a session and parse > the result to figure our which JDK is in use. > I would prefer the more "direct" control of stating if I wanted extdirs to be enabled or not. Also more easy to adapt to possible future arcance vm's and compilers.. The same goes with version numbers - there exists a LONG range of JDK versions, subversions, platforms etc. that could be a nightmare to handle. I would suggest the more pragmatic choice: Variables that defines the behavior and then mayb some functions that adjust those variables according to the different semantics for the versions. jde-run-adjust-for-1-3 jde-run-adjust-for-1-2 jde-run-adjust-for-1-1 jde-compile-adjust-for-jikes etc. But that is just a wild suggestion :) Max R. Andersen ([EMAIL PROTECTED])
RE: JDE and ant?
Use jde-ant.el and then set the keybinding C-c C-v C-b to be jde-ant-build instead of jde-build and then use that keybinding to compile rather than C-c C-v C-c. > -Original Message- > From: Kevin Jones [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, January 16, 2001 3:47 PM > To: Ben Speakmon > Cc: [EMAIL PROTECTED] > Subject: RE: JDE and ant? > > > I want to use JDE as by dev environment and Ant as my > 'makefile' But this > means I need to maintain two sets of classpaths, compile > options etc. If I > could get JDE to call Ant for compilation then I only need > have a single > point of update, > > Kevin Jones > DevelopMentor > www.develop.com > > > -Original Message- > > From: Ben Speakmon [mailto:[EMAIL PROTECTED]] > > Sent: 16 January 2001 20:11 > > To: Kevin Jones > > Cc: [EMAIL PROTECTED] > > Subject: RE: JDE and ant? > > > > > > On 16 Jan 2001 19:52:58 +, Kevin Jones wrote: > > > > Hmmm. You could create a simple ant build file that accepts > > > > the name of > > > > your file as an input variable... > > > > > > > > > > I already have this - I can do ant -DsomeFile.java, and it will > > compile that > > > file. What I want is to be able to pass the file I am currently > > editing to > > > ant when I'm usinjg JDE/emacs, > > > > > > I fail to understand why you want to pass a JDE buffer to a project > > builder. Why use a builder at all if you're only concerned about one > > file? Or does ant do something else that you're trying to use from > > within emacs? > > > > -- > > -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* > > Benjamin A. Speakmon > > Associate Software Engineer, Web Products Division > > TeleCommunication Systems, Inc. > > Email: [EMAIL PROTECTED] >
RE: JDE and ant?
I want to use JDE as by dev environment and Ant as my 'makefile' But this means I need to maintain two sets of classpaths, compile options etc. If I could get JDE to call Ant for compilation then I only need have a single point of update, Kevin Jones DevelopMentor www.develop.com > -Original Message- > From: Ben Speakmon [mailto:[EMAIL PROTECTED]] > Sent: 16 January 2001 20:11 > To: Kevin Jones > Cc: [EMAIL PROTECTED] > Subject: RE: JDE and ant? > > > On 16 Jan 2001 19:52:58 +, Kevin Jones wrote: > > > Hmmm. You could create a simple ant build file that accepts > > > the name of > > > your file as an input variable... > > > > > > > I already have this - I can do ant -DsomeFile.java, and it will > compile that > > file. What I want is to be able to pass the file I am currently > editing to > > ant when I'm usinjg JDE/emacs, > > > I fail to understand why you want to pass a JDE buffer to a project > builder. Why use a builder at all if you're only concerned about one > file? Or does ant do something else that you're trying to use from > within emacs? > > -- > -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* > Benjamin A. Speakmon > Associate Software Engineer, Web Products Division > TeleCommunication Systems, Inc. > Email: [EMAIL PROTECTED]
Re: JDE and ant?
At 09:16 PM 1/16/01 +, you wrote: >On Tue, 16 Jan 2001, Paul Kinnucan wrote: > >> >> I've updated the JDE to handle environment variables in classpaths and was >> planning on including relative paths as well. Both will be included in the >> next release. Now, at Jason's prompting, I'll probably also add the ability >> to include all the jar/lib files in the directories specified by >> jde-class-library-dirs. >> > >All of this sounds really great and may I suggest another related feature >? > >One of the great things about ant is that it let you specify both >classpath and extdirs. And dependent on wether the compiler is javac or >jikes it handle them transparently. > >1. If it is javac it just uses -cp and -extdirs >2. If it is jikes it appends all the dirs and jar files found in > to the classpath. > >Could a similar functionallity be incoporated into JDE ? > >maybe a jde-compile-compiler-support-extdirs that should be set to false >to activate option 2 above. > >And to be complete a jde-run-jvm-support-extdirs to do the same for Java >1.1 (which do not support extdirs) and Java 1.2-3 (which does support it) > >Did that make any sense ? I hope so :) > >ps. The reason for differentiate classpath and extdirs and not just >concatente them is that extdirs and classpath has differences in their >semantics for classloading... > Thanks, this information is very helpful. It sounds like I need to read up on extdirs. Also, what you suggest would require some way to detect which version of javac is running. I have been thinking of adding a variable to specify which version of the JDK you are using. Another possibliity is for the JDE to invoke java -version at the beginning of a session and parse the result to figure our which JDK is in use. - Paul >Max R. Andersen ([EMAIL PROTECTED])
Re: JDE and ant?
> > I was under the impression that the -extdirs switch had something to do > with compatibility among libraries built for different VMs, e.g., 1.1 v. > 1.3 -extdirs is a nice and easy method of adding .jars to your classpath more or less automatically. Instead of changing your classpath all the time you just place a .jar file in one of the dirs specified in the -extdirs param. Note per default /lib (i think) is set as your default extdir. This is used to easily install "site-wide" extensions to your java environment. See much more in the Java/Javac docs. Regards Max R. Andersen ([EMAIL PROTECTED])
Re: JDE and ant?
At 09:18 PM 1/16/01 +, you wrote: Paul Kinnucan <[EMAIL PROTECTED]> 16-Jan-01 9:08:12 PM >>> > >>I've updated the JDE to handle environment variables >>in classpaths and was planning on including relative paths >>as well. Both will be included in the next release. > >Cool. So my code was for nothing /8-< > Not if it has helped you. I have decided to revamp the way classpaths are handled in the JDE in order to more easily and robustly incorporate features, such as relative paths, environment variables, and Cygwin-to-Windows path conversion, and now library directories. It has simply been easier for me to implement the new features from scratch then to try to figure out how what you have done fits into the new classpath code, especially as you seem to be focusing on compilation while classpath handling is also used by the JDE's run, debug, beanshell, and javadoc generation commands. > >>Now, at Jason's prompting, I'll probably also add the ability >>to include all the jar/lib files in the directories specified by >>jde-class-library-dirs. > >Why? Why not just use extdirs? It's already there and that's what the >Ant thing means as far as I udnerstand. I'm not familiar with extdirs. I believe Ant allows you to specify a directory and one or more regular expresions for including or excluding files from that directory. I may try to duplicate that capability in a customization variable setting, i.e., you would be able to specify something like jde-class-library-dirs Directory Path: d:/foo/bar Include: in*.jar Include: fo*.zip Exclude: ex*.jar - Paul
Re: JDE and ant?
Nic Ferrier wrote: > Why? Why not just use extdirs? It's already there and that's what the > Ant thing means as far as I udnerstand. > Actually, the functionality that Ant provides allows for somewhat sophisticated definition of paths, filesets, patterns, etc. This is what I was referring to in my previous email. I'm not suggesting anything so complex in JDE -- I think what Paul has most graciously agreed to undertake will be very useful, but not inappropriately complex. I was under the impression that the -extdirs switch had something to do with compatibility among libraries built for different VMs, e.g., 1.1 v. 1.3 begin:vcard n:Stell;Jason tel;pager:800-724-3329 PIN 382-8028 tel;work:(703) 471-2529 x-mozilla-html:FALSE url:http://www.intelixinc.com adr:;; version:2.1 email;internet:[EMAIL PROTECTED] title:Consultant (Intelix, Inc.) fn:Jason Stell end:vcard
Re: JDE and ant?
>>> "Max R. Andersen" <[EMAIL PROTECTED]> 16-Jan-01 9:16:00 PM >>> >One of the great things about ant is that it let you >specify both classpath and extdirs. And dependent >on wether the compiler is javac or jikes it handle >them transparently. >1. If it is javac it just uses -cp >and -extdirs >2. If it is jikes it appends all the dirs and jar files found in > to the classpath. >Could a similar functionallity be incoporated into JDE ? This is something else that my code (that Paul doesn't want) did quite well. >maybe a jde-compile-compiler-support-extdirs that should >be set to false to activate option 2 above. I believe the problem is that JDE tries to have a generic compile function. If you could select the compile (or more accurately build) function on the basis of a particular product then they could easily do things like that. My code allows that. You have a bunch of compiler functions (for javac, jikes, kopi, make, ant, etc...) and specify which one you want to use. Then each function handles the job of interpreting the jde-compile options as it should. My jikes compiler function for example does exactly wha you suggest: - appends jde-compile-classpath to the classpath - searches the jde-compile-extdirs for .jar files and adds them to classpath - compiles with that classpath The javac version just passes things through. Nic >ps. The reason for differentiate classpath and extdirs >and not just concatente them is that extdirs and >classpath has differences in their semantics for >classloading... Agreed. But the differences are minor. When the compiler doesn't support it you might as well go with appending everything as you suggest.
Re: JDE and ant?
>>> Paul Kinnucan <[EMAIL PROTECTED]> 16-Jan-01 9:08:12 PM >>> >I've updated the JDE to handle environment variables >in classpaths and was planning on including relative paths >as well. Both will be included in the next release. Cool. So my code was for nothing /8-< >Now, at Jason's prompting, I'll probably also add the ability >to include all the jar/lib files in the directories specified by >jde-class-library-dirs. Why? Why not just use extdirs? It's already there and that's what the Ant thing means as far as I udnerstand. Nic
Re: JDE and ant?
On Tue, 16 Jan 2001, Paul Kinnucan wrote: > > I've updated the JDE to handle environment variables in classpaths and was > planning on including relative paths as well. Both will be included in the > next release. Now, at Jason's prompting, I'll probably also add the ability > to include all the jar/lib files in the directories specified by > jde-class-library-dirs. > All of this sounds really great and may I suggest another related feature ? One of the great things about ant is that it let you specify both classpath and extdirs. And dependent on wether the compiler is javac or jikes it handle them transparently. 1. If it is javac it just uses -cp and -extdirs 2. If it is jikes it appends all the dirs and jar files found in to the classpath. Could a similar functionallity be incoporated into JDE ? maybe a jde-compile-compiler-support-extdirs that should be set to false to activate option 2 above. And to be complete a jde-run-jvm-support-extdirs to do the same for Java 1.1 (which do not support extdirs) and Java 1.2-3 (which does support it) Did that make any sense ? I hope so :) ps. The reason for differentiate classpath and extdirs and not just concatente them is that extdirs and classpath has differences in their semantics for classloading... Max R. Andersen ([EMAIL PROTECTED])
Re: JDE and ant?
At 09:00 PM 1/16/01 +, Nic Ferrier wrote: Paul Kinnucan <[EMAIL PROTECTED]> 16-Jan-01 8:47:04 PM >>> > >>>Ant has some nice features that might be useful -- >>>especially classpath management. For instance, >>>you can set it up to automatically include all >>>jars/zips in a particular directory in the build classpath. >>>This might be a nice feature for JDE -- Paul? > >>This would be easy to do. Just give my some clue as >>to how the directory should be specified. Customization >>variable? e.g., >> jde-class-library-dirs > >I've done this with my compile stuff. The ant feature is the same as >extdir. So that's what I did... just had the ant compilation module >use the extdir. > >I'll be releasing a new vesion of the jde-compile-plus (wish I didn't >have to use that name) stuff soon. The new version includes a macro to >handle relative paths. The compiler funcs revert to tradition funcs >that can be called through a pointer (which allows different funcs to >be used). > >The relative path macro could be used across the JDE to apply >relative paths wherever they are needed. Hi Nic, I've updated the JDE to handle environment variables in classpaths and was planning on including relative paths as well. Both will be included in the next release. Now, at Jason's prompting, I'll probably also add the ability to include all the jar/lib files in the directories specified by jde-class-library-dirs. - Paul
Re: JDE and ant?
>>> Paul Kinnucan <[EMAIL PROTECTED]> 16-Jan-01 8:47:04 PM >>> >>Ant has some nice features that might be useful -- >>especially classpath management. For instance, >>you can set it up to automatically include all >>jars/zips in a particular directory in the build classpath. >>This might be a nice feature for JDE -- Paul? >This would be easy to do. Just give my some clue as >to how the directory should be specified. Customization >variable? e.g., > jde-class-library-dirs I've done this with my compile stuff. The ant feature is the same as extdir. So that's what I did... just had the ant compilation module use the extdir. I'll be releasing a new vesion of the jde-compile-plus (wish I didn't have to use that name) stuff soon. The new version includes a macro to handle relative paths. The compiler funcs revert to tradition funcs that can be called through a pointer (which allows different funcs to be used). The relative path macro could be used across the JDE to apply relative paths wherever they are needed. Nic Ferrier
Re: JDE and ant?
Paul Kinnucan wrote: This would be easy to do. Just give my some clue as to how the directory should be specified. Customization variable? e.g., jde-class-library-dirs A project customization variable would be good. Maybe a select option for including zips/including jars/including both...? Maybe something like: Jde Class Library Dirs [INS] [DEL] List: Library Directory: Include Archives: ( ) zip ( ) jar (*) both begin:vcard n:Stell;Jason tel;pager:800-724-3329 PIN 382-8028 tel;work:(703) 471-2529 x-mozilla-html:FALSE url:http://www.intelixinc.com adr:;; version:2.1 email;internet:[EMAIL PROTECTED] title:Consultant (Intelix, Inc.) fn:Jason Stell end:vcard
Re: JDE and ant?
At 03:17 PM 1/16/01 -0500, Jason Stell wrote: > >Ben Speakmon wrote: > >> >> I fail to understand why you want to pass a JDE buffer to a project >> builder. Why use a builder at all if you're only concerned about one >> file? Or does ant do something else that you're trying to use from >> within emacs? >> > >Ant has some nice features that might be useful -- especially classpath >management. For instance, you can set it up to automatically include all >jars/zips in a particular directory in the build classpath. > >This might be a nice feature for JDE -- Paul? This would be easy to do. Just give my some clue as to how the directory should be specified. Customization variable? e.g., jde-class-library-dirs - Paul
Re: JDE and ant?
Ben Speakmon wrote: > > I fail to understand why you want to pass a JDE buffer to a project > builder. Why use a builder at all if you're only concerned about one > file? Or does ant do something else that you're trying to use from > within emacs? > Ant has some nice features that might be useful -- especially classpath management. For instance, you can set it up to automatically include all jars/zips in a particular directory in the build classpath. This might be a nice feature for JDE -- Paul? begin:vcard n:Stell;Jason tel;pager:800-724-3329 PIN 382-8028 tel;work:(703) 471-2529 x-mozilla-html:FALSE url:http://www.intelixinc.com adr:;; version:2.1 email;internet:[EMAIL PROTECTED] title:Consultant (Intelix, Inc.) fn:Jason Stell end:vcard
Re: JDE and ant?
Oops ... didn't quite change it correctly... try this: (defun jde-build-ant-command (target more-args) "Constructs the java ant command." (let (ant-command) (setq ant-command (concat jde-ant-program " -D" buffer-file-name)) ;; <--- NOTE THIS LINE!!! (if (not (string= jde-ant-buildfile "")) (setq ant-command (concat ant-command "-buildfile " jde-ant-buildfile " "))) (if (not (string= target "")) (setq ant-command (concat ant-command target " "))) (if (not (string= jde-ant-args "")) (setq ant-command (concat ant-command jde-ant-args " "))) (if (not (string= more-args "")) (setq ant-command (concat ant-command more-args " "))) ant-command)) This effectively adds -D to the ant execution command. HTH Jason Kevin Jones wrote: > Hmmm. You could create a simple ant build file that accepts > the name of > your file as an input variable... > I already have this - I can do ant -DsomeFile.java, and it will compile that file. What I want is to be able to pass the file I am currently editing to ant when I'm usinjg JDE/emacs, Kevin Jones DevelopMentor www.develop.com > -Original Message- > From: Jason Stell [mailto:[EMAIL PROTECTED]] > Sent: 16 January 2001 13:17 > To: Kevin Jones > Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] > Subject: Re: JDE and ant? > > > Kevin > > Hmmm. You could create a simple ant build file that accepts > the name of > your file as an input variable... > > But I'm not sure this is really what you want to be using Ant to do... > > Ant, like Make, is a very useful tool for controlling _project_ > builds, not so > much for compiling individual files (unless you only have 1 file in your > project... :) ). > > I suggest sticking with the normal jde-compile functionality for compiling > individual files, and using Ant to manage the project as a whole. > > > Regards, > Jason > > Kevin Jones wrote: > > > Jason, > > > > this looks pretty cool. What I'm also trying to do is get JDE to compile > > using ant. To do this I need to replace what JDE thinks of as > the compiler > > (javac) with ant, then pass ant the current file name as a property, so > > ant -Dfiletocompile.java. Is there any way I can get jde to do this? > > > > Kevin Jones > > DevelopMentor > > www.develop.com > > > > > -Original Message- > > > From: Jason Stell [mailto:[EMAIL PROTECTED]] > > > Sent: 12 January 2001 14:01 > > > To: [EMAIL PROTECTED] > > > Cc: [EMAIL PROTECTED] > > > Subject: Re: JDE and ant? > > > > > > > > > Raman > > > > > > FWIW-- I've attached jde-ant.el, which I created a few months back. It > > > may or may not be useful to you... > > > > > > Regards, > > > Jason > > > > > > "T. V. Raman" wrote: > > > > > > > I've started playing with ant --this is the build system > > > > used by the various java.apache projects --and it is very > > > > nice. > > > > anyone out there writing jde helpers for ant integration? > > > > It may not require much --ant consumes a buld.xml file and > > > > does its work happily -- > > > > > > > > -- > > > > Best Regards, > > > > --raman > > > > > > > > > > > > IBM Research: Human Language Technologies > > > > Phone: 1 (408) 927 2608 > > > > Fax: 1 (408) 927 3012 > > > > Email: [EMAIL PROTECTED] > > > > WWW: http://www.cs.cornell.edu/home/raman > > > > PGP: http://cs.cornell.edu/home/raman/raman.asc > > > > Snail: IBM Almaden Research Center, > > > > 650 Harry Road > > > > San Jose 95120 > > > > > > > > begin:vcard n:Stell;Jason tel;pager:800-724-3329 PIN 382-8028 tel;work:(703) 471-2529 x-mozilla-html:FALSE url:http://www.intelixinc.com adr:;; version:2.1 email;internet:[EMAIL PROTECTED] title:Consultant (Intelix, Inc.) fn:Jason Stell end:vcard
RE: JDE and ant?
On 16 Jan 2001 19:52:58 +, Kevin Jones wrote: > > Hmmm. You could create a simple ant build file that accepts > > the name of > > your file as an input variable... > > > > I already have this - I can do ant -DsomeFile.java, and it will compile that > file. What I want is to be able to pass the file I am currently editing to > ant when I'm usinjg JDE/emacs, I fail to understand why you want to pass a JDE buffer to a project builder. Why use a builder at all if you're only concerned about one file? Or does ant do something else that you're trying to use from within emacs? -- -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* Benjamin A. Speakmon Associate Software Engineer, Web Products Division TeleCommunication Systems, Inc. Email: [EMAIL PROTECTED]
Re: JDE and ant?
You might try changing the jde-build-ant-command in jde-ant.el to something like (defun jde-build-ant-command (target more-args) "Constructs the java ant command." (let (ant-command) (setq ant-command (concat jde-ant-program " -D")) (if (not (string= jde-ant-buildfile "")) (setq ant-command (concat ant-command "-buildfile " jde-ant-buildfile " "))) ;; <--- NOTE THIS LINE!!! (if (not (string= target "")) (setq ant-command (concat ant-command target " "))) (if (not (string= jde-ant-args "")) (setq ant-command (concat ant-command jde-ant-args " "))) (if (not (string= more-args "")) (setq ant-command (concat ant-command more-args " "))) ant-command)) This effectively adds -D to the ant execution command. HTH Jason Kevin Jones wrote: > Hmmm. You could create a simple ant build file that accepts > the name of > your file as an input variable... > I already have this - I can do ant -DsomeFile.java, and it will compile that file. What I want is to be able to pass the file I am currently editing to ant when I'm usinjg JDE/emacs, Kevin Jones DevelopMentor www.develop.com > -Original Message- > From: Jason Stell [mailto:[EMAIL PROTECTED]] > Sent: 16 January 2001 13:17 > To: Kevin Jones > Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] > Subject: Re: JDE and ant? > > > Kevin > > Hmmm. You could create a simple ant build file that accepts > the name of > your file as an input variable... > > But I'm not sure this is really what you want to be using Ant to do... > > Ant, like Make, is a very useful tool for controlling _project_ > builds, not so > much for compiling individual files (unless you only have 1 file in your > project... :) ). > > I suggest sticking with the normal jde-compile functionality for compiling > individual files, and using Ant to manage the project as a whole. > > > Regards, > Jason > > Kevin Jones wrote: > > > Jason, > > > > this looks pretty cool. What I'm also trying to do is get JDE to compile > > using ant. To do this I need to replace what JDE thinks of as > the compiler > > (javac) with ant, then pass ant the current file name as a property, so > > ant -Dfiletocompile.java. Is there any way I can get jde to do this? > > > > Kevin Jones > > DevelopMentor > > www.develop.com > > > > > -Original Message- > > > From: Jason Stell [mailto:[EMAIL PROTECTED]] > > > Sent: 12 January 2001 14:01 > > > To: [EMAIL PROTECTED] > > > Cc: [EMAIL PROTECTED] > > > Subject: Re: JDE and ant? > > > > > > > > > Raman > > > > > > FWIW-- I've attached jde-ant.el, which I created a few months back. It > > > may or may not be useful to you... > > > > > > Regards, > > > Jason > > > > > > "T. V. Raman" wrote: > > > > > > > I've started playing with ant --this is the build system > > > > used by the various java.apache projects --and it is very > > > > nice. > > > > anyone out there writing jde helpers for ant integration? > > > > It may not require much --ant consumes a buld.xml file and > > > > does its work happily -- > > > > > > > > -- > > > > Best Regards, > > > > --raman > > > > > > > > > > > > IBM Research: Human Language Technologies > > > > Phone: 1 (408) 927 2608 > > > > Fax: 1 (408) 927 3012 > > > > Email: [EMAIL PROTECTED] > > > > WWW: http://www.cs.cornell.edu/home/raman > > > > PGP: http://cs.cornell.edu/home/raman/raman.asc > > > > Snail: IBM Almaden Research Center, > > > > 650 Harry Road > > > > San Jose 95120 > > > > > > > > begin:vcard n:Stell;Jason tel;pager:800-724-3329 PIN 382-8028 tel;work:(703) 471-2529 x-mozilla-html:FALSE url:http://www.intelixinc.com adr:;; version:2.1 email;internet:[EMAIL PROTECTED] title:Consultant (Intelix, Inc.) fn:Jason Stell end:vcard
RE: JDE and ant?
> Hmmm. You could create a simple ant build file that accepts > the name of > your file as an input variable... > I already have this - I can do ant -DsomeFile.java, and it will compile that file. What I want is to be able to pass the file I am currently editing to ant when I'm usinjg JDE/emacs, Kevin Jones DevelopMentor www.develop.com > -Original Message- > From: Jason Stell [mailto:[EMAIL PROTECTED]] > Sent: 16 January 2001 13:17 > To: Kevin Jones > Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] > Subject: Re: JDE and ant? > > > Kevin > > Hmmm. You could create a simple ant build file that accepts > the name of > your file as an input variable... > > But I'm not sure this is really what you want to be using Ant to do... > > Ant, like Make, is a very useful tool for controlling _project_ > builds, not so > much for compiling individual files (unless you only have 1 file in your > project... :) ). > > I suggest sticking with the normal jde-compile functionality for compiling > individual files, and using Ant to manage the project as a whole. > > > Regards, > Jason > > Kevin Jones wrote: > > > Jason, > > > > this looks pretty cool. What I'm also trying to do is get JDE to compile > > using ant. To do this I need to replace what JDE thinks of as > the compiler > > (javac) with ant, then pass ant the current file name as a property, so > > ant -Dfiletocompile.java. Is there any way I can get jde to do this? > > > > Kevin Jones > > DevelopMentor > > www.develop.com > > > > > -----Original Message- > > > From: Jason Stell [mailto:[EMAIL PROTECTED]] > > > Sent: 12 January 2001 14:01 > > > To: [EMAIL PROTECTED] > > > Cc: [EMAIL PROTECTED] > > > Subject: Re: JDE and ant? > > > > > > > > > Raman > > > > > > FWIW-- I've attached jde-ant.el, which I created a few months back. It > > > may or may not be useful to you... > > > > > > Regards, > > > Jason > > > > > > "T. V. Raman" wrote: > > > > > > > I've started playing with ant --this is the build system > > > > used by the various java.apache projects --and it is very > > > > nice. > > > > anyone out there writing jde helpers for ant integration? > > > > It may not require much --ant consumes a buld.xml file and > > > > does its work happily -- > > > > > > > > -- > > > > Best Regards, > > > > --raman > > > > > > > > > > > > IBM Research: Human Language Technologies > > > > Phone:1 (408) 927 2608 > > > > Fax:1 (408) 927 3012 > > > > Email:[EMAIL PROTECTED] > > > > WWW: http://www.cs.cornell.edu/home/raman > > > > PGP: http://cs.cornell.edu/home/raman/raman.asc > > > > Snail:IBM Almaden Research Center, > > > > 650 Harry Road > > > > San Jose 95120 > > > > > > > >
Re: JDE and ant?
Kevin Hmmm. You could create a simple ant build file that accepts the name of your file as an input variable... But I'm not sure this is really what you want to be using Ant to do... Ant, like Make, is a very useful tool for controlling _project_ builds, not so much for compiling individual files (unless you only have 1 file in your project... :) ). I suggest sticking with the normal jde-compile functionality for compiling individual files, and using Ant to manage the project as a whole. Regards, Jason Kevin Jones wrote: > Jason, > > this looks pretty cool. What I'm also trying to do is get JDE to compile > using ant. To do this I need to replace what JDE thinks of as the compiler > (javac) with ant, then pass ant the current file name as a property, so > ant -Dfiletocompile.java. Is there any way I can get jde to do this? > > Kevin Jones > DevelopMentor > www.develop.com > > > -Original Message- > > From: Jason Stell [mailto:[EMAIL PROTECTED]] > > Sent: 12 January 2001 14:01 > > To: [EMAIL PROTECTED] > > Cc: [EMAIL PROTECTED] > > Subject: Re: JDE and ant? > > > > > > Raman > > > > FWIW-- I've attached jde-ant.el, which I created a few months back. It > > may or may not be useful to you... > > > > Regards, > > Jason > > > > "T. V. Raman" wrote: > > > > > I've started playing with ant --this is the build system > > > used by the various java.apache projects --and it is very > > > nice. > > > anyone out there writing jde helpers for ant integration? > > > It may not require much --ant consumes a buld.xml file and > > > does its work happily -- > > > > > > -- > > > Best Regards, > > > --raman > > > > > > > > > IBM Research: Human Language Technologies > > > Phone:1 (408) 927 2608 > > > Fax:1 (408) 927 3012 > > > Email:[EMAIL PROTECTED] > > > WWW: http://www.cs.cornell.edu/home/raman > > > PGP: http://cs.cornell.edu/home/raman/raman.asc > > > Snail:IBM Almaden Research Center, > > > 650 Harry Road > > > San Jose 95120 > > > > begin:vcard n:Stell;Jason tel;pager:800-724-3329 PIN 382-8028 tel;work:(703) 471-2529 x-mozilla-html:FALSE url:http://www.intelixinc.com adr:;; version:2.1 email;internet:[EMAIL PROTECTED] title:Consultant (Intelix, Inc.) fn:Jason Stell end:vcard
RE: JDE and ant?
Jason, this looks pretty cool. What I'm also trying to do is get JDE to compile using ant. To do this I need to replace what JDE thinks of as the compiler (javac) with ant, then pass ant the current file name as a property, so ant -Dfiletocompile.java. Is there any way I can get jde to do this? Kevin Jones DevelopMentor www.develop.com > -Original Message- > From: Jason Stell [mailto:[EMAIL PROTECTED]] > Sent: 12 January 2001 14:01 > To: [EMAIL PROTECTED] > Cc: [EMAIL PROTECTED] > Subject: Re: JDE and ant? > > > Raman > > FWIW-- I've attached jde-ant.el, which I created a few months back. It > may or may not be useful to you... > > Regards, > Jason > > "T. V. Raman" wrote: > > > I've started playing with ant --this is the build system > > used by the various java.apache projects --and it is very > > nice. > > anyone out there writing jde helpers for ant integration? > > It may not require much --ant consumes a buld.xml file and > > does its work happily -- > > > > -- > > Best Regards, > > --raman > > > > > > IBM Research: Human Language Technologies > > Phone:1 (408) 927 2608 > > Fax:1 (408) 927 3012 > > Email:[EMAIL PROTECTED] > > WWW: http://www.cs.cornell.edu/home/raman > > PGP: http://cs.cornell.edu/home/raman/raman.asc > > Snail:IBM Almaden Research Center, > > 650 Harry Road > > San Jose 95120 > >