You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nutch.apache.org by Apache Wiki <wi...@apache.org> on 2005/05/27 15:32:03 UTC

[Nutch Wiki] Update of "HowToContribute" by JeromeCharron

Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Nutch Wiki" for change notification.

The following page has been changed by JeromeCharron:
http://wiki.apache.org/nutch/HowToContribute

The comment on the change is:
First version.

New page:
''This page is a quick HOWTO explaining how to easily contribute patches to Nutch.''

=== Getting the source code ===

First of all, you need the Nutch source code.[[BR]]
Create a directory in which you want to store the Nutch source code on your local drive,

{{{
> cd somewhereOnYourDisk
> mkdir nutch
> cd nutch
}}}

then get the source code on your local drive using [http://incubator.apache.org/nutch/version_control.html SVN].

{{{
svn checkout http://svn.apache.org/repos/asf/incubator/nutch/
}}}


=== Working time ===

Now it is time to work.[[BR]]
Feel free to modify the source code and add some (very) nice features using your favorite IDE.[[BR]]

But take care about the following points
 * All public classes and methods should have informative javadoc.
 * Unit tests are encouraged ([http://www.junit.org]).

=== Building a patch ===

First of all, please perform some minimal non-regression tests by:
 * rebuilding the whole Nutch code
 * executing the whole unit tests.

==== Building Nutch ====

{{{
> cd somewhereOnYourDisk/nutch
> ant
}}}
After a while, if you see
{{{
BUILD SUCCESSFUL
}}}
all is ok, but if you see
{{{
BUILD FAILED
}}}
please, read carefully the errors messages and check your code.

==== Unit Tests ====

{{{
> cd somewhereOnYourDisk/nutch
> ant test
}}}
After a while, if you see
{{{
BUILD SUCCESSFUL
}}}
all is ok, but if you see
{{{
BUILD FAILED
}}}
please, read carefully the errors messages and check your code.

==== Fonctional Tests ====

If you are ''perfectionist'' you can also perform some functional tests by running Nutch.
Please refer to the Nutch [http://incubator.apache.org/nutch/tutorial.html tutorial]

==== Creating a patch ====

In order to create a patch, just type:

{{{
svn diff > myBeautifulPatch.patch
vi myBeautifulPatch.patch
}}}

This will report all modifications done on Nutch sources on your local disk and save them into the ''myBeautifulPath.patch'' file.
Then edit the patch file in order to check that it includes ONLY the modifications you want to add to the Nutch SVN repository.


=== Proposing your work ===

Finally, patches can either be attached to a message sent to [http://incubator.apache.org/nutch/mailing_lists.html nutch-dev] mailing list or
to a bug report in [http://nagoya.apache.org/jira/browse/Nutch Jira] (''my prefered way in order to easily keep trace of contributions. But it is a very personal point of view'').