Current versions of NetBeans will load the Maven project and automatically create a development environment. If you are not committed to a specific IDE, we recommend using NetBeans for WLab development.
If, however, you refer to use Eclipse, you can build an Eclipse project for WLab development by following these steps:
- First, install the Eclipse plugins:
Maven Integration for Eclipse (available from the Eclipse plugin site http://m2eclipse.sonatype.org/sites/m2e)
Maven Integration for WTP (available from http://m2eclipse.sonatype.org/sites/m2e-extras )
JIBX plugin (available from http://jibx.sourceforge.net/eclipse)
Many Eclipse installations will have the base Maven integration pre-installed, but not the WTP integration. This may cause problems when installing the latter if the versions do not match, and it may be necessary to upgrade the former before proceeding.
- Create a new Eclipse workspace.
- Navigate to the directory of the Eclipse workspace you just created in the command line. Check out the WLab source from SVN into this workspace using the command:
svn co svn://wlab.paulneve.com/ .
- In your new Eclipse workspace, select Import / Maven / Existing Maven Projects. Browse to the WLab folder which will have been created by the SVN checkout. Click Finish.
- Wait while Eclipse and the Maven plugins set up the project.
- Enable JIBX by right-clicking on the WLab folder in the project folder, and selecting JIBX. An error will appear; this is normal. To fix the error, right-click on the WLab folder, select Properties, and in the JIBX setting change JIBX Mappings Folder to src/main/java. Disable and then re-enable JIBX to make the change take effect.
- “Create” a new server to run the application by clicking on the Servers tab, then right-clicking in the white space in the bottom right pane and selecting New server. Choose an Apache Tomcat 6.0 server. Browse to your Tomcat install directory (if you don’t have Tomcat installed, then you can just download it from Apache, unzip it and point Eclipse at the resulting directory). Click Finish.
- Right-click on the Tomcat 6.0 Server at localhost which will have appeared in the bottom right pane, and select Add and Remove. Click WLab and use the Add button to publish it onto the development server.
- Edit the file in src/main/webapp/conf/application-properties.xml to suit your environment. Consult the system administration documentation for details regarding the settings to be found in that file.
- The application can be started by selecting the server from the appropriate tab, and clicking the green “play” button. The application should be usable at http://[your IP address]:8080/WLab/wlab.html, assuming a standard configuration. It is advised to stop the server before making code changes.
Sometimes Eclipse will give a ClassNotFoundException on org.springframework.web.context.ContextLoaderListener. In this instance, clean all projects, let it rebuild the workspace, then stop and restart the server. This should rectify the issue.