views:

1526

answers:

2

How to deploy with Ant an portlet to remote WebSphere Portal 6.0 (Linux)?

+1  A: 

You should be able to do this with the XmlAccess Ant tasks. See the appendices of the Redbook WebSphere Portal Version 6 Enterprise Scale Deployment Best Practices.

McDowell
+2  A: 

We do this, locally, not remotely, with an ant task that does the following:

1) copy's the portlet war file to the Portal's installApps directory (since you are doing it remote, you would need to FTP it or something, rather than simply copy it locally as we do).

2) Executes the xmlaccess script (in our case, xmlaccess.bat, in your case xmlaccess.sh) against a xml access file called "update.xmlaccess" in a subdirectory of the current directory called "xmlaccess".

Here is a clip of the code from our ant task. Some of the values in there are variables specific to our script, but the names should be simple enough to figure out what they do:

<target name="deploy" depends="war" description="deploy the application">
     <copy file="${project.base}/target/${package.name}.war" todir="${portal.base}/installableApps" />
     <echo message="Deploying ${project.name} to WebSphere Portal." />
     <exec executable="${portal.base}/bin/xmlaccess.bat">
      <arg line='-in "xmlaccess/update.xmlaccess" -user ${wps.admin.user} -pwd ${wps.admin.password} -url ${wps.admin.url} 
       -out "xmlaccess/deploymentresults.xmlaccess"' />
     </exec>
</target>
Spike Williams