First of all, to compile gvSIG Mobile 1.0 there are some needed software that have to be installed.
http://www.eclipse.org/downloads/
http://subclipse.tigris.org/servlets/ProjectProcess?pageID=p4wYuA
After check it out if it's installed and didn't find it then can be installed using the eclipse market.
http://archive.eclipse.org/equinox/drops/R-3.5-200906111540/index.php#Equinox
Download the Equinox bundles that we need to run the application from Eclipse:
org.eclipse.equinox.transforms.hook - Transformer Hook Framework Extension
org.eclipse.equinox.wireadmin - Wire Admin Service
org.eclipse.equinox.util - Equinox Util Bundle
org.eclipse.osgi - OSGi System Bundle
org.eclipse.osgi.services - OSGi Release 4.0.1 Services
org.eclipse.osgi.util - OSGi Release 4.0.1 Utility Classes
Once all are downloaded, copy all to the eclipse plugins folder from the file explorer.
Restart Eclipse to update the new loaded plug-ins. Maybe need run eclipse -clean from the console to update the OSGI plugins.
http://maven.apache.org/download.html
Add the gvSIG Mobile SVN
https://devel.gvsig.org/svn/gvsig-mobile
Can found more information about the project from: https://devel.gvsig.org/redmine/projects/gvsig-mobile
Simply download all the projects from the tag:
SVN repository: https://devel.gvsig.org/svn/gvsig-mobile Tag folder: /appGvsigMobile/tags/gvsig_mobile_1_0__22_nov_2012
Alternatively, you can download each project from their original URLs to get the latest versions (compilation is not guaranteed in all cases):
All the bundles above are optional.
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:
mvn -P cdc install
mvn -P cdc clean package eclipse:eclipse -Declipse.pde -Dmaven.test.skip=true install
mvn -P cdc clean package eclipse:eclipse -Declipse.pde -Dmaven.test.skip=true install
mvn -P cdc clean package eclipse:eclipse -Declipse.pde -Dmaven.test.skip=true install
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:
To prevent maven memory problems during the compilation:
In Windows we have to run from System Console before projects compilation:
First of all make a new OSGI application launcher:
Run Configurations -> New OSGI Framework...
Now select all the workspace bundles just clicking on the Workspace check at Bundles Tab. Once all the bundles are selected we have to set the right Start Level to each one:
Once OSGI is launched, we can launch Equinox orders from Eclipse Console. Equinox show the console commands typing the command ?help?.
The most used commands are ss, start y stop:
ss: List the bundles installed on the Equinox framework.
It's possible stop and start bundles with the ?start? and ?stop? commands with the bundle number id. For instance to stop the org.gvsig.mobile.extension.base just type ?stop 13?. Those commands are useful when one bundle don't START (It shows ?ACTIVE? status) correctly then starting them with the ?start? command the console shows all the launched exceptions.
When is activated org.gvsig.mobile.dll it look for the jni libraries in the paths defined at the java.library.path. You can set this library path with -Djava.library.path = your_libraries_path option setted as VM arguments at the Arguments Tab from Run Configurations. If the java.library.path doesn't contain the JNI libraries then UnsatisfiedLinkError is launched at the app start.
Simply follow these steps in order to copy the resulting compiled bundles to the final device (whether it's a PDA, smartphone or PC):
build/product/gvSIG-Mobile/bundles
That folder contains subfolders with the essential and the optional bundles, depending on how your workspace is configured.
/jars/gvSIG-Mobile/bundles