Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

[Maven2] Portlet + MyFaces. What archetype to use?

 
Mariano Austral
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?

Is this the best way? Am I missing something?
 
Peter Johnson
author
Bartender
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic