The jWebSocket source code is provided as an Apache Maven project. The benefit here is that you can either compile it with Maven directly or easily import into an IDE like NetBeans, Eclipse or IntelliJ. This section describes how to import and compile the jWebSocket sources in NetBeans. You can download the latest NetBeans version here.
Please install Apache Maven first and follow the instructions on the Maven page in this installation-guide. If you run an older NetBeans version we further recommend to update to the latest NetBeans version (> 6.7) since from this version the Apache Maven support is already integrated into the IDE w/o the need to install and configure any plug-ins.
To compile jWebSocket with NetBeans 6.7+ please follow the following steps.
- Download the jWebSocket sources from the download area or directly from our subversion repository and either extract them to a project root folder of your choice or check them out e.g. with the Tortoise Subversion Client. In the following instructions we use c:/svn/jWebSocket/trunk as root folder. Please adjust it accordingly when you are working on a different folder structure.
- Please check that the M2_HOME environment variable is refering to your Maven installation folder as described here.
- Before you build jWebSocket you need to configure the Maven capabilities in NetBeans Tools/Options dialog.
Please type the path to the Maven Home directory as follows:
Configure Maven capabilities in NetBeans
- For the rare case that you don't get this dialog Maven is probably not yet activated. To activate Maven create a new project, select category Maven and select "Maven Project with existing POM". NetBeans will activate the Maven support then and you do not need to follow any import procedure - simply open the project as described below.
- Select File/Open Project and select the Maven jWebSocket-Parent project in c:/svn/jWebSocket/trunk
Opening the Apache Maven project jWebSocket-Parent including all required sub-projects
- In NetBeans the jWebSocket-Parent project and the required sub-projects are imported:
jWebSocket-Parent project including all required sub-projects in NetBeans
- Now clean and build the entire project by right clicking jWebSocket-Parent and selecting Clean and Build in the pop up menu. Maven should now download all required jars from it's repository. This may take some time at the first run if not yet done with the Maven installation.
- After the first clean and build process you will be able to compile each of the jWebSocket modules separately.