0
votes

I'm joining a project that is working on a web application with deployment on WebSphere 8. We build a WAR with Maven, which contains several portlets. The current deployment pattern for a vanilla WebSphere server is:

  1. mvn clean package
  2. Install the WAR
  3. Create portal pages by hand in the GUI
  4. Assign one portlet to each page

I don't think this pattern will scale very well. Everyone's local development system is configured slightly differently, and the work of deployment is multiplied as a function of (portlets X pages X servers). I would like to move this page configuration into the project so it will have source control and be a reproducible part of the build. But I've not been able to discover if this is possible.

  1. Does WebSphere 8 support deploying pages (and hopefully page hierarchies), as opposed to creating them manually? If so, how?

  2. Should we be producing an EAR instead of a WAR to support this model of deploying portlets and pages?

2

2 Answers

1
votes

WebSphere Portal offers a powerful utility called xmlaccess. There are other APIs as well that might be useful for this purpose.

You can use it to deploy you page structure as well for most other portal parts.

I'm not sure if moving to EAR files is a good idea, you can however register your predeployed portlets. That however requires coding the deployment descriptors(well use the xmlaccess export as an example).

0
votes

You can use XMLAccess script which can be executed from command prompt or by using portal admin also (login as admin and under administration you will find option as import XML).

if you want to have research on XMLAccess script go to below folder structure

\doc\xml-samples. you will find lot of example over there.

on second question regarding EAR or WAR, you will be always required to deploy WAR only because portlets are not enterprise level application these are web application.