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).
- 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.
- Install the Git plugin (also available at Eclipse Markplace)
- Install Maven plugin from Eclipse Markplace
- Install Maven - WebTools integration
- In Help/Eclipse MarketPlace install m2e-wtp
Importing project into Eclipse (Server side)
- Change to Java or Java EE perspective (that depends of your Eclipse)
- Click in File menu.
- Click in Import.
- Select Maven, and after that, select Existing Maven Projects.
- Finally, choose the path to "server", into maritaca-code.
Building from Eclipse
- Right click on the project you want to build (maritaca project compiles all projects)
- Run as/ Maven install
Running from Eclipse
- Right click on web project
- 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)
- Change to Java or Java EE perspective (that depends of your Eclipse)
- Click in File menu.
- Click in Import.
- Select General, and after that, select Existing Projects into Workspace.
- Select the project "library", into maritaca-code/client.
- Finally, select the project called "maritaca-mobile", into maritaca-mobile/client.