wood burning stoves 2.0*
The moose likes EJB and other Java EE Technologies and the fly likes Ant problem with EJB utility project Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Ant problem with EJB utility project" Watch "Ant problem with EJB utility project" New topic
Author

Ant problem with EJB utility project

Sandeep Murthy
Ranch Hand

Joined: Oct 05, 2005
Posts: 34
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 ?


SCJP 1.4
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 30789
    
157

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.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Sandeep Murthy
Ranch Hand

Joined: Oct 05, 2005
Posts: 34
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 ?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Ant problem with EJB utility project