File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Ant, Maven and Other Build Tools and the fly likes [Maven2] Portlet + MyFaces. What archetype to use? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "[Maven2] Portlet + MyFaces. What archetype to use?" Watch "[Maven2] Portlet + MyFaces. What archetype to use?" New topic
Author

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

Mariano Austral
Greenhorn

Joined: Jul 27, 2007
Posts: 7
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

Joined: May 14, 2008
Posts: 5827
    
    7

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.)


JBoss In Action
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: [Maven2] Portlet + MyFaces. What archetype to use?