------------------------------------------------------------------------------------------------------------------------------------------------------------------

Eclipse portlets debugging with Pluto Portal


- use maven2 ecliple plugin to create the war

- add to catalina.sh the following
export CATALINA_PID="tomcat-dev"
export CATALINA_OPTS="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000"
Needed to allow the connection of Eclipse debugger with the running JVM

- The first deployment can be easly done using the Pluto Portal adminapp (so the configuration files will be prepared for free :-) )

- The next deployments of the portlet can be done running  a script like this
   within the PLUTO_HOME  folder, where the Pluto Portal sources are stored

*************************************************************************************************
#script realized by Alessandro Spinuso used for live portlet deploy in pluto and eclipse debugging
 

DEV_PORTAL_HOME="/opt/portal/portalHome"
DEV_APP_HOME="/my/portal/projectsFolder/appHome"
DEV_APP_NAME="appName"


echo Stopping Tomcat...
# needs to be forced! not so nice but it`s a way to stop the transport dt_socket and tomcat together
$DEV_PORTAL_HOME/bin/catalina.sh stop -force

echo Undeploying war...
rm -r $DEV_PORTAL_HOME/webapps/$DEV_APP_NAME

echo Deploying war...
maven deploy -Ddeploy=$DEV_APP_HOME/target/$DEV_APP_NAME.war

echo Removing portlet jar from depolyed webapp
rm -r $DEV_PORTAL_HOME/webapps/$DEV_APP_NAME/WEB-INF/lib/portlet-api-1.0.jar


echo Starting Tomcat...
$DEV_PORTAL_HOME/bin/startup.sh
*****************************************************************************************************

- Connect eclipse debug to a Remote Java Application, creating a new connection on port 8000

- Surf the deployed portlet with your own Browsr and step over your breakpoints!!


---------------------------------------------------------------------------------------------------------------------------------------------------------------------------