-
Notifications
You must be signed in to change notification settings - Fork 9
Setup With Maven
To start developing an application you need setup a project for its
Step 1. Install smartfox server 2x
To install smartfox server 2x you need download its from [smartfox download page] (http://www.smartfoxserver.com/download/sfs2x#p=installer) and installation (it is very easy)
Step 2. Install apache maven
You can download apache maven from [apache maven download page] (https://maven.apache.org/download.cgi) and extract downloaded file. You also need add bin folder of maven to system PATH variable (if you don't know how to, you can refer this link)
Step 3. Install eclipse
Eclipse default supports apache maven, so you only need [download] (https://eclipse.org/downloads/) and use its
Step 4. Create a maven project
After done environment setup, you can use eclipse to create a maven project, if you don't know how to, you can refer this [link] (http://www.vogella.com/tutorials/EclipseMaven/article.html) or this [link] (http://www.mkyong.com/maven/how-to-create-a-java-project-with-maven/)
Step 5. Install smartfox libraries to apache maven
Because smartfox hasn't deployed their libraries to maven central so we need install it from local. We need install two libraries are sfs2x.jar and sfs2x-core.jar. To install them you need open terminal and input two command:
mvn install:install-file "-DgroupId=com.smartfoxserver" "-DartifactId=sfs2x-core" "-Dversion=2.9.0" "-Dpackaging=jar" "-Dfile=path_to_sfs2x-core.jar"
mvn install:install-file "-DgroupId=com.smartfoxserver" "-DartifactId=sfs2x-v2" "-Dversion=2.9.0" "-Dpackaging=jar" "-Dfile=path_to_sfs2x.jar"
Step 6. Add dependencies to pom file
After install smartfox libraries, you need add them and [ezyfox] (https://github.com/youngmonkeys/ezyfox-core) to pom file like this:
<dependency>
<groupId>com.tvd12</groupId>
<artifactId>ezyfox-sfs2x</artifactId>
<version>1.0.7</version>
</dependency>
<dependency>
<groupId>com.tvd12</groupId>
<artifactId>ezyfox-core</artifactId>
<version>1.0.7</version>
</dependency>
<dependency>
<groupId>com.smartfoxserver</groupId>
<artifactId>sfs2x-v2</artifactId>
<version>2.9.0</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>19.0</version>
</dependency>
After setup done, you can [start developing the application] (https://github.com/youngmonkeys/ezyfox-core/wiki/Start-Developing)
Hello World