[Maven2] Portlet + MyFaces. What archetype to use?
Joined: Jul 27, 2007
Hey guys, this is probably a newbie question for you but I'm kind of new in the maven world.
There is this big app that uses portlets. I was asked to develop a new portlet but I do not have access to the app code. The idea is to have this new portlet really decoupled. What I need to do is to create all my module with myfaces and then somehow create the portlet.
I found the classic "maven-archetype-portlet" archetype or the myfaces + facelets archetype.
What I can do is to create the project with the portlet archetype and then manually add the myfaces configuration (I'm using eclipse). Or the other way around, create the myfaces project and then add portlets capabilities to it (using the myfaces portlet bridge), but I'm not really sure about this, probably I should do all this with maven... right?
Finding a suitable archetype is like finding a needle in a haystack. Even though m2eclipse helps by presenting lists of available archetypes, it is often hard to decide which one to use - I usually end up building my own which reflect all of the stuff I typically have in an app.
I would go with your suggestion:
What I can do is to create the project with the portlet archetype and then manually add the myfaces configuration (I'm using eclipse). Or the other way around,
After all, an archetype is just a pre-packaged set of files and dependencies. There is nothing to prevent you from building a project from scratch or from adding in the additional dependencies you need. And m2eclipse makes adding dependencies fairly painless (though it does not do anything to "fix" the mess that has been made of the maven repository.)