After using eclipse for couple of months due to the reason it has websphere plugin which easier for publishing code changes, I come back to netbeans as I feel I still love it. After hours of googling, I can’t really find an one stop setup, and decided to pen down here for sharing.
- Deploy your application war/ear via web console. eg : http://localhost:9060/ibm/console
- Find out where is the location after application deployed. eg :<WAS_INSTALL_DIR>/runtime/profiles/installapps/<NODES>/<YOUR_APP>
- Create an ant script for copying the compiled src or jsp to target found as step 2 above.
<project> <project> <property name="source.web" value="C:/work/TestApp/target/TestApp"> <property name="target.web" value="C:/IBM/SDP/runtimes/base_v7/profiles/was70profile1/installedApps/Node01Cell/TestEAR.ear/TestWeb.war"> <property name="service.lib" value="C:/work/TestApp/Service/target/Service.jar"> <property name="target.lib" value="C:/IBM/SDP/runtimes/base_v7/profiles/was70profile1/installedApps/Node01Cell/TestEAR.ear/lib"> <target name="Publish Web Module"> <copy todir="${target.web}"> <fileset dir="${source.web}"> <exclude name="META-INF/"> <exclude name="WEB-INF/lib/"> </exclude></exclude></fileset> </copy> </target> <target name="Publish Library"> <copy flatten="true" todir="${target.lib}"> <resources> <file file="${service.lib}"> </file></resources> </copy> </target> </property></property></property></property></project> </project>
- Enable debug mode in Websphere (follow steps 1..2..3), then restart server.
- Try on your netbeans (follow steps 1..2..3..4)
- Enjoy and let me know if I miss out anything 😉
P/S : I have attached the ant script which I use to restart server and publish the changes, you may change accordingly to suite your need. Click here to download