About Ant

I know, this is not the right forum to talk about Ant. But they don't have an own one.
My first impression of Ant is: good idea, but no good design.
Ant's XML files effectively imitate an own programming syntax. Thats not what XML is suited for. I think no future programming language or script language will ever use XML as their main source files like Ant does. Nor will any other Library or Framework do that.
Being an Ant beginner, I have to learn to to program Ant scripts with XML. I cannot "reuse" my Java knowledge for that purpose. All the very basic things I must learn again when learning Ant: like calling a "method", passing "parameters", controlling program flow and so on. They are expressed different in XML syntax than in Java syntax.
So what is the alternative? The alternative would if the Ant creator would not have used XML as Ant's source files but Java source files instead. This would have resulted in a Library or a Framework.
Imagine all the Java Libraries and Java Frameworks being designed like Ant. How many different XML syntaxes would we have to learn!
I think its sad that Ant used the XML files. It wold be okay to use them as property files, but not as the main source files.
I could say more against the Ant design, but this is the main design blunder in my eyes.
What do you think?

I know, this is not the right forum to talk about Ant. But they don't have an own one.There is an Ant mailing list. Perhaps you should send this to the list and see what kind of response you get.
My first impression of Ant is: good idea, but no good design.It's an excellent design, IMO. You couldn't be more wrong.
Ant's XML files effectively imitate an own programming syntax. Thats not what XML is suited for. I think no
future programming language or script language will ever use XML as their main source files like Ant does. Nor will any other Library or Framework do that.Ant does not pretend to be a programming language. There aren't constructs for looping, and the conditional logic is quite limited. I've even read in the docs (can't recall where right now) that it's not intended to be a full-fledged scripting language.
Being an Ant beginner, I have to learn to to program Ant scripts with XML. I cannot "reuse" my Java
knowledge for that purpose. All the very basic things I must learn again when learning Ant: like calling a
"method", passing "parameters", controlling program flow and so on. They are expressed different in XML syntax than in Java syntax."Being an Ant beginner" - there's the problem. Shallow knowledge.
They didn't intend for you to reuse your Java knowledge. Ant isn't a replacement for Java. It's a replacement for make. It is a framework that happens to use Java classes to implement common tasks, passing parameters to those tasks via XML.
Actually, I think it's a very nice framework that makes it possible for people to add tasks as they discover them, because they can define the task class and the XML to drive it in such a way that they're orthogonal to all other tasks. Today one programmer can add WebLogic EJB tasks, tomorrow it's another sending in JBoss EJB tasks for inclusion. It's a flexible, elegant design IMO.
So what is the alternative? The alternative would if the Ant creator would not have used XML as Ant's
source files but Java source files instead. This would have resulted in a Library or a Framework.What do you think is doing the work behind the scenes in that ant.jar? Java classes! XML happens to be a convenient, well-understood syntax for providing input values to drive those tasks and glue them together.
Imagine all the Java Libraries and Java Frameworks
being designed like Ant. How many different XML
syntaxes would we have to learn!This comment tells me that you don't understand libraries, frameworks, or Ant.
I think its sad that Ant used the XML files. It wold be okay to use them as property files, but not as the
main source files.You'd rather have property files than XML? You're a minority of one there. XML is routinely used to supply properties to Web apps, EJB descriptors, B2B apps, etc. What do you have against the use of XML? It's quite common, and a natural choice.
I could say more against the Ant design, but this is the main design blunder in my eyes.Please do pass this note to the Ant mailing list. I'm sure the designers are waiting to hear from you.
What do you think?I think this is one of the most ignorant posts I've seen in a while. - MOD

Similar Messages

  • Information About Ant Tool

    What is the main purpose of ANT Tool? Can any body tell me?
    Thanks in advance
    Srinivasa Rao Somu
    Software Engineer
    Netsoft Global Informatics Pvt ltd.
    [email protected]

    Ant is a tool for automating the process of building Java applications. It can do just about anything you need to do: compile, package, move files around, even create javadoc. The documentation is actually pretty good:
    http://ant.apache.org/manual/index.html
    http://ant.apache.org/
    At my company we use it to build our applications from source then take the classes, wrap them up with configs (and other stuff) and deploy the archive file to a location for each instance.
    The config can be a little intimidating at first. I'd suggest getting a few example build files to get started.
    ~ Robert

  • Problems about Ant tool

    here goes my build.xml
    <project name="lniteims" default="build" basedir=".">
    <property name="j2ee.home" value="c:/sun/appserver"/>
    <path id="classpath">
    <fileset dir="${j2ee.home}/lib">
    <include name="j2ee.jar"/>
    </fileset>
    </path>
    <target name="build" depends="init">
    <javac srcdir="source" destdir="build" description="Comiple the source files">
    <inculde name="**/*.java"/>
    <classpath refid="classpath"/>
    </javac>
    </target>
    <target name="init">
    <tstamp/>
    <mkdir dir="build"/>
    </target>
    </project>
    When i tried to run asant build, ant told me that :C:\Documents and Settings\Liu Bo\My Documents\lniteims\build.xml:9: The <javac>
    type doesn't support the nested "inculde" element.
    it shouldn't be like that because i fould in the manul of ant this snippet of xml: <javac sourcepath="" srcdir="${src}"
    destdir="${build}" >
    <include name="**/*.java" />
    <exclude name="**/Example.java" />
    </javac>
    Who can tell me WHY??????????????????????
    Thanks in advance!!!!!!!!!!!!!!!!!!!!!!!!!1

    Thanks!
    i do misspell the word.
    by the way, i wanna discuss with you some of the problems that i've been suffering for a long time.
    there are three:
    The first problem goes below.
    Several JSP pages in bookstore2 refer to the only BookDBAO object created in servelet context using this statement:
    <jsp:setProperty name="bookDB" property="database" value="${bookDBAO}" />
    Why are there no database sycronizations in bookstore2 application?
    I know that the BookDB bean is created in page scope, but its database property is refering to the only BookDBAO object created in application scope.
    i am confused about this.
    By the way, can we just use EL expressions in this way:${bookDBAO}?
    i bet it should be ${applicationScope.bookDBAO}
    The second problem is about the only servlet dispatcher in bookstore2.
    I refer to the "Java Servlet Specification Version 2.4".
    it says that :"For a servlet not hosted in a distributed environment (the default), the servlet
    container must use only one instance per servlet declaration."
    The dispatcher in bookstore2 also use the application-scoped BookDBAO object.
    if the only instance of diapatcher handles several requests from web clients, the application-scoped BookDBAO object is actually accessed by several threads created by the container to provide servies to those web clients.
    In this context, i consider that the access to database in BookDBAO object should be syncronized to keep the application work well.
    The last one is about resource reference.
    in admin console of the application server, we configure pointbasepool for the bookstore applications. There is one parameter called "resource type". it has been configured "javax.sql.xaDatasource" This connection pool is used by one jdbc resource whose jndi name is "jdbc.bookdb". When i run the deploytool of the application server, i opened the bookstore2.war(provided war) and moved to resource reference tab and saw that the resouce type is configured javax.sql.Datasource. i am confused about the difference. I 've looked up the j2se documentation and read through materials about the two interfaces. But i just don't know how to use them.
    i will be grateful if you can help me.
    Thanks!!!!

  • Question about ant converter

    When I use ant converter, I get the following message:
    Usage: java [-options] class [args...]
    (to execute a class)
    or java -jar [-options] jarfile [args...]
    (to execute a jar file)
    where options include:
    -cp -classpath <directories and zip/jar files separated by ;>
    set search path for application classes and resources
    -D<name>=<value>
    set a system property
    -verbose[:class|gc|jni]
    enable verbose output
    -version print product version and exit
    -showversion print product version and continue
    -? -help print this help message
    -X print help on non-standard options
    It seems that this message is the usage of java interpreter. What is wrong with my settings? Thanks in advance.

    I use ant 1.3. I downloaded jakarta-ant-1.3-bin.zip following the link on http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/J2eeTutorialPreface.html#46338.
    My environment setting is as follows:
    set path=c:\j2sdk1.4.0-beta3\bin\;c:\students\sheng\j2sdkee1.3.1\bin\;c:\j2sdk1.4.0-beta3\jre\lib;c:\students\sheng\ant\bin;%path%;
    set J2EE_CLASSPATH=C:\students\sheng\j2sdkee1.3.1\lib\
    set JAVA_HOME=c:\j2sdk1.4.0-beta3\
    set ANT_HOME=c:\students\sheng\ant\
    set J2EE_HOME=c:\students\sheng\j2sdkee1.3.1\
    I tried to run "ant converter" to compile the example code in c:\students\sheng\j2eetutorial\examples\src, but I got that error message (same with java command usage) whatever directory I run that "ant converter" command.
    Thanks a lot.
    Truly yours,
    Sheng

  • Know about ant-sca-deploy.xml

    Hi All,
    Can you please explain me the ant-sca-deploy.xml works, whcih parameters has to be passed ? for deployment

    Hi
    You can get more information from "ant-sca-deploy.xml" 's deploy target.
    <target name="deploy">
    <input message="Please enter server URL:" addproperty="serverURL"/>
    <input message="Please enter sar location:" addproperty="sarLocation"/>
    <deployComposite serverUrl="${serverURL}" sarLocation="${sarLocation}" user="${user}" password="${password}"
    overwrite="${overwrite}" forceDefault="${forceDefault}" configPlan="${configplan}"
    sysPropFile="${sysPropFile}"/>
    </target>
    One Example:
    ant -f e:\Oracle\Middleware\Oracle_SOA1\bin\ant-sca-deploy.xml -DserverURL=http://DOMAIN:8001 -DsarLocation=D:\SayHelloSCA\deploy\sca_SayHelloSCA_rev1.0.jar -Duser=weblogic -Dpassword=weblogic -Doverwrite=true
    You can also get help using "help" target
    ant -f D:\Oracle\Middleware\Oracle_SOA1\bin\ant-sca-deploy.xml help
    Edited by: Kathir(597386 ) on Sep 1, 2009 12:51 AM

  • Question about *****ANT*****

    Hi, i am now working with ant to test several Junit classes.
    One of Junit classes is Log In command, and this uses a specific id and password to connect to database.
    (Basically i am testing the connection function)
    But my manager wants me to put these id and password values into a properties file.
    So when user runs ant(buildall.xml), these id and password values will be sent to the test class, and the test class use these values to connect to database.
    My question is that:
    is it possible to sent a value from ant to test class?
    My manager mentioned <input> function, but it doesn't help me much.
    Can anyone please help me?
    Thanks in advance :)

    > Junit test is a part of java, isnt it?
    Well, not really. It's a third-party unit testing framework. Similarly, Ant isn't "part of" Java, either. However, both tools are ubiquitous in Java development, and there's no reason why suggestions can't be given here. That said, if I had a question like this, I'd explore Apache Ant and JUnit resources (such as the Ant manual I linked above) before posting a question at this forum.
    Best of luck.
    ~

  • About ant tools dtd file

    An XML document that conforms to a given DTD or XML Schema can be said to be well formed according to the XML syntax rules and valid according to that DTD or XML Schema.
    Ant build files must be well formed XML documents. However, there are no formal DTD's or XML Schemas for Ant build files. Ant doesn't have DTD's or XML Schemas essentially because the rules for a valid Ant build file can change so easily. For example, Ant allows you to create your own types of XML elements and use them in your build files - which would immediately make your build file invalid according to the 'standard' DTD or XML Schema.
    QUESTION : if ANT doent have a dtd file , how it is decided that it is well
    formed or valid or wher r the rules defined ... please explain

    You cannot have a formal XML schema:
    http://www.theone.ru/lists/comp.lang.java.programmer/msg00560.html
    You can find an informal XML DTD or schema at
    http://www.sdv.fr/pages/casa/html/ant-dtd.en.html
    http://www.lal.in2p3.fr/cgi-bin/cvsweb/cvsweb.cgi/build/ant.dtd

  • Ant in Jdeveloper!

    Hi! Can anyone give me an tutorial about Ant in Jdeveloper? And explain how app. developers work with ant and why?
    Best regards, Debuger!

    hi Debuger
    Debuger wrote:
    ... And there is some tutorial ojdeploy + ANT? ...Maybe the documentation section "2.5 Deploying Using Scripts and Ant " can help
    at http://download.oracle.com/docs/cd/E21764_01/web.1111/e15470/deploy.htm#ADFAG20592
    (No, I am not trying to be cynical by referring you to the "half page documentation effort " that Oracle has put into this.)
    success
    Jan Vervecken

  • What is ANT application when I am using J2EE?

    Hi all,
    I am planning to install J2EE, in the installation, it is asking me to set the ANT_HOME home too.
    Is the ANT_HOME a separate installation or it is a part of J2EE 1.3?
    Could you please help me
    thanks
    Yahya

    Hi,
    Ant is a Jakarta product that allow you to easily install both your J2EE server building it from source, and the J2EE applications examples.
    Ant provides a platform indipendent way to create executable files using XML language.
    Ant is not part of the J2EE platform, and you don't need to install it if you are able to do the steps above by yourself.
    If you want to learn more about Ant you can visit this url:
    http://jakarta.apache.org/ant/index.html
    Bye

  • Ant File Problem in Eclipse

    Hey guys,
    I am having alot of trouble getting a simple ant buildfile to work in eclipse.
    I am following the tutorial on here (the part about ant files):
    http://help.eclipse.org/help32/index.jsp?topic=/org.eclipse.platform.doc.user/gettingStarted/qs-93_project_builder.htm
    I have created a simple java project called HelloWorld and created a build file below in a package 'org':
    <?xml version="1.0" encoding="UTF-8"?>
    <project name="HelloWorld" default="Hello" basedir=".">
    <property name="HelloText" value="Hello"/>
        <target name="Hello">
            <echo>${HelloText}</echo>
        </target>
    </project>According to the tutorial, I should get an outline in Eclipse (i use 3.2), etc, etc however I only get problems:
    - Whenever I save the file I get "Save Failed: org/apache/tools/ant/launch/AntMain"
    - When I attempt to add the buildfile to the 'Ant' pane on the right, I get error:
    "failed to parse ant build file"
    If anyone has any advice on how to get a simple ant file like the one above working, it would be so much appreciated!
    Thanks
    Gerry
    ant newbie

    doremifasollatido wrote:
    cotton.m wrote:
    Hey dore! What a pleasant surprise seeing you here.Thanks! Yep, I'm here. Not so late as there. :-P
    Just thought I'd see what was going on around here these days (not that I figured much would change,the more things change...
    but always good to log in and answer a few questions at least now and again).Indeed, very much so.
    PS NR sent me an invite to another job networking site I will respond but I don't think I will be of much help, but I do know who NR is because sometimes he seems to think I won't know though I don't know many other NRs so it's hard to not know. You know. ;)

  • Calling ant script from another's project ant script

    Hello there,
    I would like to ask something about ant script. Sorry if this is not the right forum but I could not find a better one.
    I have 2 projects ProjectA and ProjectB in 2 different direcory structures, that contain 2 different build.xml files. I am trying to call ant of ProjectA inside the build.xml file of ProjectB like the following:
             <!-- inside build.xml of ProjectB-->
            <target name="buildProjectA">
                <ant antfile="${ProjectA.root}/build.xml" dir="${ProjectA.root}" inheritAll="false"/>
            </target>Unfortunately I get a different output than calling ant for Project A from the command prompt. Shouldn't this call to ant for ProjectA from ProjectB be exactly the same as calling ant from the command Prompt

    thanks for your reply,
    the problem is not that it does not file the xml file (although you re right, I changed it) but that later on in the building it behaves differently
    So, basically, what I want to know, is this the right way I am doing it or the two approaches are different cause in my approach ant is not called from the project's directory but from another ant script?

  • Linking "ant" project with GUI

    Hello,
    I have an "ant" project (is a speech recognition system) that I want to link to a GUI. I did not make the "ant" project but I know how to use it; I have no experience working with "ant" projects or files.
    Does anyone have any ideas? or, Does anyone have a link where I can learn more about "ant"? I'm using netbeans for my application. I googled ant but have not found anything that can help; I'll keep googling but suggestions are appreciated.

    I googled ant but have not found anything that can help; I'll keep googling but suggestions are appreciated.http://ant.apache.org/
    ~

  • What the hey - ANT classpath element?

    I've fallen into this trap before. A book I have (java development with ANT) AND the ant manual itself reference a type called "classpath". See here:
    http://ant.apache.org/manual/using.html#path
    When used however, ant dies with an error stating that the "classpath" type does not exist. And with good reason: looking at the ANT source code I cannot find this type anywhere!
    What gives? Was it removed starting from some version? I know you can just replace "classpath" with "path" and it wil work :s

    I'll try the classpath subtype just in case I missed
    that by mistake, but the ANT source code alone does
    not contain a classpath type anywhere that I can findI'm still confused by what you mean by "type" and "subtype".
    Ant defines tasks, which appear in the buildfile as children of the <project> element. Each task has a type that implements it, derived from org.apache.tools.ant.Task. A task definition provides setters for each of its attributes, and these may be invoked either in response to attributes in the task's element, or from child elements.
    A "type" as referenced by http://ant.apache.org/manual/conceptstypeslist.html is a bit misleading. As Ant processes the buildfile, it will attempt to convert task attributes so that they can be passed to the appropriate setters. This is described in http://ant.apache.org/manual/develop.html#writingowntask along with the allowable conversions.
    As to "classpath": if you look at the javadoc for org.apache.tools.ant.taskdefs.Java, you'll see a method setClasspath(Path s). As Ant scans the buildfile, it will look for an attribute or child element with the name "classpath", then attempt to apply a conversion that will allow it to call that setter method.
    Again, what is it that you're trying to do? Asking that question will probably get you better results than questions about Ant's implementation.

  • Working with ANT /CVS/JDeveloper doing integrated build

    Is there a documentation out there which gives details structurally on doing builds using ANT and CVS under JDeveloper?

    Check the JDeveloper online help and search for CVS
    "Using Concurrent Versions System (CVS) With JDeveloper"
    and also for ANT
    "About Ant Integration in JDeveloper"
    You can access the online help online on OTN at:
    http://otn.oracle.com/jdeveloper/903/help/

  • JDIC and ANT - BUILD FAILED

    Can anyone help me?
    I am trying to launch lotus notes from my java application. I made some changes in �ServiceManagerStub.java� to launch lotus note. Here is the changes I made.
    URL: https://jdic.dev.java.net/issues/show_bug.cgi?id=408
    Now I am trying to rebuild build.xml using �ANT�.
    I am using DOS prompt for my compilation.
    I am getting following error. Could any one help me?
    This is the command I used: �ant buildall�
    This is the error I got:
    BUILD FAILED:
    C:\..\..\build.xml:153: The following error occurred while executing this line:
    C:\..\..\build.xml:217: Execute failed: java.io.IOException: createprocess: nmake /f jdic.mak �CFG=jdic � win32 Release� error=2
    This is the command I used: �ant buildwin32�
    This is the error I got:
    BUILD FAILED:
    C:\..\..\build.xml:217: Execute failed: java.io.IOException: createprocess: nmake /f jdic.mak �CFG=jdic � win32 Release� error=2
    Thank you very much for your help.
    Sam
    Message was edited by:
    sam22

    Option 1: I tried to find out the folder where
    "nmake" is located. I could not find it. Could you
    tell me how to find out that folder?If you're on Windows, go to My Computer -> Search and give it some time :-)
    Option 2: I understood that I have to uses external
    path for this. But I am not sure how to do that. Is
    there any way I can get the steps that I have to
    follow? If you want to use the PATH environment variable, it differs slightly between Windows versions.
    I suggest, after you found out the path, first you specify the full path right there in your Ant file where you exec it, just to see if that works. Then, if you have a need to make your script a bit more portable, you can refactor so the path is in an Ant property, which you could choose to define in an external file for maximum flexibility.
    For more information about Ant, see http://ant.apache.org/manual/index.html but feel free to come back with a concrete problem.

Maybe you are looking for

  • Exclamation point but songs play one at a time?

    I wish I could say that after all these years I am smart enough to navigate iTunes... My setup is as follows:  iTunes library is located on a Mac Mini, a couple of Macbooks on the network use iTunes and point to this library. Almost every song in my

  • Creation of asset in PO

    Does anybody know if it is possible to add extra fields in the first screen of asset creation when this is opened from within the PO? More specific: when creating a Purchase Order and the account assignment is set as Asset (multiple account assignmen

  • Length of Applecare Repair

    I sent my pb into Apple on the 6th of Sept. and they are waiting on a part. This pb has been in 2 other times and always back in a couple of days. What is a reasonable length of time to wait? I am a commercial photographer and I use it in my location

  • As3 get position from object in other object

    please i need help, i have a object inside this object i have other objects, (MC.Part1,MC.Part2,MC.Part3...etc), the MC rotate in the escene, that with interpolation, with the tools of flash,that is ok, the object parent rotate and the childs with he

  • Best Practices of security for develop applications

    I need information about a model to use for develop application using Forms and Reports. I read many documents about best security practices for database, but I don´t find information about how can I join the database security with my software, and