committing.rst 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. .. _comitting:
  2. Committing
  3. ==========
  4. Getting commit access
  5. ---------------------
  6. All contributors are asked to provide an assignment agreement for working on the project:
  7. * `individual_contributor <https://www.osgeo.org/resources/individual-contributor-license/>`__
  8. Individual contributor agreement.
  9. * `corporate_contributor <https://www.osgeo.org/resources/corporate-contributor-license/>`__
  10. Corporate contributor agreement to authorize employees to work on project. May also be used as a software grant to donate software to the project.
  11. GeoServer is grateful that organizations of all shapes and sizes support our project with in-kind participation of their employees. Extending commit access is made to individuals directly based on their expertise demonstrated over time.
  12. This agreement can be printed, signed, scanned and emailed to `info@osgeo.org <mailto:info@osgeo.org>`_ at Open Source Geospatial Foundation (OSGeo). `OSGeo <http://www.osgeo.org/content/foundation/about.html>`_ is the non-profit which holds the GeoServer codebase for the community.
  13. The `contribution licenses <http://www.osgeo.org/content/foundation/legal/licenses.html>`_ are used by OSGeo projects seeking to assign copyright directly to the foundation. These licenses are directly derived from the Apache code contribution licenses (CLA V2.0 and CCLA v r190612).
  14. Community commit access
  15. ^^^^^^^^^^^^^^^^^^^^^^^
  16. The first stage of access allows a developer to commit only to the community module or extension for which they are the maintainer. This stage of access can be obtained quite easily.
  17. The process of getting community commit access is as follows:
  18. #. **Email the developer list**
  19. This first step is all about communication. In order to grant commit access
  20. the other developers on the project must first know what the intention is.
  21. Therefore any developer looking for commit access must first describe what
  22. they want to commit (usually a community module), and what it does.
  23. #. **Sign up for a GitHub account**
  24. GeoServer source code is hosted on Github and you'll need an account in
  25. order to access it. You can sign-up [here <https://github.com/signup/>`_.
  26. #. **Print, sign, scan and send the contributor agreement**
  27. * `corporate_contributor <https://www.osgeo.org/resources/corporate-contributor-license/>`_
  28. * `individual_contributor <https://www.osgeo.org/resources/individual-contributor-license/>`__
  29. Scanned assignment agreement can be emailed `info@osgeo.org <mailto:info@osgeo.org>`_ at OSGeo.
  30. #. **Notify the developer list**
  31. After a developer has signed up on GitHub they must notify the developer
  32. list. A project despot will then add them to the group of GeoServer
  33. committers and grant write access to the canonical repository.
  34. #. **Fork the canonical GeoServer repository**
  35. All committers maintain a fork of the GeoServer repository that they work
  36. from. Fork the canonical repository into your own account.
  37. #. **Configure your local setup**
  38. Follow this :ref:`guide <source>` in the developer manual.
  39. Core commit access
  40. ^^^^^^^^^^^^^^^^^^
  41. The second stage allows a developer to make commits to the core modules of GeoServer.
  42. Being granted this stage of access takes time, and is obtained only after the
  43. developer has gained the trust of the other core committers.
  44. The process of obtaining core commit access is far less mechanical than the one
  45. to obtain community commit access. It is based solely on trust. To obtain core
  46. commit access a developer must first obtain the trust of the other core
  47. committers.
  48. The way this is typically done is through continuous code review of patches.
  49. After a developer has submitted enough patches that have been met with a
  50. positive response, and those patches require little modifications, the
  51. developer will be nominated for core commit access.
  52. There is no magic number of patches that make the criteria, it is based mostly
  53. on the nature of the patches, how in depth they are, etc... Basically it
  54. boils down to the developer being able to show that they understand the code base
  55. well enough to not seriously break anything.
  56. Commit Guidelines
  57. -----------------
  58. There is not much in the way of strict commit policies when it comes to committing
  59. in GeoServer. But over time some rules and conventions have emerged:
  60. #. **Update copyright headers**
  61. When adding new source files to the repository remember to add the standard
  62. copyright header::
  63. /* (c) 2016 Open Source Geospatial Foundation - all rights reserved
  64. * This code is licensed under the GPL 2.0 license, available at the root
  65. * application directory.
  66. */
  67. When updating a file that does not have an existing header, add one (as above).
  68. When adding content from another organisation maintain copyright history and original license. Only add Open Source Geospatial Foundation if you have made modifications to the file for GeoServer::
  69. /* (c) 2016 Open Source Geospatial Foundation - all rights reserved
  70. * (c) 2014 OpenPlans
  71. * (c) 2008-2010 GeoSolutions
  72. *
  73. * This code is licensed under the GPL 2.0 license, available at the root
  74. * application directory.
  75. *
  76. * Original from GeoWebCache 1.5.1 under a LGPL license
  77. */
  78. In a rare case (as when asking to migrate content from GeoTools) you can obtain permission to change the license to our GPL 2.0 license.
  79. #. **Do not commit large amounts of binary data**
  80. In general do not commit any binary data to the repository. There are cases where
  81. it is appropriate like some data for a test case, but in these cases the files
  82. should be kept as small as possible.
  83. #. **Do not commit jars or libs, use Maven instead**
  84. In general never commit a depending library directly into the repository, this is
  85. what we use Maven for. If you have a jar that is not present in any maven
  86. repositories, ask on the developer list to get it uploaded to one of the project
  87. maven repositories.
  88. #. **Ensure code is properly formatted**
  89. Ensure that the IDE or editor used to edit source files is setup with proper
  90. formatting rules. This means spaces instead of tabs, 100 character line break,
  91. etc...
  92. If using Eclipse ensure you have configured it with the `template and formatter <http://docs.geotools.org/latest/developer/conventions/code/style.html#use-of-formatting-tools>`_
  93. used for GeoTools.