Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Ant problem with EJB utility project

 
Sandeep Murthy
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I've have a utility project modules which contains java beans, and class to access databases. These are used by my ejbs.

I create EAR by "export" option in Websphere Studio and deploy it on WebSphere, it works fine.
When i try the same by creating EAR with ANT by a build script, it fails. All the classes in my utility projects are shown as "cannot be resolved". Altough i checked the contants of both the EAR's created by WebSphere and by ANT, the contents were same.

Does any one know proper steps to creae EAR using ANT for a J2EE project containing EJB modules and Utility-Project Modules ?
Any good materials online ?
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34071
331
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sandeep,
Welcome to JavaRanch!

A utiliity project maps to a jar in the ear. So you use the Ant jar task first on the utility project. Once you have that jar and the ejb jar, you can use the jar task again to generate the ear.
 
Sandeep Murthy
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks,
That's great help. I tried it and worked.
One more help,
I am using "jar" task in ANT to create ears. i'm copying all required files and folders like manifest,packages, etc into a folder and jaring it.

But it seems "ejbjar" task of ANT is the proper way to use it. I cannot find any material on "ejbjar" task. I tried apache site, they have material for websphere4.0, but i'm using websphere 5.1.2.

Do you know where can i find help using ANT "ejbjar" task for Websphere5.1 ?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic