Douglas

What if, instead of using the custom string variable jde-ant-program, a new
custom variable jde-ant-invocation-style is a choice between invoking a
specific script or invoking a function that generates the appropriate Ant
command. Perhaps something like:

   Jde Ant Invocation Style: [Hide]

      (*) Use program or script
          Script/Program : __________________________________________

      ( ) Invoke function
          Function : ________________________________________________


This way, jde-ant is flexible enough to do the things you want. When
jde-ant-build is called, the invocation style variable will be checked, and
the ant command will be built accordingly...
A standard function could be created to invoke the jvm defined by
'jde-run-java-vm' using the classpath defined by
'jde-global-classpath'/'jde-run-option-classpath' and the Ant main class.

Thoughts?

Jason





                                                                                       
                                                 
                    Douglas WF                                                         
                                                 
                    Acheson              To:     [EMAIL PROTECTED]             
                                                 
                    <[EMAIL PROTECTED]        cc:                                           
                                                 
                    om>                  Subject:     Re: jde-ant                      
                                                 
                                                                                       
                                                 
                    07/19/01                                                           
                                                 
                    02:00 PM                                                           
                                                 
                                                                                       
                                                 
                                                                                       
                                                 




Hello,

  I understand your position about running ant.  Would it be possible
to allow changes so that you can use it either way?  They way you have
outlined below, via the ant batch/shell script, and invoking a JVM to
run ant.

  Allowing jde-ant to be invoked via a JVM directly allows more
flexible within Emacs.  Using this model allows changes to be
controlled within Emacs and not in the batch/shell script.  Therefore,
change need to occur within the environment of the project and not to
the batch/shell script.

  I have made the necessary changes to jde-ant.el to invoke the JVM.
It was not hard, and very little changes required.

  I was thinking have a boolean switch (jde-ant-use-jvm) that is
checked to see how to invoke ant.  This allows users to invoke it the
way you intended or to allow customization totally in Emacs.

  I believe this is a natural evolution in jde-ant.  I have no
hesitation to provide my services to make the changes and help maintain
those changes.

  What do you think?  Is it viable?


Douglas WF Acheson

--- [EMAIL PROTECTED] wrote:
>
> Douglas
>
> Invoking the jvm from jde-ant is something that has been discussed
> and
> considered. However, my main objection is that Ant is a
> cross-platform
> project build tool that has no (and should have no) dependencies on
> Emacs
> or JDE. Developers need to be able to provide clear build
> instructions to
> the CM/build teams.  Simpler instructions are better. Typically (or,
> at
> least, in my experience) a shell script is used to hide some of the
> complexity of passing arguments to java/Ant.  Most teams probably
> just use
> the default shell scripts that are provided with Ant (I do :).
>
> I don't want to seem stubborn/bull-headed/pedantic, but my
> inclination is
> to keep jde-ant simple, but convenient,  as far as invoking Ant
> builds.
> Once you have jde-ant invoking Ant through the vm, you introduce all
> kinds
> of additional complexity--what VM to use?, should one use Beanshell
> to do
> the invocation?, where are the required .jar files (ant.jar,
> xerces.jar...)? etc.--that I think is desirable to avoid.
>
> In your case, I think the best options are:
>    1) put your custom tasks in a jar and add it to the ANT_HOME/lib
>    directory, or
>    2) set your CLASSPATH environment variable to include the
> appropriate
>    items
>    3) edit the ant(.bat) shell script to include your classpath
> config,
>
>
>
>
>
>
>
>
>
>                     Douglas WF
>
>                     Acheson              To:
> [EMAIL PROTECTED]
>
>                     <[EMAIL PROTECTED]        cc:     [EMAIL PROTECTED]
>
>                     om>                  Subject:     Re: jde-ant
>
>
>
>                     07/18/01
>
>                     02:23 PM
>
>
>
>
>
>
>
>
>
> Jason,
>
>   I think I finally understand :-)  The jde-ant calls the ant.bat
> script.  Why not just have the jde-build-ant-command invoke the jvm
> using the Ant.class.  This way the call to ant is total customizable,
> I
> believe.  In addition, all you have to to is change custom variables
> and do not worry about the bat/sh file.
>
> Douglas WF Acheson
>
> --- Douglas WF Acheson <[EMAIL PROTECTED]> wrote:
> > Thanks for the reply Jason,
> >
> >   I do not mean to be a pain in the ass.
> >
> > Option #1, IMO, will not work as the custom variable jde-ant-args
> is
> > used to pass args to ant.  I need to modify the classpath for the
> JVM
> > that runs ant.
> >
> > Option #2, totally agree, too much work.
> >
> > Option #3, IMO, is the chicken and egg problem.  Need to find the
> > class
> > before using the class.
> >
> > Currently I get a class not found error when running ant as the JVM
> > class loader cannot find my classes.
> >
> > I need to do the following:
> >
> > java -classpath
> > antPath/ant.jar;antPath/jaxp.jar;antPath/parser.jar;myPath/my.jar
> ant
> > -emacs ..
> >
> > What I want to do is modify the classpath that is used by the JVM
> to
> > run ant.  I have looked at the code in jde-ant.el, but do not see
> > where
> > the classpath is constructed.  SO, I was wondering if you could add
> > or
> > help me add the ability to have a customer variable where users can
> > add
> > there own things to the classpath that is used to by the JVM when
> > running ant.
> >
> > If this not clear please let me know.
> >
> > Douglas WF Acheson
> >
> > --- [EMAIL PROTECTED] wrote:
> > >
> > > Douglas
> > >
> > > Options:
> > >
> > > 1 - You can use the jde-ant-args custom variable to pass in the
> > > classpath
> > > you want to use.
> > >
> > > 2 - There is a custom variable jde-ant-program that points to the
> > > script
> > > that runs Ant. You could also edit the script (or create a new
> one)
> > > that
> > > passes in the classpath you want to use; however, this isn't
> > > particularly
> > > elegant (or portable), and I generally discourage doing anything
> > > fancy in
> > > the script you use to run Ant.
> > >
> > > 3 - Modify your custom Ant tasks to allow specification of the
> > > classpath
> > > (for an example, look at how the javac task is implemented).
> > >
> > > HTH
> > >
> > > Jason
> > >
> > >
> > >
> > >
> >
> > >
> > >                     Douglas WF
> >
> > >
> > >                     Acheson              To:
> > > [EMAIL PROTECTED]
> >
> > >
> > >                     <[EMAIL PROTECTED]        cc:
> [EMAIL PROTECTED]
> >
> > >
> > >                     om>                  Subject:     Re: jde-ant
> >
> > >
> > >
> >
> > >
> > >                     07/18/01
> >
> > >
> > >                     11:30 AM
> >
> > >
> > >
> >
> > >
> > >
> >
> > >
> > >
> > >
> > >
> > >
> > > Hello,
> > >
> > >   Thanks for the reply.  I was under the impression that the
> custom
> > > tasks, the ones that I have developed need to be part of the
> > > classpath
> > > that ant uses.  So, if I were to start ant from the command line
> > (not
> > > under Emacs) I would include the ant.jar, parser.jar, and
> jaxp.jar
> > > plus
> > > my.jar in the -classpath option to java.  I believe that the
>
=== message truncated ===


=====
Douglas WF Acheson

__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/




Reply via email to