Personal tools
gvSIG Mobile
gvSIG Mobile

Cached time 11/21/13 07:46:11 Clear cache and reload

 

Download gvSIG Mobile dependencies

  • OSGI don't allow the symbol '-' to number bundles version, like 2.0-SNAPSHOT, Then all the gvSIG Mobile bundles version must be numbered as 1.0.SNAPSHOT.
  • Is recommended delete all the M2_REPO repository before start the dependencies download or choose another repository name on settings.xml
  • Maven 2.2.1 or latter version must be installed and the PATH updated to index the absolute path to the directory build/maven/bin.

Editing our settings.xml file

Developers who have commit permission in the gvSIG Mobile repository should write their user/password settings here in case they need to deploy something.

Other developers need to have this settings file too (the user and password will not be used):

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<settings xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
    http://maven.apache.org/xsd/settings-1.0.0.xsd">

 <servers>
     <server>
         <id>gvsig-repository</id>
         <username>[user]</username>
         <password>[password]</password>
         <filePermissions>666</filePermissions>
         <directoryPermissions>777</directoryPermissions>
     </server>
 </servers>

 <!-- optionally you can change the path to your local            -->
 <!-- maven repository. Remember you have to edit the little file -->
 <!-- build/initial_m2/build.xml to point at the same folder      -->
 <localRepository>[path_to_local_maven_repo]</localRepository>

 <!-- This value is changed during the setup of the workspace -->
 <!-- (see instructions)                                      -->
 <offline>true</offline>
 </settings>

Where:

  • [user] must be our user account in the gvSIG Mobile project
  • [password] must be our password in the gvSIG Mobile project
  • [path_to_local_maven_repo] is (optionally) the path to our local maven repository. The default value is [user_home]/.m2/repository (for example "C:\Users\Peter\.m2\repository" in Windows 7 or "/home/Peter/.m2/repository" in Linux)

Install Dependencies

  • From Eclipse, right-click on the file build/initial_m2/build.xml and execute it (Run ass/Ant Build). This process will take about 20 seconds and will provide a first version of your local maven repository. Open the file first with the Eclipse text editor to make sure that the target folder is actually your local maven repository.
  • Open the file [user_home]/.m2/settings.xml and make sure the offline parameter is false.
  • From the system console, go to the workspace build folder and type:
mvn -P cdc install
  • Move to the build/projects/gvsig-mobile-init folder and type:
mvn -P cdc clean package eclipse:eclipse -Declipse.pde -Dmaven.test.skip=true install
  • Now open the file [user_home]/.m2/settings.xml again and make sure the offline parameter is true.

Compile Projects and Build Eclipse Projects

  • In order to compile gvSIG Mobile Core from the System Console, you need to have the mentioned projects downloaded, and then open a system console, go to the workspace folder build/projects/gvsig-mobile-core and type:
mvn -P cdc clean package eclipse:eclipse -Declipse.pde -Dmaven.test.skip=true install
  • In order to compile gvSIG Mobile Standard from the System Console, move to the build/projects/gvsig-mobile-standard folder and type:
mvn -P cdc clean package eclipse:eclipse -Declipse.pde -Dmaven.test.skip=true install
  • Finally, refresh (F5) and clean the projects within Eclipse.

Problems during the building

If the maven build process finish with 'BUILD SUCCESSFULL' but on Eclipse several compilation errors are shown, sometimes is because the MANIFEST.MF are bad built. Then try to:

  • If red cross appears on MANIFEST.MF, maybe it's enough doing CTRL+SHIFT+F (Format the Manifest) and saving it. Eclipse seems to have a bad refresh system.

To prevent maven memory problems during the compilation:

  • ERROR: java heap space - java.lang.OutOfMemoryError*

In Windows we have to run from System Console before projects compilation:

  • set MAVEN_OPTS=-Xmx1024m

Powered by Plone CMS, the Open Source Content Management System

This site conforms to the following standards: