Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Getting the source code

Lucene's code is versioned with Subversion and available at http://svn.apache.org/repos/asf/lucene/dev/trunk/. To download the source code, just open a terminal and type

...

Code Block
svn checkout http://svn.eu.apache.org/repos/asf/lucene/dev/trunk/ lucene-trunk

Compiling the source code

Building Lucene requires that you have Apache Ant and Apache Ivy installed. If you have only installed Ant, you can install Ivy by running

...

You can then run tests by running ant test or compile and create jars by running ant jar. Run ant -p to see the available targets.

Problems with Ivy

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

...

  • try using the "--noconfig" option when running ant
  • try adding "rpm_mode=false" to your ~/.ant/ant.conf
  • try removing "rpm_mode=true" from your /etc/ant.conf
  • try installing a clean version of Apache Ant downloaded directly from the Apache mirrors

For more details:

Configuring IDEs

Making changes

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.

...

  • Code compatibility:
    • All code to be included in 3.X releases should be compatible with Java 5.
    • All code to be included in trunk, from which 4.0 will be released, should be compatible with Java 6.
  • All public classes and methods should have informative Javadoc comments.
  • Code should be formatted according to Sun's conventions with one exception:
    • Indent two spaces per level, not four.
  • Contributions should pass existing unit tests.
  • New unit tests should be provided to demonstrate bugs and fixes (http://www.junit.orgImage Removed).
  • The java source code is in the directory lucene/${module}/src/java and the java test code is in the directory lucene/${module}/src/test.

Unit tests

Please make sure that all unit tests succeed before constructing your patch.

...

Since running all test cases can take some time, after any change try running a previously failing single test case first.

Precommit check

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:

Code Block
ant precommit

Creating a patch

Check to see what files you have modified with:

...

  • Try to adhere to the coding style of files you edit;
  • Comment code whose function or rationale is not obvious;
  • Update documentation (e.g., package.html files, this wiki, etc.)

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?

...