setupDevEnv2

Edwin Miguel Triana Jimmy Valverde Sanchez

SETTING UP THE DEVELOPMENT ENVIRONMENT

Download the source code from console

git clone git://git.code.sf.net/p/maritaca/code maritaca-code

Building the Server application from console

We use Maven 2 for building the server application (maritaca.war).

  1. Go into the server folder and execute the mvn install command in the console, or mvn -Dmaven.test.skip=true install for building without running unit tests.

The first time Maven will download all dependencies, so the building will be a little slow, but the later buildings are faster.

If you don't get any error, you could find the maritaca.war file into the server/web/target folder.

Synchronizing code from console

Updating from remote server

git pull                                        #in maritaca-code folder

Local commit

git add .       #in maritaca-code folder
                # '.' means all files, can be changed for specific files
git commit -m 'a descriptive message'

Uploading changes to remote server

git push                                        #must have write permissions

Setting up Eclipse for Server app (war)

The following steps are based in Eclipse 3.7 (indigo) - JEE developer edition on a Ubuntu machine. If you have another version you will need to instal the Web Toolkit (WTP) plugin.
You do not need this step with Eclipse 4.3 +.
We assume the reader is familiar with Eclipse IDE for installation and usage.

  1. Install the Git plugin (also available at Eclipse Markplace)
  2. Install Maven plugin from Eclipse Markplace
  3. Install Maven - WebTools integration
    • In Help/Eclipse MarketPlace install m2e-wtp

Importing project into Eclipse (Server side)

  1. Change to Java or Java EE perspective (that depends of your Eclipse)
  2. Click in File menu.
  3. Click in Import.
  4. Select Maven, and after that, select Existing Maven Projects.
  5. Finally, choose the path to "server", into maritaca-code.

Building from Eclipse

  1. Right click on the project you want to build (maritaca project compiles all projects)
  2. Run as/ Maven install

Running from Eclipse

  1. Right click on web project
  2. Run as/ Run on Server (you must configure your Tomcat server)

Commiting code from Eclipse

For committing code from Eclipse you could use the eGit client.
For committing you must be an authorized user.
Go to Synchronize perspective (right-click in main project->team->Synchronize) and choose the option (pull, push, commit, merge, etc...)

Importing project into Eclipse (Mobile side: Android)

  1. Change to Java or Java EE perspective (that depends of your Eclipse)
  2. Click in File menu.
  3. Click in Import.
  4. Select General, and after that, select Existing Projects into Workspace.
  5. Select the project "library", into maritaca-code/client.
  6. Finally, select the project called "maritaca-mobile", into maritaca-mobile/client.

Related

Wiki: Home

MongoDB Logo MongoDB