[Geoserver-devel] efficient debugging (geoserver plugins)

Dear Developers!

I’m developing a new plugin for GeoServer. I am also a newbie to GeoServer development. I am through the first steps (creating a jar, put it into webapps/geoserver/WEB-INF/lib directory, everything works fine), but I’m stuck here with debugging the plugin.

It is a long and exhausting procedure making any changes alive:

  1. make the desired changes
  2. run “mvn install” to create the jar
  3. stop geoserver
  4. overwrite the jar in the WEB-INF/lib directory
  5. start geoserver
  6. geoserver login
  7. observe the log window (in a simple cmd terminal, I use Windows and start geoserver from this terminal using start.bat)

Does anyone have a better way to debug and make the development more efficient? I use Eclipse Luna 4.4.0

Many thanks in advance.

Gergely Padányi-Gulyás

On Mon, Oct 6, 2014 at 3:37 PM, Gergely Padányi-Gulyás <fegyi001@...403...>
wrote:

Dear Developers!

I'm developing a new plugin for GeoServer. I am also a newbie to GeoServer
development. I am through the first steps (creating a jar, put it into
webapps/geoserver/WEB-INF/lib directory, everything works fine), but I'm
stuck here with debugging the plugin.

It is a long and exhausting procedure making any changes alive:
1. make the desired changes
2. run "mvn install" to create the jar
3. stop geoserver
4. overwrite the jar in the WEB-INF/lib directory
5. start geoserver
6. geoserver login
7. observe the log window (in a simple cmd terminal, I use Windows and
start geoserver from this terminal using start.bat)

Does anyone have a better way to debug and make the development more
efficient? I use Eclipse Luna 4.4.0

I'm not sure it will work, but try this:
* Add web-app as a test dependency in your plugin module,
* Copy the jetty test dependencies from web-app
into your module as test dependencies,
* Copy the Start.java class from web-app among your tests

This should be enough (maybe with some variation/extra steps) to start
GeoServer with your custom module inside.

Or, as an alternative and if your module is of general interest, open your
module to the community by making a community module, and we'll
create a profile to include it int the build on demand

Cheers
Andrea

--

GeoServer Professional Services from the experts! Visit
http://goo.gl/NWWaa2 for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

*AVVERTENZE AI SENSI DEL D.Lgs. 196/2003*

Le informazioni contenute in questo messaggio di posta elettronica e/o
nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il
loro utilizzo è consentito esclusivamente al destinatario del messaggio,
per le finalità indicate nel messaggio stesso. Qualora riceviate questo
messaggio senza esserne il destinatario, Vi preghiamo cortesemente di
darcene notizia via e-mail e di procedere alla distruzione del messaggio
stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso,
divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od
utilizzarlo per finalità diverse, costituisce comportamento contrario ai
principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for
the attention and use of the named addressee(s) and may be confidential or
proprietary in nature or covered by the provisions of privacy act
(Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection
Code).Any use not in accord with its purpose, any disclosure, reproduction,
copying, distribution, or either dissemination, either whole or partial, is
strictly forbidden except previous formal approval of the named
addressee(s). If you are not the intended recipient, please contact
immediately the sender by telephone, fax or e-mail and delete the
information in this message that has been received in error. The sender
does not give any warranty or accept liability as the content, accuracy or
completeness of sent messages and accepts no responsibility for changes
made after they were sent or for other risks which arise as a result of
e-mail transmission, viruses, etc.

-------------------------------------------------------

Hi Gergely.

I think the easier way to debug is to create an eclipse workspace that includes both Geoserver modules and your module.

Then you can easily start Geoserver inside Eclipse using the Start.java class in the web-app module. To include your custom module in the run you can add it as a dependency to the web-app using Java Build Path section of the project properties.

This way you can use Eclipse debug functionalities (breakpoints and so on).

Mauro

Il 12/ott/2014 10:46 “Gergely Padányi-Gulyás” <fegyi001@anonymised.com…> ha scritto:

Dear Developers!

I’m developing a new plugin for GeoServer. I am also a newbie to GeoServer development. I am through the first steps (creating a jar, put it into webapps/geoserver/WEB-INF/lib directory, everything works fine), but I’m stuck here with debugging the plugin.

It is a long and exhausting procedure making any changes alive:

  1. make the desired changes
  2. run “mvn install” to create the jar
  3. stop geoserver
  4. overwrite the jar in the WEB-INF/lib directory
  5. start geoserver
  6. geoserver login
  7. observe the log window (in a simple cmd terminal, I use Windows and start geoserver from this terminal using start.bat)

Does anyone have a better way to debug and make the development more efficient? I use Eclipse Luna 4.4.0

Many thanks in advance.

Gergely Padányi-Gulyás


Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://p.sf.net/sfu/Zoho


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