I have worked on a number of projects with this structure src/java/... src/c/... src/ddl/... src/scripts/...
for multi-language projects. Putting tests and src share the same parent has never been a problem, but then I've never worked on a Maven project. And I've worked on a lot of projects at a lot of companies. I'm an independent contractor and have moved to new organizations / projects about twice a year for the past 10 years. Projects have different structures just about everywhere. Sometimes the differences are slight and sometimes they are large. Trying to rigidly enforce a particular project structure may be why Maven has never been widely used. Ant's shortcomings aren't due to it's requiring you to specify how your project is laid out. That is quick and easy. Ant's problems are due to it being based on a markup language rather than a scripting or programming language. I haven't used groovy very much, but it just seems like the right foundation for a build tool. I haven't heard anything good about Maven, though, and I'm skeptical about adopting it's conventions in a build system that in large part was created to overcome the shortcomings of XML based systems like Ant and Maven. --- On Fri, 5/29/09, Russel Winder <[email protected]> wrote: From: Russel Winder <[email protected]> Subject: Re: [gradle-user] Is there an example for migrating a J2EE project from Ant to Gradle? To: [email protected] Date: Friday, May 29, 2009, 2:15 AM Dean, On Thu, 2009-05-28 at 10:15 -0700, Dean Schulze wrote: > > Most projects use something like this: > > Code goes in > > src/com/... > > Tests go in > > /src/test/func/... > src/test/unit/... > > It may be that in your experience most projects are structured like this, but in my experience a very different structure is the majority. We need to separate personal experience from objective statistics. The Gradle Java plugin gives you the opportunity to amend the default structure, so there is no problem in conditioning it EXCEPT . . . By having source in src and tests in src/tests you are going to give yourself real problems with any convention based system due to the tests being a sub-directory of the source. As Maven 1 proved you really meed to separate source and tests into two distinct hierarchies. As Maven 2 showed in order to support multi-language working you have to partition by language as well, hence the default of src/main/java src/test/java for the location of Java source and tests respectively. -- Russel. ============================================================================= Dr Russel Winder Partner xmpp: [email protected] Concertant LLP t: +44 20 7585 2200, +44 20 7193 9203 41 Buckmaster Road, f: +44 8700 516 084 voip: sip:[email protected] London SW11 1EN, UK m: +44 7770 465 077 skype: russel_winder
