Build jWebSocket with Apache Maven

This section describes how to compile jWebSocket from source with Apache Maven. The reason why we choose Maven projects as base for our sources is that you can either compile it with Maven directly or easily import into an IDE like NetBeans or Eclipse.

Instructions

To compile jWebSocket with Apache Maven please follow the following steps.

  1. Download Apache Maven from http://maven.apache.org/download.html and follow the installation instructions.

    You usually obtain it as zip and unpack it to c:\Program Files\Apache Software Foundation\Maven-<version>.

  2. Be sure that you have the M2_HOME system environment variable set referering to your Maven home directory, e.g. c:\Program Files\Apache Software Foundation\Maven-2.2.

    For previous Maven 2.0.x versions please check the MAVEN_HOME variable instead.

  3. Be sure that you have the path to the Maven /bin folder being part of your PATH system environment variable.

    Check if maven is properly installed and running by typing mvn --version in the command shell.
    Detecting if maven is properly installed

  4. To see all command line options of maven type mvn in the command shell.

    After that you will find a .m2 folder in your Documents and Settings folder or Users/<your username> folder (Windows 7), Examples: c:\Documents and Settings\aschulze\.m2\repository or c:\Users\aschulze\.m2\repository.

  5. This is your local Maven repository which is the location for all required libraries.

    you look at it the first time the folder probably is empty, it will be filled during the first mvn clean install operation (see below).

  6. 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.

  7. Go to your project root folder (e.g. c:\svn\jWebSocket\trunk]).

    You should see a couple of jWebSocket modules in various folders and a pom.xml in the project's root folder.

    The top-level pom.xml file maintains all the module dependencies.

  8. Change to that folder and type mvn clean install. Be sure that you are connected to the internet.
    Compiling jWebSocket using MavenCompiling jWebSocket using Maven
  9. Maven should now download all required jars from its repository. This may take a while at the first run.

  10. After that Maven states build successful:
    jWebSocket sources successfully compiled using Maven

    You will find the executables (.jar and .war files) in the jWebSocketRTE folder.

Publications

Learn more about WebSockets in general, get background information and gain deeper insight!

Join jWebSocket

Wether developer, designer or translator – join the jWebSocket team and grow together with our success!

Contact

jWebSocket Headquarter

Innotrade GmbH

An Vieslapp 29

52134 Herzogenrath

Germany

Search

Copyright © 2013 Innotrade GmbH. All rights reserved.