wiki:HowToCompile

Version 3 (modified by fxp, 15 years ago) ( diff )

--

How to compile GeoNetwork

GeoNetwork build

You don't need to build or use the GeoNetwork installer; you can build directly from the source code.

Once you have checked out a copy of GeoNetwork from Subversion, you need to build the system and initialize the database.

  1. Run ant in the top level (no need to type ant all; the default build does the same thing).
  2. Change to the bin directory
  3. If you are using a recent checkout of trunk and you don't want to use the default port of 8080, edit jetty.xml manually, search for 8080, and replace it with your port number of choice.
  4. Start up GAST (use either gast.bat or gast.sh as appropriate for you).
  5. In GAST, Configure your settings - at least:
    • (If using an older version of GAST) Configuration -> Jetty: change the port number if you like and press Save
    • Configuration -> DBMS: change the port number if you like and press Save
    • Database -> Setup: press the Setup button!
    • You may get a warning about circular references; this is "normal".
  6. Quit GAST.
  7. You can now start GeoNetwork using the start-geonetwork.(sh,bat) script.
  8. Done! Load up in your browser.
  9. If you want to load the sample data, start up GAST again, i.e., after you started GeoNetwork, select Options from the Config menu and enter your database settings - for default McKoi, select "Use this account" and use admin as username and password. Then go to Database -> Sample data and press the Import button.

JS build

Some javascript files are minified and concatenated scripts from JavaScript libraries using jsbuild process. Actually only OpenLayers, GeoExt and extent map editor is using this process. In order to build:

  • run ./build.sh under the jsbuild directory. This will create geo-libs.js files used by GeoNetwork

If you don't want to use this small file (for debugging), add the debug parameter to your url which will use the non minified JS files (see xsl/geo/utils.xsl).

Note: See TracWiki for help on using the wiki.