community-modules.rst 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447
  1. .. _community_modules:
  2. Community Modules
  3. =================
  4. This document describes the GeoServer community module process. It is a guide
  5. that describes how the GeoServer project takes in contributions from the
  6. community.
  7. In GeoServer a module can fall into one of three classes:
  8. * **core**, those modules which GeoServer requires to function and are
  9. distributed with the main GeoServer distribution
  10. * **extension**, plug-ins available as separate artifacts from the main
  11. distribution
  12. * **community**, experimental or unstable modules which are not part of the
  13. release process
  14. Every module added to GeoServer has its origin as a community module. If the
  15. module becomes stable enough it will eventually become part of the main
  16. GeoServer distribution either as a core module, or as an extension.
  17. Creating a community module
  18. ---------------------------
  19. Requirements
  20. ^^^^^^^^^^^^
  21. The single requirement for adding a community module is the approval of one
  22. Project Steering Committee member.
  23. Process
  24. ^^^^^^^
  25. The following outlines the steps to be taken in order to add a new community module.
  26. #. **Get approval**
  27. The first step is to get approval to add the community module. This
  28. involves first explaining to the rest of the GeoServer community the
  29. purpose and function of the extension to be added. The two best ways to
  30. do this are:
  31. #. send an email to the developers list, or
  32. #. participate in a weekly IRC meeting
  33. After explaining the intention, the approval of at least one Project
  34. Steering Committee member is needed before proceeding. Getting approval is
  35. easy as long as it is explained that the extension will be useful to other
  36. users or developers.
  37. #. **Get version control access**
  38. The next step is to create the community module in the git
  39. repository. To do this it is necessary to be granted commit status. The
  40. process for signing up for version control access is defined in the
  41. :ref:`comitting` section.
  42. #. **Add a new module**
  43. Once commit access is obtained the module can be added. All community
  44. modules live under the directory ``community``, directly under the root of
  45. the source tree. The community modules on trunk can be found
  46. `here <https://github.com/geoserver/geoserver/tree/main/src/community>`_.
  47. For example, from the root of the GeoServer source tree::
  48. [geoserver]% cd src/community
  49. [geoserver/src/community]% mkdir myCommunityModule
  50. [geoserver/src/community]% git add myCommunityModule
  51. [geoserver/src/community]% git commit -m "adding my community module"
  52. #. **Add a Maven POM**
  53. Every module in the build requires a maven pom file, ``pom.xml``. Use the
  54. following as a template:
  55. .. code-block:: xml
  56. <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  57. <modelVersion>4.0.0</modelVersion>
  58. <parent>
  59. <groupId>org.geoserver</groupId>
  60. <artifactId>geoserver</artifactId>
  61. <version>2.8-SNAPSHOT</version> <!-- change this to the proper GeoServer version -->
  62. </parent>
  63. <groupId>org.geoserver</groupId>
  64. <artifactId>myCommunityModule</artifactId>
  65. <version>1.0-SNAPSHOT</version>
  66. <packaging>jar</packaging>
  67. <name>My Community Module</name>
  68. <dependencies>
  69. <!-- add any dependencies your module has here -->
  70. </dependencies>
  71. </project>
  72. Add the file to the root of the new community module,
  73. ``myCommunityModule/pom.xml``
  74. #. **Add a build profile**
  75. The final step involves adding the new module to the maven build, and in
  76. particular adding a build profile for it. To do this:
  77. #. Edit ``community/pom.xml`` and add the following inside of the
  78. ``<profiles>`` element:
  79. .. code-block:: xml
  80. <profiles>
  81. ...
  82. <profile>
  83. <id>myCommunityModule</id>
  84. <modules>
  85. <module>myCommunityModule</module>
  86. </modules>
  87. </profile>
  88. </profiles>
  89. #. Edit ``web/app/pom.xml`` and add the following inside of the ``<profiles>``
  90. element:
  91. .. code-block:: xml
  92. <profiles>
  93. ...
  94. <profile>
  95. <id>myCommunityModule</id>
  96. <dependencies>
  97. <dependency>
  98. <groupId>org.geoserver</groupId>
  99. <artifactId>myCommunityModule</artifactId>
  100. <version>1.0-SNAPSHOT</version>
  101. </dependency>
  102. </dependencies>
  103. </profile>
  104. </profiles>
  105. .. warning::
  106. If the community module depends on any other community modules,
  107. they too should be included in the profile definition.
  108. .. warning::
  109. Ensure that the name of the profile matches the name of the
  110. community module
  111. Promoting a community module
  112. ----------------------------
  113. Once a community modules becomes "stable", it may be promoted to a core or
  114. extension module. Which depends on the nature of the community module. If the
  115. module is plug-in based (i.e. it provides functionality that some users may want,
  116. but others may not) then it should become an extension. Otherwise it should
  117. become a core module.
  118. Requirements
  119. ^^^^^^^^^^^^
  120. The following properties must hold true in order to promote a community module:
  121. #. **The module is not site-specific and can be configured for use by the general GeoServer community.**
  122. A community module of interest to multiple users would meet this goal; while a community module that has hard-coded a domain name would not.
  123. #. **The module has a designated and active maintainer**
  124. Every core and extension module requires a module maintainer. The job of
  125. the maintainer is to fix bugs and address issues which arise with the
  126. module. If a community module is promoted and the maintainer "drops off",
  127. the module is in danger of being demoted back to community status.
  128. #. **The module is considered "stable" by the majority of the PSC**
  129. A module will only be promoted if it is deemed "stable" by the majority of
  130. the PSC. Those PSC members deeming it "unstable" must provide a reasonable
  131. justification for the assertion.
  132. #. **The module maintains 40% test coverage**
  133. A minimum of 40% test coverage must be maintained by the module in order to
  134. be promoted. Of course higher coverage is encouraged. The more test
  135. coverage a community module the more credibility it gets.
  136. #. **The module has no IP violations**
  137. The module must not contain any code with a license or copyright that
  138. violates the GPL.
  139. #. **The module has a page in the user manual**
  140. Each module needs a page in the user manual documenting its function and
  141. usage. Tutorials and walk-throughs are encouraged.
  142. #. **The maintainer has signed the GeoServer Contributor Agreement**
  143. OSGeo retains all copyright on code released as
  144. part of GeoServer. Since core and extension modules are released along with
  145. the rest of GeoServer, the maintainer of said modules must agree to assign
  146. copyright of code to OSGeo.
  147. Process
  148. ^^^^^^^
  149. #. **Submit a GeoServer Improvement Proposal**
  150. To promote a community module the contributor must create a
  151. :ref:`gsip` (GSIP). The proposal must
  152. then go through the regular feedback and voting process.
  153. #. **Move the module**
  154. Once the proposal is accepted, the next step is to move the module out of
  155. the community space. Where the module ends up depends on whether it is being
  156. promoted to a core module, or an extension.
  157. *Core modules*
  158. Core modules live under the root of the source tree::
  159. [geoserver]% mv src/community/myCommunityModule src/
  160. [geoserver]% git add src/myCommunityModule
  161. [geoserver]% git add --all src/community/myCommunityModule
  162. [geoserver]% git commit -m "promoting my community module to a core module"
  163. *Extensions*
  164. Extension modules live under the extension directory, under the root of the
  165. source tree::
  166. [geoserver]% mv src/community/myCommunityModule src/extension
  167. [geoserver]% git add src/extension/myCommunityModule
  168. [geoserver]% git add --all src/community/myCommunityModule
  169. [geoserver]% git commit -m "promoting my community module to an extension"
  170. #. **Update the build**
  171. Once the module has been moved, the maven build must be updated.
  172. *Core modules*
  173. #. Edit ``community/pom.xml`` and remove the profile for the community
  174. module
  175. #. Edit ``pom.xml`` under the root of the source tree and add a module
  176. entry::
  177. <modules>
  178. ...
  179. <module>myCommunityModule</module>
  180. </modules>
  181. #. Edit ``web/app/pom.xml`` and move the dependency on the community module
  182. into the main dependencies section of the pom. Then remove the profile
  183. *Extensions*
  184. #. Copy the profile for the community module from ``community/pom.xml``
  185. to ``extension/pom.xml``
  186. #. Remove the profile from ``community/pom.xml``
  187. #. Remove the release descriptor from ``community/pom.xml`` contained in the maven-assembly-plugin configuration section
  188. #. Remove the dependency from ``community/release/pom.xml``
  189. #. **Update the release process**
  190. The next step is to include the new module in the release process.
  191. *Extensions*
  192. #. Create a new directory under ``release/extensions`` which matches the
  193. name of the extension
  194. #. Add the following to the new directory:
  195. #. A license called :file:`<module>-LICENSE.md` which contains the license notice
  196. for the extension (linking to full `licenses/` documents included below).
  197. Follow the :download:`h2-LICENSE.md </../../../../src/release/extensions/h2/h2-LICENSE.md>` example:
  198. .. literalinclude:: /../../../../src/release/extensions/h2/h2-LICENSE.md
  199. :language: markdown
  200. #. A readme called :file:`<module>-README.md` which contains instructions
  201. on how to install the extension.
  202. Follow the :download:`h2-README.md </../../../../src/release/extensions/h2/h2-README.md>` example:
  203. .. literalinclude:: /../../../../src/release/extensions/h2/h2-README.md
  204. :language: markdown
  205. .. warning::
  206. Don't skip this step.
  207. #. Any "static" files that are required by the extension.
  208. An example would be data files or a proprietary driver not available for download via maven.
  209. #. Create a release assembly called :file:`ext-<module>.xml` under the release directory.
  210. Follow the example of :download:`ext-h2-xml </../../../../src/release/ext-h2.xml>`:
  211. .. literalinclude:: /../../../../src/release/ext-h2.xml
  212. :language: xml
  213. * Add additional ``include`` elements in the root folder (outputDirectory empty) for
  214. the jar dependencies of the module
  215. * Add additional ``include`` elements in the licenses folder (outputDirectory ``licenses``) for
  216. licenses required
  217. * Add an additional fileSet if there are any static file dependencies of the module required by the module
  218. * Use ``file`` with ``desName`` for any individual files that require renaming
  219. #. Add a dependency from ``release/pom.xml`` to the extension
  220. module:
  221. .. code-block:: xml
  222. <dependencies>
  223. ...
  224. <dependency>
  225. <groupId>org.geoserver.extension</groupId>
  226. <artifactId>%module%</artifactId>
  227. <version>%version%</version>
  228. </dependency>
  229. ...
  230. </dependencies>
  231. #. Add an entry for the release descriptor to the root ``pom.xml`` of
  232. the source tree (i.e. one step up from the release directory):
  233. .. code-block:: xml
  234. <!-- artifact assembly -->
  235. <plugin>
  236. <artifactId>maven-assembly-plugin</artifactId>
  237. <version>2.1</version>
  238. <configuration>
  239. <descriptors>
  240. <descriptor>release/war.xml</descriptor>
  241. <descriptor>release/javadoc.xml</descriptor>
  242. <descriptor>release/bin.xml</descriptor>
  243. <descriptor>release/doc.xml</descriptor>
  244. ...
  245. <descriptor>release/ext-%module%.xml</descriptor>
  246. </descriptors>
  247. </configuration>
  248. </plugin>
  249. #. Update the documentation
  250. Add a page to the user manual for the new module.
  251. .. todo::
  252. Finish this by linking somewhere...
  253. #. Download and a contributor license agreement as pdf for txt file:
  254. * `Individual Contributor License Agreement <https://www.osgeo.org/resources/individual-contributor-license/>`_
  255. * `Software Grant and Corporate Contributor License Agreement <https://www.osgeo.org/resources/corporate-contributor-license/>`_
  256. This option can also be used as a "software grant" to donate a specific named contribution in its entirety,
  257. as was done for GeoFence, and indeed GeoServer itself.
  258. #. Follow the instructions on the form to submit it.
  259. Demoting a community module
  260. ---------------------------
  261. For one reason or another a module is neglected and becomes unmaintained. When
  262. this happens the GeoServer PSC essentially becomes the maintainer and may decide
  263. to do one of two things:
  264. #. **Assume maintainership**
  265. In this case someone (may be more than one person) on the PSC agrees to
  266. take on maintainership duties responsibilities for the module, such as bug
  267. fixing
  268. #. **Demote the module**
  269. If no one steps up to maintain the module it **may** be demoted back to
  270. community status. If and when a module is demoted depends on the
  271. circumstances. If the module is relatively "quiet" in that it just works
  272. and not many bug reports arise from it, it may be left alone and not
  273. demoted.
  274. Requirements
  275. ^^^^^^^^^^^^
  276. The following properties must hold true in order to demote a module back to
  277. community status:
  278. #. **The module has no designated maintainer**
  279. The module maintainer has stepped down or is unreachable and has not been
  280. active for a number of weeks.
  281. #. **The module is problematic**
  282. The module contains one or more issues with blocker status, or contains a
  283. "handful" of issues with high priority.
  284. Process
  285. ^^^^^^^
  286. The following outlines the steps to demote a module to community status:
  287. #. **Call for a maintainer**
  288. Before demoting the module first try to find a new maintainer for it. Both notify
  289. GeoServer Devel mailing list and GeoServer User forum that module is in
  290. danger of reverting to community status. Wait a few days to see
  291. if anyone steps up to take on maintainership or provide funding.
  292. #. **Move the module and update the build**
  293. If no one steps up to take on the maintainer role, reverse the steps
  294. described here, taken to promote the module. In summary:
  295. #. Move the module back to the ``community`` directory
  296. #. Disable any of the modules release artifacts
  297. #. Move the profile for the module from ``extension/pom.xml`` to
  298. ``community/pom.xml`` in the case of an extension module
  299. Stepping down from module maintainership
  300. ----------------------------------------
  301. Often a module maintainer does not have the time or resources to continue to
  302. maintain a contribution. This is understood and is a fact of life in the open
  303. source software world. However, to relieve the burden on the project and PSC,
  304. the following steps taken by any maintainer stepping down are highly
  305. appreciated.
  306. #. **Give notice**
  307. The more time you can give to the project in lieu of your departure the
  308. better. Send an email to the developers list as soon as you know you will
  309. be dropping off.
  310. #. **Find a new maintainer**
  311. While often not possible, any attempt to find a new maintainer for the
  312. module is greatly appreciated - maybe someone who has contributed to the module before.