[GeoNetwork-devel] modifying/compiling GN

I'm modifying geonetwork 2.0.3 source code but when I make changes to let say
UpdateCategories.java... when I build it and run it in debug mode... my
changes are not taken into consideration... it's still going through the old
source code. I've declared variable that don't exist at run time. And if I
hit "compile this file".. then I get hundreds of error messages missing
jeeves, jdom, apache.commons or apache.lucene or even javax (after I got
jeeves and jdom)...

Do I need to get all sources in order to make modification to the source
code? What am I doing wrong?
I'm using GN source from the installation files since I can't connect to CVS
or SVN (highly secure firewall) and NetBean ide.

Thanks
Crayco
--
View this message in context: http://www.nabble.com/modifying-compiling-GN-tf4056775s18419.html#a11523991
Sent from the geonetwork-devel mailing list archive at Nabble.com.

Hi!

I had the same problem using NetBean.. but eclipse is working fine.
I'm using eclipse ide, jdk 5.0 (or 1.5, its the same and not jre) tomcat 5.5
and mysql 5

1- you will need to launch your tomcat server in debug mode in order to
enable the debug function in eclipse. To do so, launch tomcat using the
catalina.bat script with "jpda start" option like this:
C:\ApacheTomcat55\bin\catalina.bat jpda start
If you installed tomcat by downloading the windows installer, catalina.bat
don't seems to come with it. So you need to get the tar.gz file and copy
catalina.bat in your bin directory.

2- eclipse configuration
- make sure tomcat and your eclipse project are using the same jdk package
(c:\path\to\jdk5).
- create a new project by choosing "java project"->"from existing source"
and get the root directory of geonetwork files (c:\geonetwork). eclipse
should select the appropriate src and lib folder, since its standard in java
application.
- Once your project in created, select menu
"project"->"properties"->"builders"->"new" and select the and script
"build.xml" to compile your geonetwork project.
- Go to menu "run"->"debug dialog"->"remote java application" (dbl click)
and select your geonetwork project... give a debug config name "GN_debug"
the rest of the config for debug should be fine by default (port #, source,
etc.)

3- Before your compile, make sure all tomcat services are closed.
Compile
launch tomcat using C:\ApacheTomcat55\bin\catalina.bat jpda start
in eclipse, menu "run"->"debug dialog"->"GN_debug" (or what ever the name
you gave) and eclipse should bring you to the debug interface and connect
you to your tomcat server. Open firefox, browse geonetwork and as soon as
you hit a brake point, firefox will stall and eclipse will bring you to the
brake point.

Notice that in order for a brake point to work, your java VM need to load
the class where your brake point is located. After you connect eclipse to
tomcat using your debug config, the brake point dot will have a little hook
haded, so its activated. If there is no little hook, just a dot, you'll
never hit the brake point, so try somewhere else in the code. Remember, in
order for the hook to show up, tomcat need to be running in debug mode
(catalina.bat jpda start) and eclipse needs to be properly configured and
connected to tomcat debug service.

Hope It will help you
crayco
--
View this message in context: http://www.nabble.com/modifying-compiling-GN-tf4056775s18419.html#a11686499
Sent from the geonetwork-devel mailing list archive at Nabble.com.