Compile bundles using maven
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): ::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 gvsig-repository [user] [password] 666 777 [path_to_local_maven_repo] true








