How to compile gvSIG 2.0

I am proud to share with you the steps to compile gvSIG 2.0, which I discovered thanks to some fellows developers, whom I met thanks to the latests Jornadas GvSIG.

Although you can find a full guide on the official documentation, this simple steps will let you customize and compile your own gvSIG2.0 version without much trouble.

First, you have to install some basic dependencies:

#apt-get install maven2 subversion

Next, we create a folder in which we can work:

$mkdir gvSIG; cd gvSIG

Once we have the basic workspace, we download the source code:

$svn co

Before compiling anything, we prepare a basic configuration file:

$ cat > ~/ << EOF
export native_classifier=${native_platform}-${native_distribution}-${native_compiler}-${native_arch}-${native_libraryType}

The next code can be written on the .bashrc file of your /home folder, but we can also execute it on the console we are working with.

$if [ -f "${HOME}/" ]
. ${HOME}/
export MAVEN_OPTS="-Xmx256M -XX:MaxPermSize=64m -Dnative-classifier=${native_classifier} -Dnative-platform=${native_platform}"
export MAVEN_OPTS="-Xmx256M -XX:MaxPermSize=64m"

Once we have the environment ready, we do the first compilation with maven. Patience, it may take long.

$mvn install

Now that we have our first maven compilation, we proceed to use ant to end up setting up the environment. This command will access to the online repository of gvSIG to download the rest of the source code and will compile and generate gvSIG.

$ant svn.checkout.all

Once we have the environment ready, we proceed to prepare the flavor of gvSIG we are going to use. On his post we will use the standard version of gvSIG:

$cd projects/gvsig-standard
$ant svn.checkout.all

Patience, much more patience.

$mvn install

And it’s done. The application is on the products folder. To execute it, we execute the script

If at the start we get the “command java not found” error, we have to specify the environment variable JAVA_HOME:

$export JAVA_HOME=/usr/lib/jvm...

Now you can use your own customized version.

Soon, I will post about how to create plugins.

Author: María Arias de Reyna Domínguez

Redhatter, Feminist, Geoinquieta, Atheist, crazy of the pussy and Social Justice Warrior. Chaotic good.

3 thoughts on “How to compile gvSIG 2.0”

Leave a Reply

Your e-mail address will not be published. Required fields are marked *