I use the <ejbjar> task to JAR EJBs. It works well. What I also do is <jar> up the remote and home interfaces and related classes (like exception classes and data transfer classes) in a separate JAR for clients of these EJBs. They don't get the "full" EJB JAR because I don't want the clients to get the EJB implementations. Now since the <ejbjar> already parses the EJBs and finds out through bcel (sp?) which classes are needed, I suggest that the <ejbjar> could optionally produce an EJB client JAR with all the files that are needed just by EJB clients. Essentially, this could be the "full EJB JAR" minus the bean implementation classes and the classes that are only needed by the bean implementation.
Hi, I'm currently working on adding support for generating ejb client jars. I'm writing a "ejbclientjar" task, which will do just what you describe. I will post a comment here too when I submit a patch with the new task! It will be a patch against the 1.6alpha! Regards, Per Olesen
As promised in the previous comment, I'm giving a small post here now, to note that I've just submitted a patch which adds a <ejbclientjar> task to ant. The patch can be found on bug 23396. Can you try it out Karsten? I would like any input on how it works for you (or anyone else :-)
*** This bug has been marked as a duplicate of bug 23396 ***