blob: d0e8d7c2e7c5ceea408ad4fc71276d506edf3c89 [file] [log] [blame]
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="generator" content="Asciidoctor 2.0.10">
<title>Eclipse Jetty: Contribution Guide</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic%7CNoto+Serif:400,400italic,700,700italic%7CDroid+Sans+Mono:400,700">
<link rel="stylesheet" href="./asciidoctor.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
</head>
<body class="article toc2 toc-left">
<div id="header">
<h1>Eclipse Jetty: Contribution Guide</h1>
<div class="details">
<span id="author" class="author">Jetty Developers</span><br>
<span id="email" class="email"><a href="mailto:jetty-dev@eclipse.org">jetty-dev@eclipse.org</a></span><br>
<span id="revnumber">version 10.0.6,</span>
<span id="revdate">2021-06-29</span>
</div>
<div id="toc" class="toc2">
<div id="toctitle">Contribution Guide</div>
<ul class="sectlevel1">
<li><a href="#cg-introduction">Welcome!</a></li>
<li><a href="#cg-community">Participate in the Community</a>
<ul class="sectlevel2">
<li><a href="#cg-mailing-lists">Mailing Lists</a></li>
<li><a href="#cg-stackoverflow">Stack Overflow</a></li>
<li><a href="#cg-issues">Github: Issues and Features</a></li>
</ul>
</li>
<li><a href="#cg-source">Participate in the Code</a>
<ul class="sectlevel2">
<li><a href="#cg-community-source">Source Control</a>
<ul class="sectlevel3">
<li><a href="#cg-primary-scm">Primary SCM</a></li>
<li><a href="#cg-secondary-scm">Secondary SCM</a></li>
</ul>
</li>
<li><a href="#cg-contributing-build">Maven Build</a></li>
<li><a href="#cg-coding-standards">Coding Standards</a>
<ul class="sectlevel3">
<li><a href="#cg-intelli-j">Intelli-J</a></li>
<li><a href="#cg-eclipse">Eclipse</a></li>
<li><a href="#cg-code-conventions">Code Conventions</a></li>
<li><a href="#cg-logging-conventions">Logging Conventions</a></li>
</ul>
</li>
<li><a href="#cg-patches">Contributing Patches</a>
<ul class="sectlevel3">
<li><a href="#cg-contributing-eca">Sign an Eclipse Contributor Agreement (ECA)</a></li>
<li><a href="#t-contributing-git-config">Configuring Git</a></li>
<li><a href="#t-contributing-making-the-commit">Making the Commit</a></li>
<li><a href="#cg-the-pull-request">The Pull Request</a></li>
<li><a href="#cg-our-policies">Our Policies</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="#cg-documentation">Participate in the Documentation</a>
<ul class="sectlevel2">
<li><a href="#cg-documentation-format">Source Control and Maven Build.</a></li>
<li><a href="#cg-documentation-render">The Render Chain Explained</a></li>
<li><a href="#cg-documentation-structure">Project Structure</a></li>
<li><a href="#cg-documentation-guide">Guide Structure</a></li>
<li><a href="#cg-documentation-conventions">Conventions</a>
<ul class="sectlevel3">
<li><a href="#cg-oddities">Oddities</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="#cg-security">Security</a>
<ul class="sectlevel2">
<li><a href="#cg-security-reporting">Reporting Security Issues</a></li>
</ul>
</li>
<li><a href="#cg-conclusion">Thank you!</a></li>
</ul>
</div>
</div>
<div id="content">
<div class="sect1">
<h2 id="cg-introduction"><a class="anchor" href="#cg-introduction"></a><a class="link" href="#cg-introduction">Welcome!</a></h2>
<div class="sectionbody">
<div class="paragraph">
<p>Eclipse Jetty is an open source project with a long pedigree of contribution.
Starting over 20 years ago, Jetty has had many committers over the years and owes much of its success to the people that make up the community.
There are many ways that you may contribute to Jetty, and the goal of this guide is help you get there!</p>
</div>
</div>
</div>
<div class="sect1">
<h2 id="cg-community"><a class="anchor" href="#cg-community"></a><a class="link" href="#cg-community">Participate in the Community</a></h2>
<div class="sectionbody">
<div class="paragraph">
<p>One of the best ways to start contribute and work with Eclipse Jetty is to get plugged into one of the existing communities.
In any one of these you will come across users of neophyte to expert experience and as time permits the developers of Jetty themselves.</p>
</div>
<div class="sect2">
<h3 id="cg-mailing-lists"><a class="anchor" href="#cg-mailing-lists"></a><a class="link" href="#cg-mailing-lists">Mailing Lists</a></h3>
<div class="paragraph">
<p>Mailing lists are a wonderful way to interact with the community at large and for a certain class of issue have the best chances of achieving resolution. There are a number of mailing lists available within the Jetty project and a good rule of thumb to choose between the developer and user lists is to ask yourself if your question is broadly interesting to the community, use the users list and if narrowly focused on Jetty internals or minutiae, then the dev list might be a better option.</p>
</div>
<div class="ulist">
<ul>
<li>
<p>Jetty Developers List</p>
<div class="ulist">
<ul>
<li>
<p>Join - <a href="https://dev.eclipse.org/mailman/listinfo/jetty-dev" class="bare">https://dev.eclipse.org/mailman/listinfo/jetty-dev</a></p>
</li>
<li>
<p>Archives - <a href="http://dev.eclipse.org/mhonarc/lists/jetty-dev/" class="bare">http://dev.eclipse.org/mhonarc/lists/jetty-dev/</a></p>
</li>
</ul>
</div>
</li>
<li>
<p>Jetty Users List</p>
<div class="ulist">
<ul>
<li>
<p>Join - <a href="https://dev.eclipse.org/mailman/listinfo/jetty-users" class="bare">https://dev.eclipse.org/mailman/listinfo/jetty-users</a></p>
</li>
<li>
<p>Archives - <a href="http://dev.eclipse.org/mhonarc/lists/jetty-users/" class="bare">http://dev.eclipse.org/mhonarc/lists/jetty-users/</a></p>
</li>
</ul>
</div>
</li>
<li>
<p>Jetty Announcements List</p>
<div class="ulist">
<ul>
<li>
<p>Join - <a href="https://dev.eclipse.org/mailman/listinfo/jetty-announce" class="bare">https://dev.eclipse.org/mailman/listinfo/jetty-announce</a></p>
</li>
<li>
<p>Archives - <a href="http://dev.eclipse.org/mhonarc/lists/jetty-announce/" class="bare">http://dev.eclipse.org/mhonarc/lists/jetty-announce/</a></p>
</li>
</ul>
</div>
</li>
</ul>
</div>
</div>
<div class="sect2">
<h3 id="cg-stackoverflow"><a class="anchor" href="#cg-stackoverflow"></a><a class="link" href="#cg-stackoverflow">Stack Overflow</a></h3>
<div class="paragraph">
<p>From a simple support perspective it is hard to beat <a href="http://stackoverflow.com">StackOverflow</a> for interacting with a Jetty community. Numerous users have asked and had answered their questions on the platform by other users and developers alike.</p>
</div>
<div class="ulist">
<ul>
<li>
<p>Check out the general <a href="https://stackoverflow.com/questions/tagged/jetty">Jetty</a> tag!</p>
</li>
<li>
<p>The <a href="https://stackoverflow.com/questions/tagged/embedded-jetty">Embedded-Jetty</a> tag has a fair amount of traffic as well.</p>
</li>
</ul>
</div>
</div>
<div class="sect2">
<h3 id="cg-issues"><a class="anchor" href="#cg-issues"></a><a class="link" href="#cg-issues">Github: Issues and Features</a></h3>
<div class="paragraph">
<p>While not necessarily a support channel for solving a specific user problem, the issue tracker for Eclipse Jetty is a great location for addressing issues or suggesting features you want to see (or ideally contribute) in Jetty.</p>
</div>
<div class="paragraph">
<p>When you file a Github Issue in the Eclipse Jetty project there are a number of <strong>labels</strong> available and we encourage to you use them appropriately.</p>
</div>
<div class="ulist">
<ul>
<li>
<p><a href="http://github.com/eclipse/jetty.project">Issues at Github</a>.</p>
</li>
</ul>
</div>
<div class="paragraph">
<p>We have additionally identified and labeled a number of issues that may be appropriate for users of different levels of expertise that might want to contribute to Jetty but not have a specific goal or issue in mind.</p>
</div>
<div class="ulist">
<ul>
<li>
<p><a href="https://github.com/eclipse/jetty.project/issues?q=is%3Aopen+is%3Aissue+label%3A%22Help+Wanted%22">Help Wanted</a></p>
</li>
</ul>
</div>
<div class="paragraph">
<p>Long story short, if you are interested in getting involved with the community, there are a number of options available and you are encouraged to participate at whatever level you like!</p>
</div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="cg-source"><a class="anchor" href="#cg-source"></a><a class="link" href="#cg-source">Participate in the Code</a></h2>
<div class="sectionbody">
<div class="paragraph">
<p>If you are more interested in digging into what makes Jetty tick then this some information that you will need to arm yourself with.
First we start with how to checkout and build Jetty, then on to our general coding standards followed by the actual patch contribution process.</p>
</div>
<div class="sect2">
<h3 id="cg-community-source"><a class="anchor" href="#cg-community-source"></a><a class="link" href="#cg-community-source">Source Control</a></h3>
<div class="paragraph">
<p>The <a href="https://github.com/eclipse/jetty.project">Eclipse Jetty project</a> is located at <a href="https://github.com">Github</a> under the Eclipse Foundation <a href="https://github.com/eclipse">parent project</a>. There are a number of branches that are generally of interest.</p>
</div>
<table class="tableblock frame-all grid-all stretch">
<caption class="title">Table 1. Active Eclipse Jetty Branches</caption>
<colgroup>
<col style="width: 25%;">
<col style="width: 25%;">
<col style="width: 25%;">
<col style="width: 25%;">
</colgroup>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="https://github.com/eclipse/jetty.project/tree/jetty-10.0.x">jetty-11.0.x</a></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Development</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Servlet 5.0</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Java 11+</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="https://github.com/eclipse/jetty.project/tree/jetty-10.0.x">jetty-10.0.x</a></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Development (default branch)</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Servlet 4.0</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Java 11+</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="https://github.com/eclipse/jetty.project/tree/jetty-9.4.x">jetty-9.4.x</a></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Maintenance</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Servlet 3.1</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Java 8</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="https://github.com/eclipse/jetty.project/tree/jetty-9.3.x">jetty-9.3.x</a></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Maintenance</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Servlet 3.0</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Java 8</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="https://github.com/eclipse/jetty.project/tree/jetty-8.1.x">jetty-8.1.x</a></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Historical</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Servlet 2.0</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Java 7</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="https://github.com/eclipse/jetty.project/tree/jetty-7">jetty-7</a></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Mythical</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Servlet 1.0</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Java 6</p></td>
</tr>
</tbody>
</table>
<div class="paragraph">
<p>If you are planning on working with a specific issue within Jetty it is important to target the correct branch for a pull request. Pull requests that are targeted at Maintenance Branches are typically merged forward into subsequent branches while historical branches are left alone merge wise. Depending on the nature of an issue a historical branch may have an issue cherrypicked forward, but maintenance releases are merged wholesale forward as a matter of project policy.</p>
</div>
<div class="sect3">
<h4 id="cg-primary-scm"><a class="anchor" href="#cg-primary-scm"></a><a class="link" href="#cg-primary-scm">Primary SCM</a></h4>
<div class="paragraph">
<p>The primary repository for Jetty is:</p>
</div>
<div class="dlist">
<dl>
<dt class="hdlist1">Jetty Project Repository</dt>
<dd>
<p><a href="https://github.com/eclipse/jetty.project" class="bare">https://github.com/eclipse/jetty.project</a></p>
</dd>
</dl>
</div>
</div>
<div class="sect3">
<h4 id="cg-secondary-scm"><a class="anchor" href="#cg-secondary-scm"></a><a class="link" href="#cg-secondary-scm">Secondary SCM</a></h4>
<div class="paragraph">
<p>These are the URLs for Jetty-related code and metadata.
These are not needed to use Jetty; these are primarily of use for developers who are working with the open source project within Eclipse.</p>
</div>
<div class="dlist">
<dl>
<dt class="hdlist1">Administrative pom.xml file</dt>
<dd>
<p><a href="https://github.com/eclipse/jetty.parent" class="bare">https://github.com/eclipse/jetty.parent</a></p>
</dd>
<dt class="hdlist1">Build related artifacts that release separately, common assembly descriptors, remote resources, etc.</dt>
<dd>
<p><a href="https://github.com/eclipse/jetty.toolchain" class="bare">https://github.com/eclipse/jetty.toolchain</a></p>
</dd>
<dt class="hdlist1">Files associated with the development of Jetty&#8201;&#8212;&#8201;code styles, formatting, iplogs, etc.</dt>
<dd>
<p><a href="http://git.eclipse.org/c/jetty/org.eclipse.jetty.admin.git" class="bare">http://git.eclipse.org/c/jetty/org.eclipse.jetty.admin.git</a></p>
</dd>
</dl>
</div>
</div>
</div>
<div class="sect2">
<h3 id="cg-contributing-build"><a class="anchor" href="#cg-contributing-build"></a><a class="link" href="#cg-contributing-build">Maven Build</a></h3>
<div class="paragraph">
<p>Eclipse Jetty uses <a href="http://maven.apache.org/">Apache Maven</a> for managing the project metadata and controlling the build.</p>
</div>
<div class="paragraph">
<p>Building Jetty should simply be a matter of changing into the relevant directory and executing the following commands:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="screen">$ git clone https://github.com/eclipse/jetty.project.git
$ cd jetty.project
$ mvn install</code></pre>
</div>
</div>
<div class="paragraph">
<p>All relevant dependencies should be downloaded into your local repository automatically and the build should proceed normally.</p>
</div>
<div class="quoteblock">
<blockquote>
<div class="admonitionblock note">
<table>
<tr>
<td class="icon">
<i class="fa icon-note" title="Note"></i>
</td>
<td class="content">
Jetty has a great many test cases that run through the course of its build. Many of these tests spin up embedded instances of Jetty itself, and it is not uncommon to see hundreds or more instances of Jetty start and stop during tests.
Periodically we find some test cases to be more time dependent than they should be and this results in intermittent test failures.
You can help track these down by opening an <a href="https://github.com/eclipse/jetty.project/issues">Issue</a>.
</td>
</tr>
</table>
</div>
</blockquote>
</div>
</div>
<div class="sect2">
<h3 id="cg-coding-standards"><a class="anchor" href="#cg-coding-standards"></a><a class="link" href="#cg-coding-standards">Coding Standards</a></h3>
<div class="paragraph">
<p>Jetty uses number of conventions for its source code. The developers of Jetty use a variety of tooling and editors when developing Jetty so standards and conventions are important!</p>
</div>
<div class="sect3">
<h4 id="cg-intelli-j"><a class="anchor" href="#cg-intelli-j"></a><a class="link" href="#cg-intelli-j">Intelli-J</a></h4>
<div class="paragraph">
<p>The suggested configuration for Intelli-J when working with Jetty is available here: <a href="http://git.eclipse.org/c/jetty/org.eclipse.jetty.admin.git/tree/idea-jetty-codestyle-settings.jar">Intelli-J Codestyle</a></p>
</div>
</div>
<div class="sect3">
<h4 id="cg-eclipse"><a class="anchor" href="#cg-eclipse"></a><a class="link" href="#cg-eclipse">Eclipse</a></h4>
<div class="paragraph">
<p>The Eclipse format configuration can be found here:
<a href="http://git.eclipse.org/c/jetty/org.eclipse.jetty.admin.git/tree/jetty-eclipse-java-format.xml">Eclipse Java Formatting</a></p>
</div>
<div class="paragraph">
<p>There are also some templates available for Eclipse here:
<a href="http://git.eclipse.org/c/jetty/org.eclipse.jetty.admin.git/tree/jetty-eclipse-codetemplates.xml">Eclipse Code Templates</a></p>
</div>
</div>
<div class="sect3">
<h4 id="cg-code-conventions"><a class="anchor" href="#cg-code-conventions"></a><a class="link" href="#cg-code-conventions">Code Conventions</a></h4>
<div class="paragraph">
<p>The following is an example of the Java formatting and naming styles to apply to Jetty:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="java">import some.exact.ClassName; // GOOD
import some.wildcard.package.*; // BAD!
package org.always.have.a.package;
/* --------------------------------------------------------- */
/** Always have some javadoc
*/
class MyClassName
{
// indent by 4 spaces.
// use spaced to indent
// The code must format OK with default tabsize of 8.
private static final int ALL_CAPS_FOR_PUBLIC_CONSTANTS=1;
// Field prefixed with __ for static of _ for normal fields.
// This convention is no longer mandatory, but any given
// class should either consistently use this style or not.
private static String __staticField;
private Object _privateField;
// use getters and setters rather than public fields.
public void setPrivateField(Object privateField)
{
_privateField=privateField;
}
public Object getPrivateField()
{
return _privateField;
}
public void doSomething()
throws SomeException
{
Object local_variable = _privateField;
if (local_variable==null)
{
// do Something
}
}
}</code></pre>
</div>
</div>
<div class="paragraph">
<p>While Eclipse Jetty is an open source project it is also a member of the Eclipse Foundation which carries along some additional responsibilities.
Intellectual Property is a hallmark concern of the Eclipse Foundation so you are encouraged to understand what that entails before diving in.
As much as we would like to accept a tremendous pull request, without the proper chain of events being completed our hands are tied.
That being said, the steps are not particularly onerous and we are happy to work with you to get them accomplished.</p>
</div>
</div>
<div class="sect3">
<h4 id="cg-logging-conventions"><a class="anchor" href="#cg-logging-conventions"></a><a class="link" href="#cg-logging-conventions">Logging Conventions</a></h4>
<div class="paragraph">
<p>When deciding when and what to log, bear in mind a few things:</p>
</div>
<div class="ulist">
<ul>
<li>
<p>never use <code>LOG.debug</code> without a preceding <code>if (LOG.isDebugEnabled())</code></p>
</li>
<li>
<p>we don&#8217;t want to pollute the log with very long stacktraces unless necessary</p>
</li>
<li>
<p>we don&#8217;t want to routinely produce logging events in response to data sent by a user</p>
</li>
<li>
<p>we should not call more than one LOG method for a single event: otherwise log messages may be interleaved and more confusing</p>
</li>
<li>
<p>we should never LOG.warn and then throw that exception, as that will result in double handling</p>
</li>
<li>
<p>we should seldom LOG.debug and then throw as that will make debug verbose and add little information</p>
</li>
<li>
<p>when interacting with a request, or information received from a client:</p>
<div class="ulist">
<ul>
<li>
<p>no logging unless <code>isDebugEnabled</code>, in which case you output at <code>DEBUG</code> level eg:</p>
</li>
</ul>
</div>
</li>
</ul>
</div>
<div class="listingblock">
<div class="content">
<pre> catch (Throwable t)
{
if (LOG.isDebugEnabled())
LOG.debug("Something happened {} {} {}",x, y, z, t);
}</pre>
</div>
</div>
<div class="ulist">
<ul>
<li>
<p>when calling into application code that throws an exception:</p>
<div class="ulist">
<ul>
<li>
<p>use <code>INFO</code> level, and use <code>isDebugEnabled</code> to cut down on the size of the logging of stack traces:</p>
</li>
</ul>
</div>
</li>
</ul>
</div>
<div class="listingblock">
<div class="content">
<pre> catch (Throwable t)
{
if (LOG.isDebugEnabled())
LOG.info("Something happened {} {} {}", x, y, z, t);
else
LOG.info("Something happened {} {} {} {}", x, y, z, t.toString());
}</pre>
</div>
</div>
<div class="ulist">
<ul>
<li>
<p>when exceptions happen in jetty code:</p>
<div class="ulist">
<ul>
<li>
<p>mostly use <code>WARN</code> or <code>ERROR</code> level</p>
</li>
<li>
<p>if the exception is not entirely unexpected, can happen relatively frequently, or can potentially have a very long stack trace and you don&#8217;t want to clutter up the log, you can use <code>isDebugEnabled</code> to cut down on the size of the logging of the stacktrace:</p>
</li>
</ul>
</div>
</li>
</ul>
</div>
<div class="listingblock">
<div class="content">
<pre> catch (Throwable t)
{
if (LOG.isDebugEnabled())
LOG.warn("Something happened {} {} {}", x, y, z, t);
else
LOG.warn("Something happened {} {} {} {}", x, y, z, t.toString());
}</pre>
</div>
</div>
<div class="quoteblock">
<blockquote>
<div class="admonitionblock tip">
<table>
<tr>
<td class="icon">
<i class="fa icon-tip" title="Tip"></i>
</td>
<td class="content">
Be aware that <code>LOG.warn("Something happened", t)</code> is the same as <code>LOG.warn("Something happened {}", t)</code>, at least for the default jetty logging.
In both cases, the full stacktrace is output. If you only want the log message, you need to do <code>LOG.warn("Something happened {}", t.toString())</code>.
</td>
</tr>
</table>
</div>
</blockquote>
</div>
</div>
</div>
<div class="sect2">
<h3 id="cg-patches"><a class="anchor" href="#cg-patches"></a><a class="link" href="#cg-patches">Contributing Patches</a></h3>
<div class="paragraph">
<p>We love seeing people contribute patches to the Jetty project and the process is relatively simple.
The requirements to commit are modest but very important to the Eclipse Foundation and the intellectual property of the open source project.
The following is the general process by which we operate.</p>
</div>
<div class="ulist">
<ul>
<li>
<p>You must have a signed Eclipse Contributor Agreement.</p>
</li>
<li>
<p>This agreement must be under the <em>same</em> email address as the Git pull request originates from.</p>
</li>
<li>
<p>The commit must be signed.</p>
</li>
<li>
<p>When the pull request is made, a git-hook will validate the email address.</p>
<div class="ulist">
<ul>
<li>
<p>If the result is a green checkbox then the Jetty committers can review the pull request.</p>
</li>
<li>
<p>If the result is a red X then there is absolutely nothing the Jetty committers can do to accept the commit at this point.</p>
</li>
</ul>
</div>
</li>
<li>
<p>This may not be the final form a commit will take, there may be some back and forth and you may be asked to re-issue a pull request.</p>
</li>
</ul>
</div>
<div class="paragraph">
<p>Not everything is specifically relevant since we are at GitHub but the crux of things are detailed there.
The ECA is <strong>critically</strong> important to the process.</p>
</div>
<div class="sect3">
<h4 id="cg-contributing-eca"><a class="anchor" href="#cg-contributing-eca"></a><a class="link" href="#cg-contributing-eca">Sign an Eclipse Contributor Agreement (ECA)</a></h4>
<div class="paragraph">
<p>The Eclipse Foundation has a strong Intellectual Property policy which tracks contributions in detail to ensure that:</p>
</div>
<div class="olist arabic">
<ol class="arabic">
<li>
<p>Did the contributor author 100% of the content?</p>
</li>
<li>
<p>Does the contributor have the rights to contribute this content to Eclipse?</p>
</li>
<li>
<p>Is the contribution under the project’s license(s) (e.g. EPL)</p>
</li>
</ol>
</div>
<div class="paragraph">
<p>A contributor needs to e-sign a Eclipse Contributor Agreement (for more explanation see the <a href="http://www.eclipse.org/legal/ecafaq.php">Eclipse ECA FAQ</a> ) regardless of how their contribution patch is provided.
You can familiarize yourself with the Eclipse wiki page at <a href="http://wiki.eclipse.org/Development_Resources/Contributing_via_Git">Contributing via Git</a>.
In order to have a pull request accepted by any Eclipse project you <strong>must</strong> complete this agreement.</p>
</div>
<div class="quoteblock">
<blockquote>
<div class="admonitionblock tip">
<table>
<tr>
<td class="icon">
<i class="fa icon-tip" title="Tip"></i>
</td>
<td class="content">
Log into the <a href="https://www.eclipse.org">Eclipse home page</a> (you will need to create an account with the Eclipse Foundation if you have not already done so), click on "Eclipse ECA", and complete the form.
Be sure to use the <em>same email address</em> when you create any Git commit records.
</td>
</tr>
</table>
</div>
</blockquote>
</div>
</div>
<div class="sect3">
<h4 id="t-contributing-git-config"><a class="anchor" href="#t-contributing-git-config"></a><a class="link" href="#t-contributing-git-config">Configuring Git</a></h4>
<div class="paragraph">
<p>GitHub has copious amounts of quality documentation on how to interact with the system and you will minimally need to configure the user.email property.
Check out the following <a href="https://help.github.com/articles/setting-your-email-in-git">guide on GitHub</a> for more information.</p>
</div>
</div>
<div class="sect3">
<h4 id="t-contributing-making-the-commit"><a class="anchor" href="#t-contributing-making-the-commit"></a><a class="link" href="#t-contributing-making-the-commit">Making the Commit</a></h4>
<div class="paragraph">
<p>When making the commit for the pull request it is <em>vital</em> that you "sign-off" on the commit using <code>git commit -s</code> option.
Without this sign-off, your patch cannot be applied to the Jetty repository because it will be rejected.</p>
</div>
<div class="paragraph">
<p>You can check out the <a href="https://help.github.com/articles/signing-tags-using-gpg">guide at Github</a> for more information.</p>
</div>
<div class="quoteblock">
<blockquote>
<div class="admonitionblock tip">
<table>
<tr>
<td class="icon">
<i class="fa icon-tip" title="Tip"></i>
</td>
<td class="content">
One way to think of this is that when you sign the ECA you are indicating that you are free to contribute to eclipse, but that doesn&#8217;t mean everything you ever do can be contributed.
Using the commit signing mechanism indicates that your commit is under the auspices of your agreement.
</td>
</tr>
</table>
</div>
</blockquote>
</div>
<div class="paragraph">
<p>If a pull request is for a particular issue in our repository then the format of the commit message is important.
The message should follow the form "Issue #123 &lt;description of the commit&gt;".
When the Jetty project runs releases we have an automated process that scans for commits with this format for inclusion in our VERSION.txt file.</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="screen">&gt; git commit -s -m &quot;Issue #123 resolving the issue by adding widget&quot;</code></pre>
</div>
</div>
</div>
<div class="sect3">
<h4 id="cg-the-pull-request"><a class="anchor" href="#cg-the-pull-request"></a><a class="link" href="#cg-the-pull-request">The Pull Request</a></h4>
<div class="paragraph">
<p>Pull requests are very much a GitHub process so best <a href="https://help.github.com/articles/creating-a-pull-request">explained by Github</a>.</p>
</div>
</div>
<div class="sect3">
<h4 id="cg-our-policies"><a class="anchor" href="#cg-our-policies"></a><a class="link" href="#cg-our-policies">Our Policies</a></h4>
<div class="paragraph">
<p>We wholeheartedly welcome contributions to Jetty and will do our best to process them in a timely fashion.
While not every contribution will be accepted, our commitment is to work with interested parties on the things they care about.
With that in mind, we can only handle pull requests with actively engaged parties.
We reserve the right to abandon pull requests whose authors do no respond in a timely fashion.</p>
</div>
<div class="paragraph">
<p>We will generally adhere to the following time frames for contributions:</p>
</div>
<div class="ulist">
<ul>
<li>
<p>Invalid Pull Requests - 1 week</p>
<div class="ulist">
<ul>
<li>
<p>These pull requests do not follow the contribution requirements for some reason, be it missing contributor agreement or the wrong email.</p>
</li>
<li>
<p>We will try and follow up with the pull request author to resolve the issue but much of this is out of our hands and are between committer and the Eclipse Foundation.</p>
</li>
<li>
<p>If we do not hear from the contributor after a week we will close the pull request.</p>
</li>
</ul>
</div>
</li>
<li>
<p>Valid Pull Requests - 2 weeks</p>
<div class="ulist">
<ul>
<li>
<p>These pull requests have a green check mark after the commit title.</p>
</li>
<li>
<p>If the pull request can be immediately applied we will do so.</p>
</li>
<li>
<p>There may need to be some conversation on the issue in which case a committer will follow up with the author in the pull request.</p>
</li>
<li>
<p>If the original contributor does not respond within 2 weeks we may close the commit.</p>
</li>
<li>
<p>If we see value in the commit yet the author has not responded after 2 weeks we may make some variation of the commit ourselves.</p>
</li>
</ul>
</div>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="cg-documentation"><a class="anchor" href="#cg-documentation"></a><a class="link" href="#cg-documentation">Participate in the Documentation</a></h2>
<div class="sectionbody">
<div class="paragraph">
<p>Another wonderful way to help with Eclipse Jetty is to help contribute to our corpus of documentation.
We have made an effort to reduce the barriers to contributing to our documentation, and many contributors find our documentation as a low-key way to participate and learn the process.</p>
</div>
<div class="sect2">
<h3 id="cg-documentation-format"><a class="anchor" href="#cg-documentation-format"></a><a class="link" href="#cg-documentation-format">Source Control and Maven Build.</a></h3>
<div class="paragraph">
<p>The Jetty documentation is a module within the overall Jetty project and is build as a part of the standard build process.
As such to checkout the documentation you can follow the <a href="#cg-community-source">same process</a> as checking out Jetty itself.</p>
</div>
<div class="paragraph">
<p>As a part of the main Jetty project the documentation is build through the <a href="#cg-contributing-build">same process</a> as Jetty.
However, it is a more independent module and can be worked with much simpler by building strictly the jetty-documentation module.</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="screen">$ git clone https://github.com/eclipse/jetty.project.git
$ cd jetty.project/jetty-documentation
$ mvn install</code></pre>
</div>
</div>
<div class="paragraph">
<p>While maven is running you may see a lot of files being downloaded.
If you are not familiar with Maven you are seeing Maven set up the execution environment for generating the documentation.</p>
</div>
<div class="paragraph">
<p>The build is finished once you see a message akin to:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="screen">[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 9.272 s
[INFO] Finished at: 2018-04-09T13:06:10-05:00
[INFO] Final Memory: 74M/247M
[INFO] ------------------------------------------------------------------------</code></pre>
</div>
</div>
<div class="paragraph">
<p>At this point you open your web browser and view the produced documentation (under the target/html directory)!</p>
</div>
<div class="admonitionblock tip">
<table>
<tr>
<td class="icon">
<i class="fa icon-tip" title="Tip"></i>
</td>
<td class="content">
<div class="paragraph">
<p>Pay close attention to the build output for lines like:</p>
</div>
<div class="literalblock">
<div class="content">
<pre>asciidoctor: WARNING: 9-jsp.adoc: line 0: id assigned to section already in use: ag-http2</pre>
</div>
</div>
<div class="paragraph">
<p>This indicates that an ID is being reused and should be resolved or else deep linking will work correctly.</p>
</div>
</td>
</tr>
</table>
</div>
</div>
<div class="sect2">
<h3 id="cg-documentation-render"><a class="anchor" href="#cg-documentation-render"></a><a class="link" href="#cg-documentation-render">The Render Chain Explained</a></h3>
<div class="paragraph">
<p>The Jetty documentation is all written in <a href="https://asciidoctor.org/docs/user-manual/">asciidoc</a>.
The maven build uses the asciidoctor-maven-plugin to process specific index.adoc[] files which act as the root structure for various guides (Administrative, Developer, QuickStart, etc).
The main pom.xml file also provides a maven profile which when activated can produce the guides in both pdf and epub formats.</p>
</div>
</div>
<div class="sect2">
<h3 id="cg-documentation-structure"><a class="anchor" href="#cg-documentation-structure"></a><a class="link" href="#cg-documentation-structure">Project Structure</a></h3>
<div class="paragraph">
<p>It may be useful to understand the layout of the documentation before digging into the details.
The following table lists some helpful directories and their purpose.</p>
</div>
<table class="tableblock frame-all grid-all stretch">
<caption class="title">Table 2. Documentation Layout</caption>
<colgroup>
<col style="width: 50%;">
<col style="width: 50%;">
</colgroup>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">src/main/asciidoc</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">root of asciidoc layout</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">src/main/asciidoc/*-guide</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">root structure for each individual guide</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">target/html</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">post build, where the rendered html files will appear</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">target/pdf</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">post build (-Palt-formats) pdf files</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">target/epub</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">post build (-Palt-formats) epub files</p></td>
</tr>
</tbody>
</table>
</div>
<div class="sect2">
<h3 id="cg-documentation-guide"><a class="anchor" href="#cg-documentation-guide"></a><a class="link" href="#cg-documentation-guide">Guide Structure</a></h3>
<div class="paragraph">
<p>Each guide starts with an <strong>index.adoc</strong> file which acts as the point of origin for the document structure.
It will declare useful metadata for the proper rendering of the overall guide and use the asciidoc <strong>include</strong> directive to pull in content for each chapter which are conveniently named by chapter number and name.</p>
</div>
</div>
<div class="sect2">
<h3 id="cg-documentation-conventions"><a class="anchor" href="#cg-documentation-conventions"></a><a class="link" href="#cg-documentation-conventions">Conventions</a></h3>
<div class="paragraph">
<p>Below is list of conventions that should be followed when developing documentation within this framework.
These are not set in stone but you are encouraged to follow them when possible.</p>
</div>
<div class="dlist">
<dl>
<dt class="hdlist1">ventilated prose</dt>
<dd>
<p>Each sentence should generally be on its own line with a hard return at the end of the line.
Asciidoc rendering does not treat this style as separate lines and will produce paragraphs correctly.
The primary benefit is that you can easily see changes between versions of files, and it makes it trivial to quickly look through a pull request.
Additional benefits are the ability to comment out a sentence mid paragraph or move sentences around within a paragraph.
Enabling Soft Line Wrap in your favorite editor can make this a bit easier to stomach.</p>
</dd>
<dt class="hdlist1">id&#8217;s</dt>
<dd>
<p>Critically important for being able to generate url&#8217;s that can be used in a persistent fashion.
Without sane id&#8217;s the chapters and sections will have generated id which are rooted in some obscure location based
voodoo.
A url using these 'e12c8673' type links will not be durable across generations of the documentation.
These id&#8217;s need to be used on chapters and sections two deep, and anywhere that you intend to cross link deeper.
The id values go into a global namespace so they must be unique across the entire document or the last example will win and any cross links will go there.
Links inside of a guides narrative structure should be prefixed with an acronym (contributor guide = cg-) while any links within the topics structure should be prefixed with t- and ideally the name of the topic it corresponds to.</p>
</dd>
<dt class="hdlist1">link vs xref</dt>
<dd>
<p>The <code>link:</code> item should be generally used for linking around the document when you want to choose the text that will be rendered in the link itself.
However if you are linking to a section and want to use the title itself as the link text, use the <code>xref:</code> tag without the hashmark in front of the link id.</p>
</dd>
<dt class="hdlist1">cross guide linkage</dt>
<dd>
<p>To link to another guide it is best to use a property to address it. The following guide shortcuts are provided.</p>
<div class="ulist">
<ul>
<li>
<p>DISTGUIDE</p>
</li>
<li>
<p>EMBEDGUIDE</p>
</li>
<li>
<p>QUICKGUIDE</p>
</li>
<li>
<p>CONTRIBUIDE</p>
</li>
</ul>
</div>
</dd>
</dl>
</div>
<div class="literalblock">
<div class="content">
<pre>This is a test to link to link:{DISTGUIDE}[Distribution Guide]
This is a test to deep link to link:{DISTGUIDE}#startup[Distribution Guide Deep Link]</pre>
</div>
</div>
<div class="paragraph">
<p>This is a test to link to <a href="{DISTGUIDE}">Distribution Guide</a></p>
</div>
<div class="paragraph">
<p>This is a test to deep link to <a href="{DISTGUIDE}#startup">Distribution Guide Deep Link</a></p>
</div>
<div class="dlist">
<dl>
<dt class="hdlist1">images</dt>
<dd>
<p>Images are placed in the <code>/images*</code> directory of the guide they should appear in and then referenced with a <code>image:</code> tag.</p>
</dd>
</dl>
</div>
<div class="literalblock">
<div class="content">
<pre>image:small_powered_by.gif[image,width=340]</pre>
</div>
</div>
<div class="paragraph">
<p><span class="image"><img src="small_powered_by.gif" alt="image" width="340"></span></p>
</div>
<div class="dlist">
<dl>
<dt class="hdlist1">version differences</dt>
<dd>
<p>In general differences in functionality within a release should go into nested sections and use titles like 'Prior to: <mark>' or 'In version: </mark>'.</p>
</dd>
<dt class="hdlist1">license blocks</dt>
<dd>
<p>Each adoc file should contain the license block that exists in the index.adoc file and a copy has been added to the bottom of this page as well for reference.</p>
</dd>
</dl>
</div>
<div class="literalblock">
<div class="content">
<pre>//
// ========================================================================
// Copyright (c) 1995-2021 Mort Bay Consulting Pty Ltd and others.
//
// This program and the accompanying materials are made available under the
// terms of the Eclipse Public License v. 2.0 which is available at
// https://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0
// which is available at https://www.apache.org/licenses/LICENSE-2.0.
//
// SPDX-License-Identifier: EPL-2.0 OR Apache-2.0
// ========================================================================
//</pre>
</div>
</div>
<div class="paragraph">
<p>Some admonition examples:</p>
</div>
<div class="quoteblock">
<blockquote>
<div class="admonitionblock note">
<table>
<tr>
<td class="icon">
<i class="fa icon-note" title="Note"></i>
</td>
<td class="content">
A note about the previous case to be aware of.
</td>
</tr>
</table>
</div>
</blockquote>
</div>
<div class="quoteblock">
<blockquote>
<div class="admonitionblock important">
<table>
<tr>
<td class="icon">
<i class="fa icon-important" title="Important"></i>
</td>
<td class="content">
Important notes are marked with an icon.
</td>
</tr>
</table>
</div>
</blockquote>
</div>
<div class="quoteblock">
<blockquote>
<div class="admonitionblock tip">
<table>
<tr>
<td class="icon">
<i class="fa icon-tip" title="Tip"></i>
</td>
<td class="content">
Tips that make your life easier.
</td>
</tr>
</table>
</div>
</blockquote>
</div>
<div class="quoteblock">
<blockquote>
<div class="admonitionblock caution">
<table>
<tr>
<td class="icon">
<i class="fa icon-caution" title="Caution"></i>
</td>
<td class="content">
Places where you have to be careful what you are doing.
</td>
</tr>
</table>
</div>
</blockquote>
</div>
<div class="quoteblock">
<blockquote>
<div class="admonitionblock warning">
<table>
<tr>
<td class="icon">
<i class="fa icon-warning" title="Warning"></i>
</td>
<td class="content">
Where extreme care has to be taken. Data corruption or other nasty
things may occur if these warnings are ignored.
</td>
</tr>
</table>
</div>
</blockquote>
</div>
<div class="sect3">
<h4 id="cg-oddities"><a class="anchor" href="#cg-oddities"></a><a class="link" href="#cg-oddities">Oddities</a></h4>
<div class="ulist">
<ul>
<li>
<p>If an included file ends with a list entry, it needs to have two empty lines at the end of the file in order for the section rendering to work correctly.</p>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="cg-security"><a class="anchor" href="#cg-security"></a><a class="link" href="#cg-security">Security</a></h2>
<div class="sectionbody">
<div class="sect2">
<h3 id="cg-security-reporting"><a class="anchor" href="#cg-security-reporting"></a><a class="link" href="#cg-security-reporting">Reporting Security Issues</a></h3>
<div class="paragraph">
<p>There are a number of avenues for reporting security issues to the Jetty project available.
If the issue is directly related to Jetty itself then reporting to the Jetty developers is encouraged.
The most direct method is to send e-mail to <em>security@webtide.com</em>.
Since Webtide is comprised of the active committers of the Jetty project this is our preferred reporting method.
We are generally flexible in how we work with reporters of security issues from an attribution perspective but we reserve the right to act in the interests of the Jetty project in all circumstances.</p>
</div>
<div class="paragraph">
<p>If the issue is related to Eclipse or its Jetty integration then we encourage you to reach out to <em>security@eclipse.org</em>.</p>
</div>
<div class="paragraph">
<p>If the issue is related to some third party integration with Jetty we are happy to work with you to identify the proper entity and worth with them to properly address any issue so either of the above outreaches is fine.</p>
</div>
<div class="paragraph">
<p>We prefer that security issues are reported directly to Jetty developers via email as opposed through GitHub Issues since there is currently no facility for <em>private</em> issues. There is an <a href="https://github.com/isaacs/github/issues/37">unofficial thread</a> for this support at github you are welcome to follow along on.</p>
</div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="cg-conclusion"><a class="anchor" href="#cg-conclusion"></a><a class="link" href="#cg-conclusion">Thank you!</a></h2>
<div class="sectionbody">
<div class="paragraph">
<p>Your interest in contributing to Eclipse Jetty is welcome and if there is anything you feel this guide is lacking please let us know.
Feel free to open an Issue as described in this document and perhaps even contribute your suggestion to <a href="https://github.com/eclipse/jetty.project/tree/jetty-10.0.x-doc-refactor/jetty-documentation/src/main/asciidoc/contribution-guide">this document</a> itself!</p>
</div>
<div id="cg-contributing-guides" class="paragraph">
<p>Our current guides are:</p>
</div>
<div class="ulist">
<ul>
<li>
<p>{GUIDEBASEURL}/quickstart/[Distribution Quickstart Guide]</p>
</li>
<li>
<p>{GUIDEBASEURL}/contribution/[Contribution Guide]</p>
</li>
</ul>
</div>
</div>
</div>
</div>
<div id="footer">
<div id="footer-text">
Version 10.0.6<br>
Last updated 2021-02-19 12:22:22 -0600
</div>
</div>
<link rel="stylesheet" href="./coderay-asciidoctor.css">
</body>
</html>