Skip to content

Separate your code

GeoNetwork is built using Maven. This means, there are several folders inside the source code and each of them is a different Maven project that can be built separately.


Create your own project

The best way to work with GeoNetwork and easily upgrade later is add your own Maven project(s) to the Maven build stack, so GeoNetwork code remains unaltered and your changes are decoupled.

To do this, go to the root folder of the source code and create a new folder. This can be done on a GNU/Linux terminal using the following command:

cd core-geonetwork
mkdir custom

Then we have to tell Maven this is a new project that can be built. So we add a new file called pom.xml on this "custom" folder and add the following:

<project xmlns=""



  <name>Hook your customizations tutorial</name>

      <name>General Public License (GPL)</name>


Add your project

Then you should add it to the list of projects Maven will automatically build. On the root folder of the source code, edit the file pom.xml and add your own project:


The idea is that not only we build the project, but also add it to the war file that is being generated. To do this, we edit the file web/pom.xml and add our project as a new dependency inside the tag dependencies:


And on the same file, we should also add our resources folder to the build (if we are going to modify the UI, which we will on this tutorial):


Now, if we build GeoNetwork, it will also build and add our project.