GeoTools : 5 I saw lots of error messages whilst building. What went wrong

Note: if this was your FIRST attempt at building GeoTools, take a look at the FAQ specifically on that issue (or, just try building a second time).

Even a normal build which works properly produces a lot of output and even a lot of ERROR and WARNING messages. Not all of these are a sign that something has gone wrong so, before you go digging into the error messages, take a look at the build report which is displayed at the end. (It is also saved to a file called buildReport.txt for reference).
If your build didn't finish with a build report, then something is probably wrong with your setup. Make sure that you have tried to build more than once and that you have the right versions of Java and Maven installed - see the Developers Guide for details.

Assuming you have a build report with entries that look something like this:

GeoTools2 module build report 20041108
gt2:main  cleaned, compiled, tested, INSTALLED 2007
gt2:arcsde  cleaned, compiled, tested, INSTALLED 2007
gt2:geomedia  cleaned, compiled, tested, INSTALLED 2007
gt2:gtopo30  cleaned, compiled, tested, INSTALLED 2008
gt2:mysql  cleaned, compiled, tested, INSTALLED 2008
gt2:shapefile  cleaned, compiled, tested, INSTALLED 2008

...

If every module line ends with the word INSTALLED, then don't worry about any error messages you noticed. As long as every module installed, nothing went wrong.
However, if some of the lines do not end in INSTALLED, then something has gone wrong. The most important thing to do at this stage is to take a note of which module failed first. Start from the top of the list and work down.

The number of entries on each line tells you how far the build got and can give you some idea of what the probelem was. Look for the example below which matches what you saw (ignore the module name 'foo').

gt2:foo

If that is all that you see, then Maven was not able to clean an old build out of the way. Make sure you don't have any files open from that module's 'target' directory.
gt2:foo cleaned

If you see that then the old build was cleaned out of the way but it was not able to compile that module.
To get compile report just for that module, change to its directory (e.g. geotools-src/foo) and then type:
maven java:compile
Read the requirements part of the developers' guide and make sure that you have the right version of java and any required extensions. This is especially true if the compile errors relate to missing java or javax packages (e.g. JAI). If this isn't the problem, then make a note of the errors and submit a support request or post a message to the devel list.

gt2:foo cleaned, compiled

If you see that message then the module compiled but did not pass some tests. Each module comes with a set of unit tests which are run after every compile to make sure that they always do what they are supposed to. If a unit test fails, then maven will not install that module.

Unit tests fail for a number of reasons. Often it is because you are running on an OS or JRE that we have not tested on before (e.g. MacOS recently caused some problems) or because of some other unusual characteristic of your machine (e.g. no graphics environment or card).
However, sometimes unit tests fail because a developer has committed code without testing it, or because a change in one module has caused another to break.

To find out exactly what went wrong, you will need to look at the test report files for the module which failed. You can find these in geotools-src/<modulename>/target/test-reports
Look at the txt files in that directory until you find one with an error message. This should tell you why the test failed.
Failed unit tests are something we need to know about. We actually have a machine that automatically builds the code after each change and lets us know about test failures that it finds. However, as many failures are platform specific, it is worth dropping us a line with the text of the test failure and detailed information about your computer (especially OS and what version of Java you are using).

gt2:foo cleaned, compiled, tested

If a module got that far and didn't install then something very strange has gone wrong. Your best bet would be to drop us a line on the devel list .