-
-
Notifications
You must be signed in to change notification settings - Fork 492
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Jody Garnett <[email protected]>
- Loading branch information
1 parent
2b82d3b
commit 82ad4ae
Showing
3 changed files
with
143 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |