[Geoserver-users] Debugging geoserver/geotools source

Not sure if this is the correct forum but I am trying to debug some geotools code used by geoserver. I have followed these instructions:

http://docs.geoserver.org/latest/en/developer/quickstart/index.html#quickstart

Geoserver starts up fine and I can debug (set breakpoints and walk through) most of the geoserver code but can’t get past the Eclipse “Source not found” error when stepping into a geotools function. I have built the geotools code myself and I am trying to debug that. I am a novice when it comes to Eclipse so I could be missing something very basic. Any suggestions?

Thanks,

Edward Judge

Software Engineer
IBM Software Group, Information Management
INZA SW Development


Phone: 508-382-4166 IBM Marlborough

E-Mail: ejudge@anonymised.com Marlborough, MA 01752
USA


Hi Edward,

Posting here is fine but you may want to post to geoserver-devel@lists.sourceforge.net for future dev questions.

As for your question, if you have built geotools locally you should have the source attachments for all the jars in the local maven repository. Might be good to just double check this.

Other thing would be to ensure the versions match up. So the version of geotools you built locally is the one that is actually being depended on by geoserver.

Other than that you may need to another “mvn eclipse:eclipse” in geoserver just to kick the project settings. And perhaps a restart of eclipse. I have found myself doing this when it doesn’t automatically pick up source attachments.

-Justin

···

On Wed, Jul 3, 2013 at 12:06 PM, Edward Judge <ejudge@anonymised.com> wrote:

Not sure if this is the correct forum but I am trying to debug some geotools code used by geoserver. I have followed these instructions:

http://docs.geoserver.org/latest/en/developer/quickstart/index.html#quickstart

Geoserver starts up fine and I can debug (set breakpoints and walk through) most of the geoserver code but can’t get past the Eclipse “Source not found” error when stepping into a geotools function. I have built the geotools code myself and I am trying to debug that. I am a novice when it comes to Eclipse so I could be missing something very basic. Any suggestions?

Thanks,

Edward Judge

Software Engineer
IBM Software Group, Information Management
INZA SW Development


Phone: 508-382-4166 IBM Marlborough

E-Mail: ejudge@anonymised.com Marlborough, MA 01752
USA



This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev


Geoserver-users mailing list
Geoserver-users@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users


Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.

Hi Justin,

Yea, I have noticed that my geotools build is 9.2 and the one that geoserver uses is 9.1. I see both in my maven repository.
Is there a geoserver version that uses 9.2 or can the version be overridden when I build geoserver? This sounds like it could be the issue.
I’ve done "“mvn eclipse:eclipse” and restarted Eclipse many times with no difference in behavior.

Thanks,

Edward Judge

Software Engineer
IBM Software Group, Information Management
INZA SW Development


Phone: 508-382-4166 IBM Marlborough

E-Mail: ejudge@anonymised.com Marlborough, MA 01752
USA


From: Justin Deoliveira jdeolive@anonymised.com
To: Edward Judge/Marlborough/IBM@anonymised.com,
Cc: “geoserver-users@lists.sourceforge.netgeoserver-users@lists.sourceforge.net
Date: 07/03/2013 02:49 PM
Subject: Re: [Geoserver-users] Debugging geoserver/geotools source


Hi Edward,

Posting here is fine but you may want to post to geoserver-devel@lists.sourceforge.net for future dev questions.

As for your question, if you have built geotools locally you should have the source attachments for all the jars in the local maven repository. Might be good to just double check this.

Other thing would be to ensure the versions match up. So the version of geotools you built locally is the one that is actually being depended on by geoserver.

Other than that you may need to another “mvn eclipse:eclipse” in geoserver just to kick the project settings. And perhaps a restart of eclipse. I have found myself doing this when it doesn’t automatically pick up source attachments.

-Justin

On Wed, Jul 3, 2013 at 12:06 PM, Edward Judge <ejudge@anonymised.com> wrote:
Not sure if this is the correct forum but I am trying to debug some geotools code used by geoserver. I have followed these instructions:

http://docs.geoserver.org/latest/en/developer/quickstart/index.html#quickstart

Geoserver starts up fine and I can debug (set breakpoints and walk through) most of the geoserver code but can’t get past the Eclipse “Source not found” error when stepping into a geotools function. I have built the geotools code myself and I am trying to debug that. I am a novice when it comes to Eclipse so I could be missing something very basic. Any suggestions?

Thanks,

Edward Judge

Software Engineer
IBM Software Group, Information Management
INZA SW Development


Phone: 508-382-4166 IBM Marlborough

E-Mail: ejudge@anonymised.com Marlborough, MA 01752
USA



This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev


Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users


Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.

Hey Edward,

···

It really depends on what revision of GeoServer you are building at. The latest on the stable and master branches (currently versioned 2.3-SNAPSHOt and 2.4-SNAPSHOT) follow the latest on the geotools stable and master branches (currently 9-SNAPSHOT and 10-SNAPSHOT).

Any numbered geoserver release will be built against a numbered geotools release, but it can depend. The projects generally follow the same release cycle so they are consistent most of the time but there is nothing stopping a geotools release to occur without a geoserver one.

All that said. The easiest way to find out the geotools version is to look in the root geoserver pom. Near the end there is a property defining the geotools version. For example on master:

https://github.com/geoserver/geoserver/blob/master/src/pom.xml#L1459

And on the latest stable released version (2.3.3).

https://github.com/geoserver/geoserver/blob/2.3.3/src/pom.xml#L1480

So i would look there and figure out what geotools release you need to build. If its a numbered version it will correspond to a tag in the geotools repository. Then check out and build locally from that tag.

Hope that wasn’t too long winded :slight_smile:

On Wed, Jul 3, 2013 at 1:16 PM, Edward Judge <ejudge@anonymised.com> wrote:

Hi Justin,

Yea, I have noticed that my geotools build is 9.2 and the one that geoserver uses is 9.1. I see both in my maven repository.
Is there a geoserver version that uses 9.2 or can the version be overridden when I build geoserver? This sounds like it could be the issue.
I’ve done "“mvn eclipse:eclipse” and restarted Eclipse many times with no difference in behavior.

Thanks,

Edward Judge

Software Engineer
IBM Software Group, Information Management
INZA SW Development


Phone: 508-382-4166 IBM Marlborough

E-Mail: ejudge@anonymised.com Marlborough, MA 01752
USA


From: Justin Deoliveira <jdeolive@anonymised.com>
To: Edward Judge/Marlborough/IBM@anonymised.com,
Cc: “geoserver-users@anonymised.comsourceforge.net” <geoserver-users@lists.sourceforge.net>
Date: 07/03/2013 02:49 PM
Subject: Re: [Geoserver-users] Debugging geoserver/geotools source


Hi Edward,

Posting here is fine but you may want to post to geoserver-devel@lists.sourceforge.net for future dev questions.

As for your question, if you have built geotools locally you should have the source attachments for all the jars in the local maven repository. Might be good to just double check this.

Other thing would be to ensure the versions match up. So the version of geotools you built locally is the one that is actually being depended on by geoserver.

Other than that you may need to another “mvn eclipse:eclipse” in geoserver just to kick the project settings. And perhaps a restart of eclipse. I have found myself doing this when it doesn’t automatically pick up source attachments.

-Justin

On Wed, Jul 3, 2013 at 12:06 PM, Edward Judge <ejudge@anonymised.com> wrote:
Not sure if this is the correct forum but I am trying to debug some geotools code used by geoserver. I have followed these instructions:

http://docs.geoserver.org/latest/en/developer/quickstart/index.html#quickstart

Geoserver starts up fine and I can debug (set breakpoints and walk through) most of the geoserver code but can’t get past the Eclipse “Source not found” error when stepping into a geotools function. I have built the geotools code myself and I am trying to debug that. I am a novice when it comes to Eclipse so I could be missing something very basic. Any suggestions?

Thanks,

Edward Judge

Software Engineer
IBM Software Group, Information Management
INZA SW Development


Phone: 508-382-4166 IBM Marlborough

E-Mail: ejudge@anonymised.com Marlborough, MA 01752
USA



This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev


Geoserver-users mailing list
Geoserver-users@anonymised.comforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users


Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.


Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.

Edward,

please ensure that you built the correct version of GeoTools for your GeoServer. For example, if you built GeoTools 9.2 from source and then built GeoServer 2.3-SNAPSHOT from the 2.3.x branch (not 2.3.2), then your GeoServer will depend on GeoTools 9-SNAPSHOT, not the one built locally (9.2). Maven will then note that you have no source for that version and not attach anything. "mvn dependency:tree" is your friend. Or you could just look in the GeoServer top-level pom for gt.version and then compare with the version set in the first <version> in the GeoTools top-level pom.

Maven will only download source attachments if you use -DdownloadSources=true for the eclipse:eclipse goal. You should not need to do this for GeoTools if you are building it from source because the project is configured to build and install source jars. This option is very useful as it will allow you to step into source from other projects outside GeoTools and GeoServer.

Maven 3 also remembers from where artifacts were downloaded and is quite fragile if the download source changes. This new feature is in my view a bug:
http://jira.codehaus.org/browse/MNG-5181

I do not know if this is the problem in your case, but if your Maven repository has been poisoned by mixed download sources, which mysteriously causes Maven to ignore artifacts in your local repo, you can either remove all the affected artifacts or just the _maven.repositories files:

find ~/.m2/repository -name _maven.repositories -exec rm -f {} \;

I always build with -nsu (no snapshot updates) to ensure I never get GeoTools snapshot downloads mixed with local snapshot builds.

Kind regards,
Ben.

On 04/07/13 02:06, Edward Judge wrote:

Not sure if this is the correct forum but I am trying to debug some
geotools code used by geoserver. I have followed these instructions:

_http://docs.geoserver.org/latest/en/developer/quickstart/index.html#quickstart_

Geoserver starts up fine and I can debug (set breakpoints and walk
through) most of the geoserver code but can't get past the Eclipse
"Source not found" error when stepping into a geotools function. I have
built the geotools code myself and I am trying to debug that. I am a
novice when it comes to Eclipse so I could be missing something very
basic. Any suggestions?

Thanks,

*Edward Judge*

Software Engineer
IBM Software Group, Information Management
INZA SW Development
------------------------------------------------------------------------
Phone: 508-382-4166 IBM Marlborough
E-Mail: ejudge@anonymised.com Marlborough, MA 01752
     USA
    
------------------------------------------------------------------------
      
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev

_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
Ben Caradoc-Davies <Ben.Caradoc-Davies@anonymised.com>
Software Engineer
CSIRO Earth Science and Resource Engineering
Australian Resources Research Centre