• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Getting error Build failed while running asant

 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello All,

I'm new to J2EE environment and working on an example given in J2EE1.4 online tutorial. I did exactly as mentioned in the document. I have a directory structure
C:\
Projects
ConverterApp
ConverterApp.ear
src
Converter.java
ConverterHome.java
ConverterBean.java

Now as mentioned in the document, I tried to run asant utility from
c:\projects\ConverterApp>asant build

Buildfile: build.xml does not exist!
Build failed

is what getting displayed. Is there anything I messed up here?
Please let me know the solution as I'm eagerly waiting for my first J2EE to run .

Thanks in advance.
 
Ranch Hand
Posts: 959
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try to run the asant in the directory where build.xml is located and don't forget to set the j2ee.jar in your classpath.
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Freddy,

Thanks for the information. I'm a very new into J2EE world, and really not sure what a build.xml is all about. I was under impression that asant would build build.xml for me. What is build.xml and how do we generate one? Is there any tool to generate build.xml for us.
 
Freddy Wong
Ranch Hand
Posts: 959
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
build.xml is something like makefile in C/C++ world. It's used to tell the ant to do some certain tasks, compiling, deploying, etc.

Go to this link http://java.sun.com/j2ee/1.4/download.html#tutorial and download the tutorial. The tutorial contains all the source codes (java code, build.xml, etc). That tutorial was created using NetBeans IDE, that's why you can see the nbproject directory inside.

If you use IDE, such as NetBeans or Eclipse, the IDE will generate the build.xml when you create a new project.
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Sir,

I shall do that first.
 
reply
    Bookmark Topic Watch Topic
  • New Topic