blob: 13585f74e1baaa9232a90d941c3f644f2dd0266b [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- Generated by Apache Maven Doxia at Apr 19, 2012 -->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>
Contributors How To</title>
<style type="text/css" media="all">
@import url("./css/james.css");
@import url("./css/maven-base.css");
@import url("./css/maven-theme.css");
@import url("./css/site.css");
@import url("./js/jquery/css/custom-theme/jquery-ui-1.8.5.custom.css");
@import url("./js/jquery/css/print.css");
@import url("./js/fancybox/jquery.fancybox-1.3.4.css");
</style>
<script type="text/javascript" src="./js/jquery/js/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="./js/jquery/js/jquery-ui-1.8.5.custom.min.js"></script>
<script type="text/javascript" src="./js/fancybox/jquery.fancybox-1.3.4.js"></script>
<link rel="stylesheet" href="./css/print.css" type="text/css" media="print" />
<meta name="author" content="James Project Web Team" />
<meta name="Date-Revision-yyyymmdd" content="20120419" />
<meta http-equiv="Content-Language" content="en" />
<link title="DOAP" rel="meta" type="application/rdf+xml" href="http://james.apache.org//doap_james-project.rdf"/>
<!-- Google Analytics -->
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-1384591-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script').item(0); s.parentNode.insertBefore(ga, s);
})();
</script>
</head>
<body class="composite">
<div id="banner">
<a href="index.html" id="bannerLeft" title="james-project-logo.gif">
<img src="images/logos/james-project-logo.gif" alt="James Project" />
</a>
<a href="http://www.apache.org/index.html" id="bannerRight">
<img src="images/logos/asf-logo-reduced.gif" alt="The Apache Software Foundation" />
</a>
<div class="clear">
<hr/>
</div>
</div>
<div id="breadcrumbs">
<div class="xleft">
<span id="publishDate">Last Published: 2012-04-19</span>
</div>
<div class="xright"> <a href="index.html" title="Home">Home</a>
|
<a href="server/index.html" title="Server">Server</a>
|
<a href="hupa/index.html" title="Hupa">Hupa</a>
|
<a href="protocols/index.html" title="Protocols">Protocols</a>
|
<a href="mailet/index.html" title="Mailets">Mailets</a>
|
<a href="mailbox/index.html" title="Mailbox">Mailbox</a>
|
<a href="mime4j/index.html" title="Mime4J">Mime4J</a>
|
<a href="jsieve/index.html" title="jSieve">jSieve</a>
|
<a href="jspf/index.html" title="jSPF">jSPF</a>
|
<a href="jdkim/index.html" title="jDKIM">jDKIM</a>
|
<a href="mpt/index.html" title="MPT">MPT</a>
|
<a href="postage/index.html" title="Postage">Postage</a>
</div>
<div class="clear">
<hr/>
</div>
</div>
<div id="leftColumn">
<div id="navcolumn">
<h5>About James</h5>
<ul>
<li class="none">
<a href="index.html" title="Overview">Overview</a>
</li>
<li class="none">
<a href="newsarchive.html" title="News">News</a>
</li>
<li class="none">
<a href="mail.html" title="Mailing Lists">Mailing Lists</a>
</li>
<li class="none">
<strong>Contributing</strong>
</li>
<li class="none">
<a href="guidelines.html" title="Guidelines">Guidelines</a>
</li>
<li class="none">
<a href="http://wiki.apache.org/james" title="Wiki">Wiki</a>
</li>
<li class="none">
<a href="team-list.html" title="Who We Are">Who We Are</a>
</li>
<li class="none">
<a href="license.html" title="License">License</a>
</li>
</ul>
<h5>Download</h5>
<ul>
<li class="none">
<a href="download.cgi" title="Releases">Releases</a>
</li>
<li class="none">
<a href="https://repository.apache.org/content/repositories/snapshots/org/apache/james/" title=""></a>
</li>
</ul>
<h5>Apache Software Foundation</h5>
<ul>
<li>
<strong>
<a title="ASF" href="http://www.apache.org/">ASF</a>
</strong>
</li>
<li>
<a title="Get Involved" href="http://www.apache.org/foundation/getinvolved.html">Get Involved</a>
</li>
<li>
<a title="FAQ" href="http://www.apache.org/foundation/faq.html">FAQ</a>
</li>
<li>
<a title="License" href="http://www.apache.org/licenses/" >License</a>
</li>
<li>
<a title="Sponsorship" href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</a>
</li>
<li>
<a title="Thanks" href="http://www.apache.org/foundation/thanks.html">Thanks</a>
</li>
<li>
<a title="Security" href="http://www.apache.org/security/">Security</a>
</li>
</ul>
<a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy">
<img class="poweredBy" alt="Built by Maven" src="./images/logos/maven-feather.png" />
</a>
</div>
</div>
<div id="bodyColumn">
<div id="contentBox">
<!-- Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License. -->
<div class="section"><h2>Introduction<a name="Introduction"></a></h2>
<p>
<b>Anyone can contribute</b>
<br />
That's right, we always want to hear from people with
contributions to the code,
the documentation, the website, and bug reports.
<br />
The rest of this document outlines the way to go about these to
maximum effect.
<br />
</p>
<p>
If you are new to this you may be interested in some of these
resources.
<br />
<a class="externalLink" href="http://jakarta.apache.org/site/guidelines.html">A good, full, summary of links to guidelines</a>
<br />
Subscribe to the relevant mailing lists (link on the left).
<br />
<a class="externalLink" href="http://jakarta.apache.org/site/contributing.html">Craig R. McClanahan's advice how to get involved</a>
<br />
</p>
</div>
<div class="section"><h2>Code Patches<a name="Code_Patches"></a></h2>
<p>
Patches should be submitted to the developers mailing list.
<br />
<b>Always</b>
use diff -u to generate patches, so we can apply them using
'patch'.
<br />
<!-- // Update this for SVN
Make sure you are patching the latest cvs (the HEAD).
(You might
want to try 'cvs diff -u -w -b -rHEAD' against the checked out
module where
you have implemented the patch.
<br /> -->
<br />
Make sure the patch only contains what is intended, your
checkout could be outdated.
<br />
Make your patch from the jakarta-james directory and make sure
it conforms
to the code standards, otherwise it may be ignored. It is OK to make a
single patch covering several
files, but please only one issue at a time.
<br />
Prefix the mail subject with [PATCH]
<br />
Briefly outline the reason for your patch,
the solution your patch implements, why a patch is
needed and why your code will solve the problem. Note any bug numbers your
patch addresses.
<br />
Submit the patch as an attachment to the mail, this
mail should
preferably be in either BASE64 or QuotedPrintable format, to
prevent line wrapping.
<br />
</p>
<p>
The reason for these rules is so that commiters can easily see
what you are trying to achieve,
it is their resonsibility to manage the code and review submissions,
if you make it easy for them to see what you are doing your
patch is more likely to
be commited quickly (or at all).
<br />
</p>
</div>
<div class="section"><h2>Adding New Code<a name="Adding_New_Code"></a></h2>
<p>
Like the principles for patch submission, mark your mail [PATCH]
and ensure
your submission conforms to the code standards. Provide a Brief outline
of
your intentions, as above, so that your code can be reviewed easily, and
a
note of any relevant bug numbers.
<br />
New files must contain a reference to the Apache licence, copy
the header from an existing file.
<br />
It also helps if you send your files in an archive (tar, zip)
which preserves directories, make it from the jakarta-james
directory so we can un-tar your files into the right place.
</p>
</div>
<div class="section"><h2>Reporting and Fixing Bugs<a name="Reporting_and_Fixing_Bugs"></a></h2>
<p>
Many improvements come as a direct result of bug
reports, and contributed fixes, often by the same person. It is sometimes
said that Apache
projects evolve because users become so fed-up waiting for bugs to be
addressed that they
fix them themselves. :)
<br />
If you report a bug,
<a class="externalLink" href="http://issues.apache.org/jira">here</a>
we'd appreciate it if you could send a mail to the users or
developers
mailing lists, so that we can discuss it with you, bugzilla isn't a great
way for mediating
communication.
<br />
If you want to fix a bug, please contribute your changes
according to the guidelines above,
in the Code Patches section. It is much simpler to deal with
submissions if they all come
through the same channel. If you still really want to attach patches to bug
submissions, please do send us a mail tagged [PATCH] too, so
that we notice your patch.
</p>
</div>
<div class="section"><h2>Documentation<a name="Documentation"></a></h2>
<p>
While we are glad to accept contributions to documentation
from anyone, in almost any format, because its much better than none,
please consider these
guidelines to help us to assimilate your contribution.
</p>
<p>
To edit an existing document try to edit the xml version in src/site/xdocs
(check it out from SVN)
and if you can, submit a patch as for Code Patches.
</p>
<p>
If you want to contribute new files please try to use the simple xml
format we use.
</p>
<p>
If this means nothing to you please try to contribute HTML or plain
text documents without
any styling, so that we can get at the words and easily convert them
into our XML format.
</p>
<p>
If all this seems like unnecessary nonsense, send us whatever you
like, we'd still be
happy to receive good documentation.
</p>
<p>
Each of the Apache James projects has its own documentation
maintained
with the automated build. Once a build is done, the documentation can be
further committed in the
<a class="externalLink" href="https://svn.apache.org/repos/asf/james/site/trunk">
site module
</a>
which will be automatically published via svnpubsub
to
<a class="externalLink" href="http://james.apache.org">Apache James web site</a>
.
</p>
<p>
Further to this documentation, the
<a class="externalLink" href="http://wiki.apache.org/james/">
Apache James wiki
</a>
is available to any and is useful to share any
useful documentation.
.
</p>
</div>
<div class="section"><h2>Coding Standards<a name="Coding_Standards"></a></h2>
<p>
Submissions to the James project must follow the coding
conventions
outlined in this document. James developers
are asked to follow coding conventions already present in the code.
(For example, if the existing code has the bracket on
the same line as the if statement, then all subsequent code
should also follow that convention.) Anything not
explicitly mentioned in this document should adhere to the
official
<a class="externalLink" href="http://java.sun.com/docs/codeconv/html/CodeConvTOC.doc.html">Sun
Java Coding Conventions
</a>
.
</p>
<p>
<b>Developers who commit code that does not follow
the coding conventions outlined in this document will be
responsible for fixing their own code.
</b>
</p>
<p>
1. Spaces between parentheses are optional. The preference is
to exclude
extra spaces. Both of these conventions are
acceptable:
</p>
<p>
</p><div class="source"><pre>
if (foo)
or
if ( foo )
</pre></div>
<p>
2. Four spaces.
<b>NO tabs</b>
. Period. The James
mailing list receives commit messages that
are almost impossible
to read if tabs are used.
</p>
<p>
In Emacs-speak, this translates to the following command:
(setq-default tab-width 4 indent-tabs-mode nil)
</p>
<p>
3. Use Unix linefeeds for all .java source code files. Only
platform-specific
files (e.g. .bat files for Windows) should
contain non-Unix linefeeds.
</p>
<p>
4. Javadoc
<b>must</b>
exist on all methods. Contributing
a missing javadoc for any
method, class, variable, etc., will be GREATLY
appreciated as
this will help to improve the James project.
</p>
<p>
5. The standard Apache boilerplace
<b>MUST</b>
be placed
at the top of every file.
</p>
<p>
6.
<b>pom.xml</b>
files shall follow the same ordering as seen in the reference
of
the
<a class="externalLink" href="http://maven.apache.org/ref/3.0.3/maven-model/maven.html">Maven Model</a>
,
split multiple attributes each on a new line.
</p>
<p>
<b>Eclipse IDE</b>
<br />
Eclipse users can import those two files to enfore the code
formating :
<a href="downloads/formatting.xml">formatting.xml</a>
and
<a href="downloads/codetemplates.xml">codetemplates.xml</a>
.
</p>
</div>
</div>
</div>
<div class="clear">
<hr/>
</div>
<div id="footer">
<div class="xright">Copyright &#169; 2006-2012
<a href="http://www.apache.org/">The Apache Software Foundation</a>.
All Rights Reserved.
</div>
<div class="clear">
<hr/>
</div>
</div>
</body>
</html>