Hello,
I package a portal instance in an EAR, which includes some portlets(WAR), EJB3s(JAR) and some common libraries that share with all the portlets and EJB3.
The following is the structure of the EAR:
* myportal.ear + META-INF - application.xml - jboss-app.xml + myportal.war (main portal instance) + portlet1.war (extra portlet) - testejb3.jar - commonlib.jar
<pages> <portal-name>myportal</portal-name> <page> <page-name>foobar</page-name> <window> <window-name>MyPortletWindow</window-name> <instance-ref>portlet1.portlet1.MyPortletInstance</instance-ref> <default>true</default> <region>center</region> <height>1</height> </window> </page> </pages>
<deployments> <deployment> <if-exists>overwrite</if-exists> <parent-ref>myportal</parent-ref> <page> <page-name>foobar</page-name> <window> <window-name>MyPortletWindow</window-name> <instance-ref>MyPortletInstance</instance-ref> <region>center</region> <height>1</height> </window> </page> </deployment> <deployment> <if-exists>overwrite</if-exists> <instance> <instance-name>MyPortletInstance</instance-name> <component-ref>portlet1.portle1</component-ref> </instance> </deployment> </deployments>
<?xml version="1.0" standalone="yes"?> <instances> <instance> <instance-name>MyPortletInstance</instance-name> <component-ref>portlet1.portlet1</component-ref> </instance> </instances>