How to use ANT API?


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 5 of 5

Thread: How to use ANT API?

  1. #1
    Join Date
    Aug 2004
    Location
    On the net
    Posts
    38

    How to use ANT API?

    Hello,
    I have a problem working with ANT API. Inorder to extract files from CVS I'm using ANT API. I made use of the AbstractCvsTask class and I created connections and necessary actions by making use of the methods, setCvsroot(),setPackage(),setDest(),setCommand(). I used execute() method to execute the CVS command but I got a NULL pointer exception at that method. Can anybody help me in finding a way out. Or please provide me with suitable sample code in accessing CVS through Java.
    Thanks in advance,
    Narayana.

  2. #2
    Join Date
    Jun 2004
    Posts
    199
    Have you tried it with a build.xml yet? I've never tried using the api directly from java code. I have successfully used ant to access cvs via scripts successfully. See how they are doing it.

  3. #3
    Join Date
    Aug 2004
    Location
    On the net
    Posts
    38

    How to use ANT API

    Hi,
    Thanks for the reply. I tried using the build.xml. It even worked for me. I have a requirement where in I need to work with ANT API inorder to extract files from CVS. The requirement is that I need to extract files where the file name is my input and it comes dynamically. Is there any way out in doing the above task ? If we can provide the file name dynamically to the build.xml then my problem will be solved.
    Thanks in advance,
    -Narayana

  4. #4
    Join Date
    Jun 2004
    Posts
    199
    ant can use property files. You can create that dynamically then all ant that and the build script.

  5. #5
    Join Date
    Aug 2004
    Location
    On the net
    Posts
    38

    How to use ANT API

    I'll give you a clear idea of my task and please suggest a preferable solution for this one.

    I need to extract files from CVS using ant. The files I need to extract are the ones "which are only modified between the versions " . For that I used "cvsTagDiff" tag in ANT and I got the file names list into another xml file. Now I need to read each file name from the new xml file and extract those files from the CVS. For this, I planned to develop a java program and execute it using ant itself. Is there any suggestable way for this task?

    Thanks in advance for the response...
    -Narayana

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center