Tips for developers

Dependencies

Building Lucene requires that you have Apache Ant installed. Starting with 3.6, Apache Ivy is also required for fetching dependency jars to compile against.

Once you have ant working, you can use the "ant ivy-bootstrap" build target to have ivy automatically downloaded and installed for you in your ${user.home}/.ant/lib directory

Tips to configure IDEs

The lucene-dev user's list and slack solr-dev channel are good places to get further help.

Contribution guidelines

Before you start, send a message to the developer mailing list (Note: you have to subscribe before you can post), or file a bug report in Jira. Describe your proposed changes and check that they fit in with what others are doing and have planned for the project. Be patient, it may take folks a while to understand your requirements.

Modify the source code and add some (very) nice features using your favorite IDE.

But take care about the following points:

Please do not:

Please do:

Please use the LUCENE-NNNN.patch naming pattern when creating patches for uploading to JIRA. Once you create a new JIRA issue, note its name and use that name when naming your patch file. For example, if you are creating a patch for a JIRA issue named LUCENE-3456, then name your patch filename LUCENE-3456.patch. If you are creating a new version of an existing patch, use the existing patch's file name. JIRA will automatically "gray out" the old patch and clearly mark your newly uploaded patch as the latest.

Problems with Ivy?

Some people have reported problems getting Ivy to work when installed in ${user.home}/.ant/lib

The majority of these issues seem to be people using installations of ant packaged by linux disto providers that either do not provide a full ant install (ie: additional RPMs are required) or explicitly disable the ability to use "user lib" feature of ant in their configs, or have some other problems.

Suggested fixes for people who still have problems getting Ivy to work after running "ant ivy-bootstrap"...

For more details:

Pre-commit check

Committers run this check before they commit something. But you can help them out by running it yourself first and fixing anything it catches.

Before constructing your patch, please run the top-level pre-commit check, which finds problems like tabs and @author tags in source files, broken links in javadocs, files not controlled by Subversion (a.k.a. "unversioned files"), etc.

To run the pre-commit checks from ant, run the following from the top-level directory – the directory containing lucene/ and solr/ – in your working copy:

ant precommit

Other Helpful Resources

The following resources may prove helpful when developing Lucene contributions. (These are not an endorsement of any specific development tools)