You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Brian Levine <BL...@BlueRipple.com> on 2000/09/11 15:02:17 UTC
Are you using ANT to build J2EE projects?
Hi,
I'm wondering if folks would mind sharing their experiences using ANT to
build J2EE projects. I'm developing a system comprised of static HTML,
JSPs, servlets, and EJBs for Weblogic. I'd be interested in knowing how
you go about building all of this using ANT.
For example:
do you put your EJBs and servlets in separate root directories or are
they combined under a common package hierarchy?
How do you ensure that classes that are common to the EJB interface and
servlet layers don't get included in both the webapp and EJB JAR to
avoid the Weblogic ClassCastException problem?
Do you use the optional weblogic EJB tasks or do you roll your own?
Thanks in advance.
-brian
Re: Are you using ANT to build J2EE projects?
Posted by Don Schaefer <do...@xelus.com>.
Brian,
we are using ant for our J2EE project with WLS 5.1. Answers below:
Brian Levine wrote:
>
>
> Hi,
>
> I'm wondering if folks would mind sharing their experiences using ANT
> to build J2EE projects. I'm developing a system comprised of static
> HTML, JSPs, servlets, and EJBs for Weblogic. I'd be interested in
> knowing how you go about building all of this using ANT.
>
> For example:
>
> do you put your EJBs and servlets in separate root directories or are
> they combined under a common package hierarchy?
>
We have a webapp and core directory. They share the same package but
are in different source trees.
>
> How do you ensure that classes that are common to the EJB interface
> and servlet layers don't get included in both the webapp and EJB JAR
> to avoid the Weblogic ClassCastException problem?
Since we don't don't have any functionality in the webapp tree that is
used by the core this is not a problem for us.
>
> Do you use the optional weblogic EJB tasks or do you roll your own?
>
We have rolled our own targets so far. I will look at the weblogic
tasks again but for the moment using our own targets has worked fine.
We have a central build.xml and several other .xml that are invoked from
build.xml to facilitate developers adding their own targets for test and
deployments.
> Thanks in advance.
>
> -brian
Re: Are you using ANT to build J2EE projects?
Posted by Stefan Bodewig <bo...@bost.de>.
>>>>> "CT" == Chris Todd <ct...@alabanza.com> writes:
CT> You can view the EJB taskdef docs via the online CVS at:
But make sure you don't use the latest version of the docs.
The first checkin should describe the tasks that shipped with Ant 1.1
- I'm not sure whether Revision 1.2 is OK. The later versions have
been adapted to reflect changes made after the release.
Stefan
RE: Are you using ANT to build J2EE projects?
Posted by Chris Todd <ct...@alabanza.com>.
You can view the EJB taskdef docs via the online CVS at:
http://jakarta.apache.org/cvsweb/index.cgi/~checkout~/jakarta-ant/docs/ejb.h
tml?rev=1.5&content-type=text/plain
Chris Todd
Software Engineer
ctodd@alabanza.com
Alabanza Corporation
401 Market St., Suite 401
Steubenville, OH 43952
(740) 282-2971 x5218 or
(888) 839-7060 x5218
> -----Original Message-----
> From: oliver@Informatik.BA-Stuttgart.De
> [mailto:oliver@Informatik.BA-Stuttgart.De]On Behalf Of Oliver Boehm
> Sent: Wednesday, September 13, 2000 4:18 PM
> To: ant-user@jakarta.apache.org
> Subject: Re: Are you using ANT to build J2EE projects?
>
>
> Conor MacNeill wrote:
> ...
> > > Do you use the optional weblogic EJB tasks or do you roll your own?
> >
> > We use the optional EJB tasks (of course :-))
>
> I can't find it in the documentation - have you a pointer where I
> can read more
> about it? or perhaps an example?
>
> thanx in advance
> oli b.
> --
> Oliver Böhm # Even when code is so simple you could
> mailto:boehm@ba-stuttgart.de # write in your sleep don't fall asleep
> http://www.ba-stuttgart.de/~boehm # while writing it (Kernighan/Pike)
>
Re: Are you using ANT to build J2EE projects?
Posted by Oliver Boehm <bo...@Informatik.BA-Stuttgart.De>.
Conor MacNeill wrote:
...
> > Do you use the optional weblogic EJB tasks or do you roll your own?
>
> We use the optional EJB tasks (of course :-))
I can't find it in the documentation - have you a pointer where I can read more
about it? or perhaps an example?
thanx in advance
oli b.
--
Oliver Böhm # Even when code is so simple you could
mailto:boehm@ba-stuttgart.de # write in your sleep don't fall asleep
http://www.ba-stuttgart.de/~boehm # while writing it (Kernighan/Pike)
RE: Are you using ANT to build J2EE projects?
Posted by Conor MacNeill <co...@m64.com>.
Brian,
> -----Original Message-----
> From: Brian Levine [mailto:BLevine@BlueRipple.com]
> Sent: Tuesday, 12 September 2000 0:02
> To: 'ant-user@jakarta.apache.org'
> Subject: Are you using ANT to build J2EE projects?
>
>
> Hi,
> I'm wondering if folks would mind sharing their experiences using ANT to
> build J2EE projects.
Yes.
> I'm developing a system comprised of static HTML,
> JSPs, servlets, and EJBs for Weblogic. I'd be interested in knowing how
> you go about building all of this using ANT.
> For example:
> do you put your EJBs and servlets in separate root directories or are they
> combined under a common package hierarchy?
We have separate source trees and build scripts for the EJBs and the
servlets/taglibs.
> How do you ensure that classes that are common to the EJB interface and
servlet
> layers don't get included in both the webapp and EJB JAR to avoid the
Weblogic
> ClassCastException problem?
It can be a tricky problem. In general we treat the servlet layer as a
client of
the EJB layer and deploy a jar containing the EJB interfaces and RMI stubs
on the
servlet machine.
> Do you use the optional weblogic EJB tasks or do you roll your own?
We use the optional EJB tasks (of course :-))
Conor
RE: Are you using ANT to build J2EE projects?
Posted by Conor MacNeill <co...@m64.com>.
Peter,
>
> >do you put your EJBs and servlets in separate root directories
> or are they
> >combined under a common package hierarchy?
>
> I would always recommend that they always go under a common source
> directory and you use include/exclude to remove stuff you don't want
> compiled/jarred etc.
We do things a little differently. We generally have one tree per jar. This
ensures a strict dependency relationship between our jars. With a single
tree, it would be possible for the compiler to bring in classes which you
had intended to exclude. The separation of trees, supported by the ant
script enforces the strict dependencies between jars. You have to be more
careful to avoid that in a single tree.
Conor
Re: Are you using ANT to build J2EE projects?
Posted by Peter Donald <do...@mad.scientist.com>.
>do you put your EJBs and servlets in separate root directories or are they
>combined under a common package hierarchy?
I would always recommend that they always go under a common source
directory and you use include/exclude to remove stuff you don't want
compiled/jarred etc.
>How do you ensure that classes that are common to the EJB interface and
servlet
>layers don't get included in both the webapp and EJB JAR to avoid the
Weblogic
>ClassCastException problem?
It is easy enough to seperate them out. Have a look at the Avalon build
file. It builds four or five jars from a single source tree and does it
easily :P
http://www.working-dogs.com/cvsweb/index.cgi/~checkout~/framework/build.xml?
rev=1.58&content-type=text/plain
is a good example (except for some of doc building) of stuff that you can do.
Cheers,
Pete
*------------------------------------------------------*
| "Nearly all men can stand adversity, but if you want |
| to test a man's character, give him power." |
| -Abraham Lincoln |
*------------------------------------------------------*