In detail, I want to edit jsf facelet files in BEA workshop studio.  It does
a really good job with jsf jsp files, but if you try to edit non-jsp files
in that view, the helpful jsf features disappear.

Facelets are essentially valid xml.  The whole thing is pretty close to jsp,
except for a few things.  The major one is that you declare your 'taglibs'
in the xml namespace at the top level rather than in a special directive.  I
think there might be a way to do this with jsp/xml syntax, but I'm not sure
the BEA tool supports that either.

So, here's what I was thinking.  If I could just make sure to stick with
valid xml syntax besides the standard jsp 'taglib' and 'page' directives, I
could do a pretty simple transform on that file.  Look for the taglib
directives, stuff those urls into the top level xml namespace, and output
what would hopefully be a valid facelet file.  In the standard lifecycle I
think this would be somewhere around 'process-resources' or 'compile'.
However, there's really nowhere to stuff this in with the war build, if I
understand it correctly.

I mean, before we address if my idea is a good idea, I was just wonering if
there was a way to attach a plugin to the war build lifecylce.  As I stated
in the original email, I cracked open the code and hacked together some
stuff previously because I couldn't attach anything to the war resources.  I
think there is a general use for this kind of functionalty.

This is a way out of the box idea.  Basically, the phases are a good idea,
but maybe there are situations in which a build doesn't map well to a fixed
set, right?  So maybe a particular plugin could "declare" custom build
phases.

For example, the war build would declare "war:process-resources" as a
special custom phase, and attach it to the global "package" phase.  Then it
would attach its own steps to that phase, and I could attach my own plugin
to that war-custom phase.  Then maybe it would have "war:package" after
"war:process-resources".  In "war:package", it would assemble the war, etc.
This would allow plugins to be built and attached in basically the way they
are now.  You'd just need to look in the documentation to see if the plugin
exposes a custom phase.

It might open the door to builds that are, out of necessity, more complex
than a standard java build.  At the same time, it might open the door to
needlessly complex configurations.  Who knows.

Maybe there's something there already that works like what I'm talking
about?

On 5/18/06, Wayne Fay <[EMAIL PROTECTED]> wrote:

What specifically are you looking to do? What kinds of "things" are
you looking to "apply" to jsp/servlets?

Please provide input and output examples to facilitate a discussion on
this subject. I know at least one other person has posted a similar
question on the User list in the last 60 days -- search the User
archives for "filter jsp" and you're bound to find it.

Wayne

On 5/18/06, Kevin Galligan <[EMAIL PROTECTED]> wrote:
> I'd like to run my jsp code through some filters before being
packaged.  Not
> just simple find and replace filters, though.  A little more complex.  I
> know there is a feature in the recent version of the war plugin that
allows
> some regular filtering, but its not really what I'm looking for.
>
> Were this standard java code, I'd just write a plugin and put it
somewhere
> in the lifecycle.  However, from my previous work with the war plugin,
there
> really isn't a "lifecycle" per say.  Everything happens in the package
> phase.  Is this correct?  If so, any reason why?  Doesn't anybody have a
> solution for applying things to jsp/servlet artifacts?  At my "day job"
I
> hacked something together with the war plugin that called out to other
code,
> but it was quite hacky and seemed to defeat the purpose of maven and
> breaking up the build into a lifecycle.
>
> Thanks in advance.
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Reply via email to