myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adam Winer" <>
Subject Re: [Trinidad] integrating maven-faces-plugin into maven war project
Date Sun, 16 Sep 2007 04:45:59 GMT
On 9/15/07, Andrew Robinson <> wrote:
> I have been making a war project. It is currently just one maven2
> project. Up to now, my components have been hand built. Since I am
> using Trinidad, I have been either extending UIX/Core components or
> creating my own with Type support. Since maven-faces-plugin was
> available, I though I would try to integrate it into my project. I
> have it technically working, but there are problems and I have some
> questions. Hopefully someone has some solutions.
> 1) I have to run maven 2 times. The first time the XML files are put
> into the target. The second time the components are actually generated
> and compiled. I think this is because I have just one project.

Yeah, I believe the maven-faces-plugin requires two passes - one
to generate a "master faces-config" plugin with all the includes,
and later passes run off of that master.  The Trinidad build works
that way.

> 2) I have code that was using one of the components. Here was the structure:
> UIInclude : UIXComponentBase references UINavigableRoot
> UINavigableRoot : UIViewRoot references UIInclude
> CustomViewHandler : FaceletsViewHandler references UIInclude
> IncludeHandler : TrinidadComponentHandler references UIInclude
> The obvious problems in making UIInclude generated is that the code
> that currently refer to it won't compile until the code generator has
> built the class. For the time being, I created a "public abstract
> class UIIncludeBase" that has all the methods and properties stubbed
> out that the other classes need, but I'm not sure if there isn't a
> better way.

In the Trinidad codebase we just live with this - the maven
build generates the code before the compilation, so no biggie,
though it is a mild irritant when developing with an IDE (needing
to jump back out to Maven to rebuild code instead of doing it all
within the IDE).

> 3) The annotations on my UIIncludeTemplate are not carried to the
> generated UIInclude. I can do without this, but it would be really
> good to have this functionality.

I agree, that'd be an important enhancement.

-- Adam

> 4) If I move UIInclude to a new project, I have to move all the
> classes that it references, which is a very large refactoring step.
> Are there any recommendations on how to minimize my refactoring,
> fixing the compile twice problem and be able to use the Trinidad
> plugin?
> Thank you,
> Andrew

View raw message