Test Run from Eclipse with dev branch - ecologylab/BigSemanticsService GitHub Wiki
To run the service from Eclipse for testing and debugging, following these steps:
-
Required software: Eclipse for J2EE, Jetty 8.1, Maven for Eclipse (m2e) plugin. You need to download a distribution of Jetty 8.1 and decompress it somewhere on your computer. Optionally, configure these symlinks.
-
Clone BigSemanticsService from github.
-
Import at least the following projects into Eclipse: BigSemanticsService, DownloaderPool, DownloaderPoolMessages, lib. Note that lib is a dummy project containing dependent jars.
-
Right click on project BigSemanticsService, select Run As -> Run on Server.
-
If you haven't created a Jetty Server in Eclipse, create one. You'll need to install an Eclipse plugin for Jetty 8.1 using this update site: http://download.eclipse.org/jetty/updates/jetty-wtp. During the process, you'll need to point Eclipse to the Jetty distribution that you downloaded and decompressed on your computer.
-
In the "Add and Remove" step, add both "BigSemanticsService" and "DownloaderPool" to the Configured side.
-
Run the configuration. For the first time it will fail, due to a Jetty plugin issue. You need to open the Run Configuration file for the server, and add both jar files under $JETTY_DISTRIBUTION/lib/annotations as User Entries to the Run Configuration file.
-
Run BigSemanticsService on the server again. This time it should run correctly.
-
Run ecologylab.bigsemantics.downloaderpool.Downloader in DownloaderPool as a Java Application.
-
In your browser, try something like http://localhost:8080/BigSemanticsService/metadata.xml?url=http://www.amazon.com/dp/B00A9NLDN6. The service should work correctly.