Skip to content

Commit

Permalink
source code and build instructions
Browse files Browse the repository at this point in the history
Signed-off-by: Jody Garnett <[email protected]>
  • Loading branch information
jodygarnett committed Jun 13, 2020
1 parent 2b82d3b commit 82ad4ae
Show file tree
Hide file tree
Showing 3 changed files with 143 additions and 7 deletions.
96 changes: 96 additions & 0 deletions software_development/BUILDING.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,99 @@
# Building

See [Installing from source code](https://geonetwork-opensource.org/manuals/trunk/en/maintainer-guide/installing/installing-from-source-code.html) (Maintainer Guide)

Build GeoNetwork
----------------

Once you checked out the code from Github repository, go inside the GeoNetwork’s root folder and execute the maven build command:

```
mvn clean install
```

If the build is successful you'll get an output like:
```
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] ------------------------------------------------------------------------
[INFO] GeoNetwork opensource ................................. SUCCESS [1.345s]
[INFO] Caching xslt module ................................... SUCCESS [1.126s]
[INFO] Jeeves modules ........................................ SUCCESS [3.970s]
[INFO] ArcSDE module (dummy-api) ............................. SUCCESS [0.566s]
[INFO] GeoNetwork web client module .......................... SUCCESS [23.084s]
[INFO] GeoNetwork user interface module ...................... SUCCESS [15.940s]
[INFO] Oaipmh modules ........................................ SUCCESS [1.029s]
[INFO] GeoNetwork domain ..................................... SUCCESS [0.808s]
[INFO] GeoNetwork core ....................................... SUCCESS [6.426s]
[INFO] GeoNetwork CSW server ................................. SUCCESS [2.050s]
[INFO] GeoNetwork health monitor ............................. SUCCESS [1.014s]
[INFO] GeoNetwork harvesters ................................. SUCCESS [2.583s]
[INFO] GeoNetwork services ................................... SUCCESS [3.178s]
[INFO] GeoNetwork Web module ................................. SUCCESS [2:31.387s]
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3 minutes 35 seconds
[INFO] Finished at: Sun Oct 27 16:21:46 CET 2013
```

Your local maven repository now contain the GeoNetwork artifacts created (``$HOME/.m2/repository/org/geonetwork-opensource``).

Compilation options
-------------------

Many Maven build options are available, for instance, you might like to use following options :

* To skip tests:

```
mvn install -DskipTests
```

* Offline use:

```
mvn install -o
```

* Build really fast with 2 threads per cpu core

```
mvn install -o -DskipTests -T 2C
```

Please refer to the maven documentation for additional options, [Maven: The Complete Reference](http://www.sonatype.com/books/mvnref-book/reference/public-book.html)

Maven Profiles
--------------

Maven profiles are used to enable additional build configuration.

Some components (eg. WFS feature indexing) of the application rely on an Elasticsearch instance. To enable those options, build the application with the ```es``` profile.

```
mvn clean install -Pes
```

Run embedded Jetty server
-------------------------

Maven comes with built-in support for Jetty via a [plug-in](https://www.eclipse.org/jetty/documentation/current/jetty-maven-plugin.html)

To run GeoNetwork with the embedded Jetty server you have to change directory to the root of the **web** module,
and then execute the following maven command:

```
cd web
mvn jetty:run -Penv-dev
```

After a moment, GeoNetwork should be accessible at: http://localhost:8080/geonetwork

For changes related to the user interface in the `web-ui` module or the metadata schemas in the `schemas` module, can be deployed in jetty executing the following maven command in the **web** module:

```
mvn process-resources
```
16 changes: 10 additions & 6 deletions software_development/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,16 @@ If you just want to use the software and are looking for instructions on how to
there is a lot of documentation for users, administrators, metadata editors and application
maintainers at: [GeoNetwork Documentation](http://geonetwork-opensource.org/manuals/trunk/eng/users/index.html).

# Development Environment
# Quickstart

Build the application
Get GeoNetwork running - the short path:

```
git clone --depth 3 --recursive https://github.com/geonetwork/core-geonetwork.git
cd core-geonetwork
mvn clean install -DskipTests
cd web
mvn jetty:run
```

## Testing

See .

The application is opened on http://localhost:8080/geonetwork
38 changes: 37 additions & 1 deletion software_development/SOURCE.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,39 @@
# Source Code

See [Installing from source code](https://geonetwork-opensource.org/manuals/trunk/en/maintainer-guide/installing/installing-from-source-code.html) (Maintainer Guide)
## Check out source code

Clone the repository:

```
git clone --recursive https://github.com/geonetwork/core-geonetwork.git
```

And build:

```
cd core-geonetwork
mvn clean install -DskipTests
```

Submodules
----------

GeoNetwork use submodules, these were initiziled by the ``--recursive`` option when cloning the repository.

If you missed using ``--recursive`` run the following:

.. code-block:: shell

cd core-geonetwork
git submodule init
git submodule update

Submodules are used to keep track of externals dependencies. It is necessary to init and update them after a branch change:


.. code-block:: shell

git submodule update --init


Remember to rebuild the application after updating external dependencies.

0 comments on commit 82ad4ae

Please sign in to comment.