Differences between revisions 43 and 44
Revision 43 as of 2013-04-03 16:06:23
Size: 3815
Editor: RobertMuir
Comment: factor this out to developertips
Revision 44 as of 2013-04-03 16:20:12
Size: 3131
Editor: RobertMuir
Comment: try to be less verbose/overwhelming with wording and formatting
Deletions are marked like this. Additions are marked like this.
Line 10: Line 10:
Get the source code on your local drive using [[http://svn.apache.org/viewvc/lucene/dev/|SVN]].  Most development is done on the "trunk":

{{{
svn checkout http://svn.apache.org/repos/asf/lucene/dev/trunk/ lucene-trunk
}}}

=== Generating a patch ===
A "patch file" is the format that all good contributions come in. It bundles up everything that is being added, removed, or changed in your contribution.
Get the source code using [[http://svn.apache.org/viewvc/lucene/dev/|SVN]]: {{{svn checkout http://svn.apache.org/repos/asf/lucene/dev/trunk/ lucene-trunk}}}
Line 20: Line 13:
Please make sure that all unit tests succeed before constructing your patch. Please make sure that all unit tests succeed before constructing your patch: {{{ant clean test}}}
Line 22: Line 15:
To run your test case from ant use the following from the {{{lucene/}}} directory in your working copy:

{{{
ant -Dtestcase=NameOfYourUnitTest test
}}}
To run a single test case from the {{{lucene/}}} directory in your working copy: {{{ant -Dtestcase=NameOfYourUnitTest test}}}
Line 30: Line 19:
Once your test case passes, please make sure that all unit tests succeed before constructing your patch, by running this from your working copy:

{{{
ant clean test
}}}

Since running all test cases can take some time, after any change try running a previously failing single test case first.
Line 39: Line 20:
Check to see what files you have modified with:

{{{
svn stat
}}}

Add any new files with:

{{{
svn add src/.../MyNewClass.java
}}}

Edit the ''CHANGES.txt'' file, adding a description of your change, including the bug number it fixes.

In order to create a patch, just type:

{{{
svn diff > LUCENE-NNNN.patch
}}}
 1. Check to see what files you have modified with: {{{svn stat}}}
 1. Add any new files with: {{{svn add src/.../MyNewClass.java}}}
 1. In order to create a patch, just type: {{{svn diff > LUCENE-NNNN.patch}}}

How to Contribute to Lucene

Working With Code

Getting the source code

First of all, you need the Lucene source code.

Get the source code using SVN: svn checkout http://svn.apache.org/repos/asf/lucene/dev/trunk/ lucene-trunk

Unit Tests

Please make sure that all unit tests succeed before constructing your patch: ant clean test

To run a single test case from the lucene/ directory in your working copy: ant -Dtestcase=NameOfYourUnitTest test

In case your contribution fixes a bug, try and make your test case fail to show the presence of the bug. A test case showing the presence of a bug is also a good contribution by itself.

Creating a patch

  1. Check to see what files you have modified with: svn stat

  2. Add any new files with: svn add src/.../MyNewClass.java

  3. In order to create a patch, just type: svn diff > LUCENE-NNNN.patch

This will report all modifications done on Lucene sources on your local disk and save them into the LUCENE-NNNN.patch file. Read the patch file. Make sure it includes ONLY the modifications required to fix a single issue.

Contributing your work

Finally, patches should be attached to a bug report in Jira.

Please be patient. Committers are busy people too. If no one responds to your patch after a few days, please make friendly reminders. Please incorporate others' suggestions into into your patch if you think they're reasonable. Finally, remember that even a patch that is not committed is useful to the community.

Stay involved

Contributors should join the Lucene mailing lists. In particular, the commit list (to see changes as they are made), the dev list (to join discussions of changes) and the user list (to help others).

Please keep discussions about Lucene on list so that everyone benefits. Emailing individual committers with questions about specific Lucene issues is discouraged. See http://people.apache.org/~hossman/#private_q.

Getting your feet wet: where to begin?

New to Lucene? Want to find JIRA issues that you can work on without taking on the whole world?

The Lucene/Solr developers use the "newdev" label to mark issues that developers new to Lucene might be interested in working on. The rough criteria used to make this selection are:

  • Nobody has done any work on the issue yet.
  • The issue is likely not controversial.
  • The issue is likely self-contained with limited scope.

To see a list of open Lucene and Solr issues with the newdev label, look at this link http://s.apache.org/newdevlucenesolr

Note: Fixing these issues may require asking questions on the developer list to figure out what they mean - there is no guarantee that any of these will be either quick or easy.

Developer tips

For more contribution guidelines and tips, see DeveloperTips

HowToContribute (last edited 2013-04-03 16:20:12 by RobertMuir)