Blame | Last modification | View Log | Download | RSS feed
# Contributing to Apache TomcatFirstly, thanks for your interest in contributing! I hope that this will be apleasant experience for you, and that you will return to continuecontributing.Please visit our [Get Involved page](https://tomcat.apache.org/getinvolved.html)for more information on how to contribute.## Code of ConductThis project and everyone participating in it are governed by the Apachesoftware Foundation's[Code of Conduct](https://www.apache.org/foundation/policies/conduct.html). Byparticipating, you are expected to adhere to this code. If you are aware ofunacceptable behavior, please visit the[Reporting Guidelines page](https://www.apache.org/foundation/policies/conduct.html#reporting-guidelines)and follow the instructions there.## How Can I Contribute?Most of the contributions that we receive are code contributions, but you canalso contribute to the documentation, wiki, etc., or simply report solid bugsfor us to fix.### Reporting BugsPlease review our [guide](https://tomcat.apache.org/bugreport.html) on how tosubmit a bug report. This page also has links to other resources to assistyou.### Reporting Translation improvementsApache Tomcat project uses POEditor for managing the localization files.Please see more at https://cwiki.apache.org/confluence/x/vIPzBQ### Your First Code Contribution### Trouble Deciding How to Contribute?Unsure where to begin contributing to Tomcat? You can start by taking a look atthe issues marked 'Beginner', link below. Please note that the Beginner keywordis pretty new to the project, so if there aren't any issues in the filter feelfree to ask on the [dev list](https://tomcat.apache.org/lists.html#tomcat-dev).* [Beginner issues](https://bz.apache.org/bugzilla/buglist.cgi?bug_status=__open__&keywords=Beginner&keywords_type=allwords&product=Tomcat%209&product=Tomcat%2010&product=Tomcat%2011&query_format=advanced) -issues which should only require a few lines of code, and a test or two toresolve.The list above shows all bugs that are marked 'Beginner' and are open in thecurrently supported Tomcat versions (9.0, 10.1, 11.0 and 12.0).If you prefer C over Java, you may also take a look at the tomcat-native andTomcat Connectors products in Bugzilla.### How to Provide Your First PatchExcited yet? This section will guide you through providing a patch to thecommitters of the project for review and acceptance.##### Choose Your Method of SubmissionYou can provide a patch in one of the following ways (in order of preference):* GitHub Pull Request* Patch attachment to the Bugzilla issue* Email the patch to the developer list. This is not preferred, but if no bugis associated with the patch, or you would like a developer review, an emailmay be appropriate.##### Get the SourcesNow that you've chosen how you want to submit a patch, you need to get thesource code.###### Download The Source DistributionThis method works if you want to submit a patch via email, butthe difference in using the sources distribution and a VCS is that you have tomanually generate the patch file by using diff. If this is what you want, youcan download the sources from the "Source Code Distributions" section of theDownload Page. There is one such page for every major Tomcat version:- [Tomcat 11](https://tomcat.apache.org/download-11.cgi)- [Tomcat 10](https://tomcat.apache.org/download-10.cgi)- [Tomcat 9](https://tomcat.apache.org/download-90.cgi)##### Manual Patch GenerationIf you have chosen to attach a patch to the Bugzilla issue (or emailone), then you'll need to download the sources as noted above, make yourdesired changes and then manually generate your patch using diff (or anyother tool).##### GitHubTo submit a GitHub Pull Request you'll need to fork the[repository](https://github.com/apache/tomcat), clone your fork to do the work:```$ git clone https://github.com/$USERNAME/tomcat.git```and then push your changes, and submit a Pull Request via the GitHub UI.#### Submitting Your Patch!After you've chosen your method of submission, retrieved the sources, andfixed the issue it's time to submit your work. At this point, just followthe method of submission you chose earlier.* GitHub PR - after resolving the issue in your local fork and pushing to yourcopy of the repository, open a GitHub PR for review.* Bugzilla attachment - attach the patch to the Bugzilla issue* Email - again, not preferred, but you may send an email to the developer listwith a patch attached for review.#### Waiting For FeedbackIt may take a while for committers to review. Please be patient during thistime as all committers are volunteers on the project. If a significant amountof time has lapsed since your submission, such as a couple of months, feel freeto either update your BZ, PR, or email the dev list with a message to bump yourissue. Sometimes things get lost in all the work and we need a reminder :smile:## IDE SupportSpecial IDE support for[Eclipse](https://www.eclipse.org/ide/),[IntelliJ IDEA](https://www.jetbrains.com/idea/) and[NetBeans](https://netbeans.org/)is provided through special ant targets:```bashant ide-eclipse``````bashant ide-intellij``````bashant ide-netbeans```Just execute the ant target for your IDE after checking out the sourcesto set up the appropriate configuration files.Also make sure to re-execute the target after switching branches orafter pulling upstream changes in order to keep your IDE configurations in sync.## Style GuideApache Tomcat has very loosely defined coding conventions, but the followingguidelines will be useful:* Use spaces for indenting, not tabs* 100 char line width for Java source, 80 char line width for documentationsource (.txt, .xml)* Java source: { at end of line, 4 space indents* XML source: 2 space indents## Did we miss something?Have you reviewed this guide and found it lacking? Or are you confused aboutsome particular step? If so, please let us know! Or better yet, submit a PR toaddress the issue :wink: