Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to write ANT script to build an ear file for Struts and Ejb program

 
sumanta panda
Ranch Hand
Posts: 224
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear All,

I am beginner of writting Ant script.

Can any one please give me the pointer or send me the simple ant script for how to write an ant script for making ear file for Struts and EJB based application?

Thanks for your time.

Regards,
Sumanta Panda
 
Martijn Verburg
author
Bartender
Posts: 3275
5
Eclipse IDE Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you tried the ANT documentation?
 
sumanta panda
Ranch Hand
Posts: 224
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Martijn,

Yeah i have tried after reading the ANT document.I am facing many issue.

So can please provide me the pointer or small piece of build.xml code which helps me to writting struts and EJB integrate ear file.
 
Martijn Verburg
author
Bartender
Posts: 3275
5
Eclipse IDE Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well what have you go so far? The struts stuff is just goes into your WAR (which in turn goes into your EAR), there are WAR and WAR tasks you can use in ant to build these...
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you tried reading a book such as Ant in Action? I have the prior edition of the authors' book and found it invaluable.
 
sumanta panda
Ranch Hand
Posts: 224
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Martijn,

I have written the build.xml which is perfectly create the UserDetails.war for struts part.My doubt in the below build.xml what i need to add so that it will crate
a jar file for ejb part and both will make a ear file.


build.xml



Please suggest.
Thanks in advance.
Regards,
Sumanta
 
Martijn Verburg
author
Bartender
Posts: 3275
5
Eclipse IDE Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're getting there! See http://ant.apache.org/manual/CoreTasks/jar.html for the jar task... there's also an EAR task if I remember correctly...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic