eclipse.rst 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. .. _quickstart_eclipse:
  2. Maven Eclipse Plugin Quickstart
  3. ===============================
  4. This guide is designed to get developers up and running as quick as possible. For a more comprehensive guide see the :ref:`eclipse_guide`.
  5. .. include:: checkout.txt
  6. Generate Eclipse project files with Maven
  7. -----------------------------------------
  8. Generate the eclipse ``.project`` and ``.classpath`` files::
  9. mvn eclipse:eclipse
  10. Import modules into Eclipse
  11. ---------------------------
  12. #. Run the Eclipse IDE
  13. #. Open the Eclipse ``Preferences``
  14. #. Navigate to ``Java``, ``Build Path``, ``Classpath Variables`` and click
  15. ``New...``
  16. .. image:: img/eclipse_m2repo1.jpg
  17. #. Create a classpath variable named "M2_REPO" and set the value to the location
  18. of the local Maven repository, and click ``Ok``
  19. .. image:: img/eclipse_m2repo2.jpg
  20. #. Click ``Ok`` to apply the new Eclipse preferences
  21. #. Right-click in the ``Package Explorer`` and click ``Import...``
  22. .. image:: img/eclipse_import1.jpg
  23. :width: 300
  24. #. Select ``General``, ``Existing Projects into Workspace`` and click ``Next``. (Do not make the mistake of importing ``Maven``, ``Existing Maven Projects``!)
  25. .. image:: img/eclipse_import2.jpg
  26. :width: 400
  27. #. Navigate to the ``geoserver/src`` directory
  28. #. Ensure all modules are selected and click ``Finish``
  29. .. image:: img/eclipse_import3.jpg
  30. :width: 350
  31. Run GeoServer from Eclipse
  32. --------------------------
  33. #. From the ``Package Explorer`` select the ``web-app`` module
  34. #. Navigate to the ``org.geoserver.web`` package
  35. #. Right-click the ``Start`` class and navigate to ``Run as``, ``Java Application``
  36. .. image:: img/eclipse_run1.jpg
  37. :width: 600
  38. #. After running the first time you can return to the ``Run Configurations`` dialog
  39. to fine tune your launch environment (including setting a GEOSERVER_DATA_DIR).
  40. .. note::
  41. If you already have a server running on localhost:8080 see the :ref:`eclipse_guide` for instructions on changing to a different port.
  42. Run GeoServer with Extensions
  43. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  44. The above instructions assume you want to run GeoServer without any extensions enabled. In cases where you do need certain extensions, the ``web-app`` module declares a number of profiles that will enable specific extensions when running ``Start``. To enable an extension, re-generate the root eclipse profile with the appropriate maven profile(s) enabled::
  45. % mvn eclipse:eclipse -P wps
  46. The full list of supported profiles can be found in ``src/web/app/pom.xml``.
  47. Access GeoServer front page
  48. ---------------------------
  49. * After a few seconds, GeoServer should be accessible at: `<http://localhost:8080/geoserver>`_
  50. * The default ``admin`` password is ``geoserver``.