WTP-Tools
Subscribe

From OpenNMS

Jump to: navigation, search

Quick quide to getting WTP tools working in Eclipse.

I got this working by following the following steps

Preparation

  • Download Eclipse 3.2 (Callisto)
  • Update Manager will guide you through installing the Visual Editor, necessary dependencies as well as WTP 1.5

-- I actually ended up downloading 1.5.1, there is a very annoying bug with Re-Publishing in 1.5.0

      • You may also have to do the following.... For some reason I think may be related to the stars and Orion

the webabb is not always correctly copied on initial deployment. I ended up doing a complete install / target install of the webapp and copied over the initial webapp to the temp directory the Tomcat instance sets up in the following path in my system.

  • ~/rcs/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/webapps/opennms-webapp

Getting it to work....

  • Add the file configuration.properties to your WEB-INF directory, mine looks as follows
 (Path  opennms-webapp/src/main/webapp/WEB-INF/configuration.properties )
opennms.home=/usr/local/OpenNMS/
opennms.bin.dir=/usr/local/OpenNMS/bin
java.awt.headless=true
opennms.db.poolman=org.opennms.core.resource.db.SimpleDbConnectionFactory
opennms.db.driver=org.postgresql.Driver
opennms.db.url=jdbc:postgresql://localhost:5432/opennms
opennms.db.user=opennms
opennms.db.password=opennms
rrd.base.dir=/usr/local/OpenNMS/share/rrd
rrd.binary=/usr/bin/rrdtool
version.full=1.3.2-SNAPSHOT


  • From your top directory of ~rcs do a ./build.sh clean ; ./build.sh eclipse:eclipse install -Dwtpversion=1.0
  • Go back into Eclipse
  • Do a project clean
  • Mark all projects, hit F5 for a refresh

You now should have the option of clicking on the opennms-webapp, Run As and choosing On Server.

The first time define a new Tomcat 5.5 server, I normally just chown -R <MYUSERID> /path/to/tomcat and /path/to/openNMS

In the lower area of your View, the Console View should right next to it now have a Server Tab, click there to launch and another good thing to turn off is WTP's AutoPublish to all servers as that is fairly time-consuming and will happen with each save you do.

/JE