Author: François Prunayre Date: 01/21/2010 == How to run GeoNetwork using embedded Jetty under Eclipse ? == * create a Java project * svn co https://geonetwork.svn.sourceforge.net/svnroot/geonetwork/trunk in your new Java project * define the following directory as source directory * src * jeeves/src * cachingxslt/src * add the lib in your project build path * web/geonetwork/WEB-INF/lib/*.jar * web/intermap/WEB-INF/lib/*.jar * jetty/lib/**/*.jar * In order to avoid a !ClassNotFoundException for org.mortbay.jndi.!InitialContextFactory, you could modify the src/jndi.properties file as following : * java.naming.factory.url.pkgs=org.mortbay.naming * java.naming.factory.initial=org.mortbay.naming.!InitialContextFactory * click on "Run configuration ..." * add a new "Java Application" * configure the Main panel: * Main class is the Jetty main start class org.mortbay.start.Main (If you can't find this class using the search button, check that jetty/start.jar is in your build path) [[Image(run-config-1.png, 60%)]] * configure the Arguments panel * working directory is the bin folder. * VM arguments allows to manage memory used by the application [[Image(run-config-2.png, 60%)]] * check the classpath contains all necessary jar files. [[Image(run-config-3.png, 60%)]] * add source folder (needed for debugging) [[Image(run-config-4.png, 60%)]] * save and start the application using normal/debug/profiling mode. [[Image(run-config-start.png)]] === Issues === * I'm still looking how to redirect all logs info (including geonetwork.log) to the eclipse console view. * If you have some errors about classes not available due to access restrictions ("Access restriction: The type BASE64Encoder is not accessible due to restriction on required library" for example), just go to the "Window" / "Preferences" / "Java" / "Compiler" / "!Errors/Warnings" menu and then set "Forbidden reference (access rules)" to "Warning" or "Ignore" instead of "Error".