ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erik Hatcher" <jakarta-...@ehatchersolutions.com>
Subject Re: jspc and magic compiler attribute
Date Thu, 07 Mar 2002 12:38:38 GMT
----- Original Message -----
From: "Jose Alberto Fernandez" <j_a_fernandez@yahoo.com>
> --- Erik Hatcher <jakarta-ant@ehatchersolutions.com>
> wrote: > +1 on removing the magic property and making
> it a
> > <jspc> attribute.
> >
> > The main reason the javac magic property exists is
> > so that you don't have to
> > specify the compiler for every <javac>, right?  Its
> > unlikely that someone
> > would have a whole lot of <jspc> tasks in their
> > build file so it shouldn't
> > be too big of an issue, and besides, they can always
> > do
> > compiler="${jspc.compiler}".
> >
>
> So, how do I write a buildfile that can deploy JSPs in
> weblogic or websphere or jboss etc etc without needing
> to change the buildfile?

Your question is not at all clear that you are referring to <jspc>.
"Deploying" JSP's would work no matter which container you're going to and
is container-specific (and painful for some containers - WebSphere, for
example - unless someone has some tricks that they'd like to share for it!).

But if you're talking about using a different JSP compiler, why does the
magic property make any difference?

<property file="jspc-${container}.properties"/>

Then compiler="${jspc.compiler}" (which would be in
jspc-websphere.properties, jspc-weblogic.properties.....).  Just set
"container" to your desired one.

> Magic-properties are the equivalent in ANT to
> environment variables. They are usefull when the you
> want different users to execute the same buildfile in
> different execution environements.

Huh?  I don't quite see the dilemma here.  Magic properties are something I
thought we were shying away from if at all possible.  They are confusing and
not well documented.  And would the technique I showed above not cover the
different execution environments you speak of?

> Just with OS environemnet variables, what we need is a
> more consistent naming convension and to spell them
> out clearly in the documentation (xdoclet hint hint).

Yes, this is a good suggestion for XDoclet, thanks!

    Erik



--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message