Ant Tool

Folks, can anybody put some light on working of Ant Tool / Ant Directory Structure / Ant Configuration files.
Thanks
Randhir

http://ant.apache.org
The build.xml file that comes with the standard Identity netbeans tools is relatively straightforward once you understand ant syntax. What are you having problems with?

Similar Messages

  • How can i use JWSDP1.6 from Ant tool to convert .wsdl file into Java class

    Hi All,
    i m very new in the development field.plese help me...
    i have a .wsdl file and i have to make some modification in the file and return this file with build file used in Ant tool.
    means my requirement is to conver the .wsdl file into java class,modify it and convert back to wsdl file.how can i do it using JWSDP1.6 and Ant tool.
    thanks in advance...
    Vikram Singh

    lemilanais wrote:
    hello!
    I have developpe an animation with flash. before give it to othe person in order to use it, i would like to secure it by integrated a security module inside the software.Secure it from what? Being played? Copied? Deleted? Modified?
    Because, i am a java developper, i have choose Netbeans 6.1 to secure it.That has to be the most random thing I've read in some time.
    do you know how can i do to integrate my animation .swf inside my java class?Java can't play SWF files and Flash can't handle Java classes, so what you're suggesting here doesn't make a lot of sense.

  • 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

  • ANT tool for deploying EJB

    Can anybody please tell me how to use ANT tool to deploy EJB or can I get any url regarding this.

    http://ant.apache.org/

  • ANT tools and java card

    Hi,
    I used the ant tools going with the java card development kit 2.2 and I have the following errors when I run the build.xml
    testinit:
    [apdutool] Java Card Ant Tasks, Version 1.0
    [apdutool] Copyright 2005 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.
    [apdutool] Note: Usage of Java Card Ant Tasks is optional. Java Card Ant Tasks are not supported by Sun Microsystems, Inc.
    [apdutool] Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/javacard/apdutool/Main
    If you have ever had this error, can you help me please to solve it?
    Thanks in advance.

    Hi,
    You are missing a JAR file. Check to make sure you have your classpath setup in your build file with the required libraries.
    Cheers,
    Shane

  • Ant tools: converter java card

    Hi,
    I have already a problem with the ant tools for java card.
    I build a build.xml file which has for aim to generate the CAP,EXP, JCA and the *.script files before downloading them on cref.
    I have a problem with the command converter. Here you can find my code:
    <!--generation of the JCA,EXP and CAP file-->
              <echo message = "Generation of the CAP,JCA and EXP files..."     />
              <convert
                   JCA="true"
                   EXP="true"
                   CAP="true"
                   packagename="versionZero"
                   packageaid="0xB0:0x02:0x03:0x04:0x05:0x06:0x07:0x08:0x09:0x00"
                   majorminorversion="1.0"
                   verbose = "true">               
                   <AppletNameAID
                        appletname="versionZero.VersionZero"
                        aid="0xB0:0x02:0x03:0x04:0x05:0x06:0x07:0x08:0x09:0x00:0x00"/>
                   <classpath refid="classpath"/>
              </convert>
         My problem is the following: the command converter say mys package is empty and it is not the case: it contains all the *.java file.
    Must I compile the files with javac before using the convert command or it is another problem?
    Here is the trace of my build.xml file:
    Buildfile: /home/ehoudart/app-manager/VersionZero/src/build.xml
    testinit:
    [echo] Deleting the old generated files...
    [echo] Generation of the CAP,JCA and EXP files...
    [convert] Java Card Ant Tasks, Version 1.0
    [convert] Copyright 2005 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.
    [convert] Note: Usage of Java Card Ant Tasks is optional. Java Card Ant Tasks are not supported by Sun Microsystems, Inc.
    [convert] Java Card 2.2.2 Class File Converter, Version 1.3
    [convert] Copyright 2005 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.
    [convert] error: versionZero: empty package.
    [convert] conversion completed with 1 errors and 0 warnings.
    BUILD FAILED
    /home/ehoudart/app-manager/VersionZero/src/build.xml:115: Conversion failed
    Total time: 384 milliseconds
    Thanks in advance for your answer.

    Hi,
    Please use &#123;code} tags for posting code etc.
    <!--generation of the JCA,EXP and CAP file-->
              <echo message = "Generation of the CAP,JCA and EXP files..."     />
              <convert
                   JCA="true"
                   EXP="true"
                   CAP="true"
                   packagename="versionZero"
                   packageaid="0xB0:0x02:0x03:0x04:0x05:0x06:0x07:0x08:0x09:0x00"
                   majorminorversion="1.0"
                   verbose = "true">               
                   <AppletNameAID
                        appletname="versionZero.VersionZero"
                        aid="0xB0:0x02:0x03:0x04:0x05:0x06:0x07:0x08:0x09:0x00:0x00"/>
                   <classpath refid="classpath"/>
              </convert>
         My problem is the following: the command converter say mys package is empty and it is not the case: it contains all the *.java file.
    Must I compile the files with javac before using the convert command or it is another problem?That is correct. You can make your convert task depend on a compile task for this.
    Cheers,
    Shane

  • ANT tool calling jsp

    Hi
    I'm using ant tool for my project with WSDP(uploading various file formats using jaxm +soap
    ) .I have declared java classes and servlets in build.xml file java classes and servlets are run perfectly
    problem is i need to introduce jsp for my front end , simply jsp will call
    the servlet .
    How do i declare my jsp file in ANT build.xml file.Since jsp files compile at run time
    under which task do i have to declare the name like (javac ,java )
    Thanks

    Hi Priyanka,
    You need to copy the jsp(from the location/ directory where you have stored it) to root directory of your application. The JSP will get automatically compiled when requested for the first time, by the Web Server. I hope the example shown below should help you.
    <!-- Below target copies the JSP file to root of your application, ie.myApplication & java classes get compiled into WEB-INF/classes directory-->
    <target name="target-transfer-to-tomcat-application-root">
    <!-- copy jsp, html to build dir -->
    <copy todir="C:/Tomcat/webapps/myApplication">
    <fileset dir="C:/ProjectDirectory/web" />
    </copy>
    <javac srcdir="C:/ProjectDirectory/web"
    destdir="C:/Tomcat/webapps/myApplication/WEB-INF/classes"
    includes="**/*.java"
    classpathref="" > <!-- Specify the lib reqd in claspath -->
    </javac>
    <target/>
    DEEPAK

  • Ant tools: converter java card -  class file  not belonging to the package!

    Hi
    I have another problem with converter. Could you help me please again if you have the time?
    I have created a directory when I save the class files generated by javac. After That , I use convert in this way:
    <convert
    JCA="true"
    EXP="true"
    CAP="true"
    packagename="testUn/classes/testUn"
    packageaid="0x01:0x01:0x01:0x01:0x01:0x01:0x01:0x01:0x02:0x00"
    majorminorversion="1.0"
    verbose = "true">
    <AppletNameAID
    appletname="testUn.classes.testUn.PorteAppUn"
    aid="0x01:0x01:0x01:0x01:0x01:0x01:0x01:0x01:0x02:0x00:0x00"/>
    <classpath refid="classpath"/>
    </convert>
    Here is the answer of the computer:
    [echo] Generation of the CAP,JCA and EXP files...
    [convert] Java Card Ant Tasks, Version 1.0
    [convert] Copyright 2005 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.
    [convert] Note: Usage of Java Card Ant Tasks is optional. Java Card Ant Tasks are not supported by Sun Microsystems, Inc.
    [convert] Java Card 2.2.2 Class File Converter, Version 1.3
    [convert] Copyright 2005 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.
    [convert] parsing /home/ehoudart/app-manager/VersionZero/src/testUn/classes/testUn/PorteAppUn.class
    [convert] converting testUn.PorteAppUn
    [*convert] error: class PorteAppUn does not belong to package testUn.classes.testUn.*
    [convert] conversion completed with 1 errors and 0 warnings.
    I do not understand why this unique applet class file does not belong to its own package. Is someone an idea?
    Thanks very much in advance for your answer.

    Here is a complete example build.xml (I think I have posted this before).
    <?xml version="1.0" encoding="UTF-8" ?>
    <project default="convert" name="javacard-starter">
      <!-- Build specific properties -->
      <property name="target.classes" location="${basedir}/target/classes" />
      <property name="target.javacard" location="${basedir}/target/javacard" />
      <property name="source.java" location="${basedir}/src/main/java" />
      <!-- Must point to the folder containing the JAR files from the JCDK -->
      <property name="javacard.libs" location="${basedir}/lib" />
      <!-- Must point to the folder containing the JAR file from the JCDK ant task -->
      <property name="javacard.ant-task" location="${basedir}/lib" />
      <!-- Must point to the folder containing the API export files from the JCDK -->
      <property name="javacard.export" location="${basedir}/src/main/export" />
      <property name="verbose" value="true" />
      <property name="noverify" value="false" />
      <!-- Path for JC tasks -->
      <path id="classpath">
        <fileset dir="${javacard.ant-task}">
          <include name="*.jar" />
        </fileset>
        <fileset dir="${javacard.libs}">
          <include name="*.jar" />
        </fileset>
      </path>
      <!-- set the export path to the Java Card export files -->
      <path id="export" description="set the export file path">
        <fileset dir="${javacard.export}">
          <include name="**/*.exp" />
        </fileset>
        <pathelement path="${javacard.export}" />
        <pathelement path="${target.classes}" />
        <pathelement path="${target.javacard}" />
      </path>
      <!-- Definitions for tasks for Java Card tools -->
      <taskdef name="capgen" classname="com.sun.javacard.ant.tasks.CapgenTask" classpathref="classpath" />
      <taskdef name="deploycap" classname="com.sun.javacard.ant.tasks.DeployCapTask" classpathref="classpath" />
      <taskdef name="convert" classname="com.sun.javacard.ant.tasks.ConverterTask" classpathref="classpath" />
      <taskdef name="verifyexport" classname="com.sun.javacard.ant.tasks.VerifyExpTask" classpathref="classpath" />
      <taskdef name="verifycap" classname="com.sun.javacard.ant.tasks.VerifyCapTask" classpathref="classpath" />
      <taskdef name="verifyrevision" classname="com.sun.javacard.ant.tasks.VerifyRevTask" classpathref="classpath" />
      <typedef name="appletnameaid" classname="com.sun.javacard.ant.types.AppletNameAID" classpathref="classpath" />
      <typedef name="jcainputfile" classname="com.sun.javacard.ant.types.JCAInputFile" classpathref="classpath" />
      <target name="init">
        <mkdir dir="${target.classes}" />
        <mkdir dir="${target.javacard}" />
      </target>
      <target name="clean">
        <delete dir="${target.classes}" />
        <delete dir="${target.javacard}" />
        <delete dir="${javacard.eeprom}" />
      </target>
      <target name="compile" depends="init" description="Compile source code to class files">
        <!-- Compile the java code from ${src} to ${classes} -->
        <javac debug="yes" optimize="no" srcdir="${source.java}" destdir="${target.classes}" source="1.5" target="1.5">
          <classpath refid="classpath" />
        </javac>
      </target>
      <target name="convert" depends="compile" description="Convert class files to cap files">
              <convert packagename="chaining" packageaid="0xF0:0x00:0x00:0x01:0x00:0x01" majorminorversion="1.0" classdir="${target.classes}" outputdirectory="${target.classes}" jca="true" exp="true" cap="true" debug="true" verbose="${verbose}" noverify="${noverify}">
                   <appletnameaid aid="0xF0:0x00:0x00:0x01:0x00:0x01:0x00:0x01" appletname="chaining.ChainingApplet" />
                   <exportpath refid="export" />
                   <classpath refid="classpath" />
              </convert>
      </target>
      <target name="copy-debug">
        <mkdir dir="${target.debug}" />
        <echo>Copying cap files</echo>
        <copy flatten="true" todir="${target.debug}" verbose="true">
          <fileset dir="${target.classes}" includes="**/*.cap" />
          <fileset dir="${target.classes}" includes="**/*.exp" />
          <fileset dir="${target.classes}" includes="**/*.jca" />
        </copy>
      </target>
      <target name="all" depends="clean, convert" />
    </project>

  • Problem with compiling build.xml ( ANT tools)  in Eclipse

    I was trying to compile my project thru ANT within eclipse...and it gave me error:
    Cannot use classic compiler, as it is not available A common solution is to set the environment variable JAVA_HOME to your jdk directory.
         at org.apache.tools.ant.taskdefs.compilers.Javac12.execute(Javac12.java:96)
         at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:557)
         at org.apache.tools.ant.Task.perform(Task.java:217)
         at org.apache.tools.ant.Target.execute(Target.java:184)
         at org.apache.tools.ant.Target.performTasks(Target.java:202)
         at org.apache.tools.ant.Project.executeTarget(Project.java:601)
         at org.apache.tools.ant.Project.executeTargets(Project.java:560)
         at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:262)
         at java.lang.reflect.Method.invoke(Native Method)
         at org.eclipse.ant.core.AntRunner.run(AntRunner.java:233)
         at org.eclipse.ui.externaltools.internal.core.AntFileRunner.execute(AntFileRunner.java:59)
         at org.eclipse.ui.externaltools.internal.core.DefaultRunnerContext.executeRunner(DefaultRunnerContext.java:413)
         at org.eclipse.ui.externaltools.internal.core.DefaultRunnerContext.run(DefaultRunnerContext.java:464)
         at org.eclipse.ui.externaltools.internal.ui.AntLaunchWizard$1.run(AntLaunchWizard.java:117)
         at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:98)
    Build exception: E:\MyPrograms\ejb\MEJB\Hello\build.xml:33: Cannot use classic compiler, as it is not available A common solution is to set the environment variable JAVA_HOME to your jdk directory.
    I already set my JAVA_HOME with jdk1.3.1, but end up with the same error. JRE 1.3.1_07 is installed on my machine and my project contains the installed jre. It appears in both Project properties dialog box and in Installed JRE tab JAVA BUILD PATH of preferences...
    my ANT compilation works fine with command line.
    Please Help !!

    have you did some wrong with the build output path?
    i am dont understand clearful.but i am think so ;
    example :
    the eclipse's default build out path is 'bin',
    so,if you compile by this code:
    <target name="compile">
    <mkdir dir="./class" />
    <javac srcdir="./src" destdir="./class"
    classpath="com.Ostermiller.util.*"
    encoding="${ENCODING}"
    debug="on" optimize="off" deprecation="off" />
    </target>
    * the "ENCODING" 's value is setting in the properties file.
    you will maybe get the 'Cannot use classic compiler' error only.
    you can change the build output path ,or use the default path ;
    I am sorry ,
    I was limited in English and was a bigginer of java ,
    so that i cant to talk Clearly.
    if it cant working fine ,please mail to me :[email protected]
    good luck!
    Kou.huang

  • Java WSDP - run Client with Ant tool

    i've created the server, deployed it
    then i've created the client using ant build
    then i've got generated classes using .wsdl file
    but when i run client i get an error
    exception in thread "main" java.lang.NoClassDefFoundError: HelloClient (wrong name: _helloclient/HelloClient)...
    what should i do?

    we have tried to build tutorials' examples but when we type the ant build command and run. it gives errors like ....fileset doesnt support the nested <include> element..."
    the i installed ant 1.5 and got the "org.apache.catalina.ant.installtask couldnt be foun..." error.
    how can i solve any of these pro�blems??

  • 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!!!!

  • 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

  • Ive been using the ant tool ar sincw i had firefox all of a sudden i rest art and sais not compatible with my version// How can that be

    it suimply stopped working and when i tryed to reinstallit it sais not compatible

    Is it the Ant Toolbar you are trying to use? [https://addons.mozilla.org/en-US/firefox/addon/video-downloader-player/ https://addons.mozilla.org/en-US/firefox/addon/video-downloader-player/] . The developer hasn't made the toolbar compatible with Firefox 10 yet. There is a Beta version which is compatible with Firefox 10, however BE VERY CAREFUL when installing Beta software. It may just be better to wait until an official release.

  • Does someone kno deployment without the ANT tool

    With ant ya its easy and faster..........But does any one know to deploy the files for a simple Sample code of JAX-RPC tp be deployed........... If any one gives me I am really thankful to him
    --------------------|ABY|

    Ya I am really thankful to u...........But actually I do not kno where to place which file, say if I develop it in some other location. Leave alone knowing Make........B'coz I am using ant and it build files for all sample files and I am not able to crack it........I might sound dumb I kno.....but little lost in this..............If anyone answers this I thank them else thats ok......I will try to help myself.
    Thanx,
    |ABY|

  • Taskdef [b]class com.sun.xml.rpc.tools.ant.Wscompile cannot be found[/b]

    Hi everybody,
    I m new in developing web service.
    I am using NetBeans IDE 4.1 EA2 for developing web service.
    I have created a sample jaxrpc web service. When i build project it gives me error that:taskdef class com.sun.xml.rpc.tools.ant.Wscompile cannot be found.
    This error is contain in the file build-impl.xml which is referred by build.xml file.
    netbeans ide uses ant tool for compiling, building & deploying web service.
    All the xml files are automatically generated by netbeans ide.
    Please help me with this...
    Thanx in advance..
    Nirav Patel.

    You'll need to add jaxrpc-impl.jar to your
    classpath.
    You can find it under %JWSDP_HOME%\jaxrpc\lib
    If you haven't got JWSDP then try
    http://java.sun.com/webservices/downloads/webservicesp
    ack.htmlhello...
    i want to add jaxepc-impl.jar to classpath.
    i got the same problem.
    i check the user variable c:\sun\jwsdp-1.6\jwsdp_shared\bin;c:\sun\jwsdp-1.6\jwsdp_shared\bin
    have been there.
    but still the same error appear in the netbeans.
    i hope can't get the one-by-one steps guidelines from u.
    thanks

Maybe you are looking for