Search code examples
javamaven-2junitproject-planning

Small java project growing (maven and junit)


I'm working on a growing java project and I'm probably going to cooperate with somebody else to improve some features.

I'd like to use some tools to improve the quality of my work keeping in mind that:

  • I don't have too much time to spend on this project
  • it's a small project but it's really important for me
  • I don't want to buy software/hardware for it
  • I'm already using SVN

what do you think about maven and junit? is it worth spending time for them? Do you know any other good tool?


Solution

  • Since you are not using JUnit my guess is you don't have any unit tests yet. This would seem to me the most important step for you to take, if other people will start working on your code. Without unit tests, someone can easily break functionality without knowing it.

    Create a suite of unit tests that cover at least 80% of the code. You can use Cobertura to measure code coverage. This might seem like a lot of work (it is) but will save you far more time in the future.

    Maven is the de-facto standard for building and deployment at the moment, but it has its drawbacks too. If you have a well documented build procedure in place (either using Ant or custom scripts) I would suggest it is less important to introduce Maven than to add unit tests.