xref: /aosp_15_r20/external/apache-commons-bcel/CONTRIBUTING.md (revision 0c56280ab0842982c46a149f7b9eaa497e31e292)
1*0c56280aSSorin Basca<!---
2*0c56280aSSorin Basca Licensed to the Apache Software Foundation (ASF) under one or more
3*0c56280aSSorin Basca contributor license agreements.  See the NOTICE file distributed with
4*0c56280aSSorin Basca this work for additional information regarding copyright ownership.
5*0c56280aSSorin Basca The ASF licenses this file to You under the Apache License, Version 2.0
6*0c56280aSSorin Basca (the "License"); you may not use this file except in compliance with
7*0c56280aSSorin Basca the License.  You may obtain a copy of the License at
8*0c56280aSSorin Basca
9*0c56280aSSorin Basca      http://www.apache.org/licenses/LICENSE-2.0
10*0c56280aSSorin Basca
11*0c56280aSSorin Basca Unless required by applicable law or agreed to in writing, software
12*0c56280aSSorin Basca distributed under the License is distributed on an "AS IS" BASIS,
13*0c56280aSSorin Basca WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14*0c56280aSSorin Basca See the License for the specific language governing permissions and
15*0c56280aSSorin Basca limitations under the License.
16*0c56280aSSorin Basca-->
17*0c56280aSSorin Basca<!---
18*0c56280aSSorin Basca +======================================================================+
19*0c56280aSSorin Basca |****                                                              ****|
20*0c56280aSSorin Basca |****      THIS FILE IS GENERATED BY THE COMMONS BUILD PLUGIN      ****|
21*0c56280aSSorin Basca |****                    DO NOT EDIT DIRECTLY                      ****|
22*0c56280aSSorin Basca |****                                                              ****|
23*0c56280aSSorin Basca +======================================================================+
24*0c56280aSSorin Basca | TEMPLATE FILE: contributing-md-template.md                           |
25*0c56280aSSorin Basca | commons-build-plugin/trunk/src/main/resources/commons-xdoc-templates |
26*0c56280aSSorin Basca +======================================================================+
27*0c56280aSSorin Basca |                                                                      |
28*0c56280aSSorin Basca | 1) Re-generate using: mvn commons-build:contributing-md              |
29*0c56280aSSorin Basca |                                                                      |
30*0c56280aSSorin Basca | 2) Set the following properties in the component's pom:              |
31*0c56280aSSorin Basca |    - commons.jira.id  (required, alphabetic, upper case)             |
32*0c56280aSSorin Basca |                                                                      |
33*0c56280aSSorin Basca | 3) Example Properties                                                |
34*0c56280aSSorin Basca |                                                                      |
35*0c56280aSSorin Basca |  <properties>                                                        |
36*0c56280aSSorin Basca |    <commons.jira.id>MATH</commons.jira.id>                           |
37*0c56280aSSorin Basca |  </properties>                                                       |
38*0c56280aSSorin Basca |                                                                      |
39*0c56280aSSorin Basca +======================================================================+
40*0c56280aSSorin Basca--->
41*0c56280aSSorin BascaContributing to Apache Commons BCEL
42*0c56280aSSorin Basca======================
43*0c56280aSSorin Basca
44*0c56280aSSorin BascaYou have found a bug or you have an idea for a cool new feature? Contributing code is a great way to give something back to
45*0c56280aSSorin Bascathe open source community. Before you dig right into the code there are a few guidelines that we need contributors to
46*0c56280aSSorin Bascafollow so that we can have a chance of keeping on top of things.
47*0c56280aSSorin Basca
48*0c56280aSSorin BascaGetting Started
49*0c56280aSSorin Basca---------------
50*0c56280aSSorin Basca
51*0c56280aSSorin Basca+ Make sure you have a [JIRA account](https://issues.apache.org/jira/).
52*0c56280aSSorin Basca+ Make sure you have a [GitHub account](https://github.com/signup/free).
53*0c56280aSSorin Basca+ If you're planning to implement a new feature it makes sense to discuss your changes on the [dev list](https://commons.apache.org/mail-lists.html) first. This way you can make sure you're not wasting your time on something that isn't considered to be in Apache Commons BCEL's scope.
54*0c56280aSSorin Basca+ Submit a [Jira Ticket][jira] for your issue, assuming one does not already exist.
55*0c56280aSSorin Basca  + Clearly describe the issue including steps to reproduce when it is a bug.
56*0c56280aSSorin Basca  + Make sure you fill in the earliest version that you know has the issue.
57*0c56280aSSorin Basca+ Find the corresponding [repository on GitHub](https://github.com/apache/?query=commons-),
58*0c56280aSSorin Basca[fork](https://help.github.com/articles/fork-a-repo/) and check out your forked repository.
59*0c56280aSSorin Basca
60*0c56280aSSorin BascaMaking Changes
61*0c56280aSSorin Basca--------------
62*0c56280aSSorin Basca
63*0c56280aSSorin Basca+ Create a _topic branch_ for your isolated work.
64*0c56280aSSorin Basca  * Usually you should base your branch on the `master` or `trunk` branch.
65*0c56280aSSorin Basca  * A good topic branch name can be the JIRA bug id plus a keyword, e.g. `BCEL-123-InputStream`.
66*0c56280aSSorin Basca  * If you have submitted multiple JIRA issues, try to maintain separate branches and pull requests.
67*0c56280aSSorin Basca+ Make commits of logical units.
68*0c56280aSSorin Basca  * Make sure your commit messages are meaningful and in the proper format. Your commit message should contain the key of the JIRA issue.
69*0c56280aSSorin Basca  * e.g. `BCEL-123: Close input stream earlier`
70*0c56280aSSorin Basca+ Respect the original code style:
71*0c56280aSSorin Basca  + Only use spaces for indentation.
72*0c56280aSSorin Basca  + Create minimal diffs - disable _On Save_ actions like _Reformat Source Code_ or _Organize Imports_. If you feel the source code should be reformatted create a separate PR for this change first.
73*0c56280aSSorin Basca  + Check for unnecessary whitespace with `git diff` -- check before committing.
74*0c56280aSSorin Basca+ Make sure you have added the necessary tests for your changes, typically in `src/test/java`.
75*0c56280aSSorin Basca+ Run all the tests with `mvn clean verify` to assure nothing else was accidentally broken.
76*0c56280aSSorin Basca
77*0c56280aSSorin BascaMaking Trivial Changes
78*0c56280aSSorin Basca----------------------
79*0c56280aSSorin Basca
80*0c56280aSSorin BascaThe JIRA tickets are used to generate the changelog for the next release.
81*0c56280aSSorin Basca
82*0c56280aSSorin BascaFor changes of a trivial nature to comments and documentation, it is not always necessary to create a new ticket in JIRA.
83*0c56280aSSorin BascaIn this case, it is appropriate to start the first line of a commit with '(doc)' instead of a ticket number.
84*0c56280aSSorin Basca
85*0c56280aSSorin Basca
86*0c56280aSSorin BascaSubmitting Changes
87*0c56280aSSorin Basca------------------
88*0c56280aSSorin Basca
89*0c56280aSSorin Basca+ Sign and submit the Apache [Contributor License Agreement][cla] if you haven't already.
90*0c56280aSSorin Basca  * Note that small patches & typical bug fixes do not require a CLA as
91*0c56280aSSorin Basca    clause 5 of the [Apache License](https://www.apache.org/licenses/LICENSE-2.0.html#contributions)
92*0c56280aSSorin Basca    covers them.
93*0c56280aSSorin Basca+ Push your changes to a topic branch in your fork of the repository.
94*0c56280aSSorin Basca+ Submit a _Pull Request_ to the corresponding repository in the `apache` organization.
95*0c56280aSSorin Basca  * Verify _Files Changed_ shows only your intended changes and does not
96*0c56280aSSorin Basca  include additional files like `target/*.class`
97*0c56280aSSorin Basca+ Update your JIRA ticket and include a link to the pull request in the ticket.
98*0c56280aSSorin Basca
99*0c56280aSSorin BascaIf you prefer to not use GitHub, then you can instead use
100*0c56280aSSorin Basca`git format-patch` (or `svn diff`) and attach the patch file to the JIRA issue.
101*0c56280aSSorin Basca
102*0c56280aSSorin Basca
103*0c56280aSSorin BascaAdditional Resources
104*0c56280aSSorin Basca--------------------
105*0c56280aSSorin Basca
106*0c56280aSSorin Basca+ [Contributing patches](https://commons.apache.org/patches.html)
107*0c56280aSSorin Basca+ [Apache Commons BCEL JIRA project page][jira]
108*0c56280aSSorin Basca+ [Contributor License Agreement][cla]
109*0c56280aSSorin Basca+ [General GitHub documentation](https://help.github.com/)
110*0c56280aSSorin Basca+ [GitHub pull request documentation](https://help.github.com/articles/creating-a-pull-request/)
111*0c56280aSSorin Basca+ [Apache Commons Twitter Account](https://twitter.com/ApacheCommons)
112*0c56280aSSorin Basca+ `#apache-commons` IRC channel on `irc.freenode.net`
113*0c56280aSSorin Basca
114*0c56280aSSorin Basca[cla]:https://www.apache.org/licenses/#clas
115*0c56280aSSorin Basca[jira]:https://issues.apache.org/jira/browse/BCEL
116