ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kyle Adams" <kad...@gfs.com>
Subject Directory structure best practices
Date Wed, 24 Sep 2003 20:47:03 GMT
This subject has been covered in previous threads, most notably:

http://marc.theaimsgroup.com/?l=ant-user&m=104492657316475&w=2

I would like to discuss the various approaches highlighted in this 
e-mail.  For convenience, I'll be copying examples from the initial e-mail 
in the  thread above, though I would recommend reading through it.  
As I see it, the four approaches (letters a-d) are essentially variations on 
two different build philosophies.

The first philosophy (largly exemplified in a and b) states that within 
a sufficiently large project, each subproject has it's own build 
directories (source, test, build, etc.).  This is also the approach 
Maven takes, attempting to limit projects to one artifact (ie, JAR, WAR, 
EAR, etc.) per project (see 
http://wiki.codehaus.org/maven/WhyYouCantCreateMultipleArtifactsInOneProject)

Example:
-Projects/
  -HumanResourcesProject/
     build.xml
    +bin/
    +build/
    +src/
     (etc)
  -Payroll/
     build.xml
    +bin/
    +build/
    +src/
     (etc)
  -PensionsAdmin/
     build.xml
    +bin/
    +build/
    +src/
     (etc)
   (etc)

The second build philosophy is most apparent in letter d.  This approach 
specifies that the parent has the combined set of build directories and 
subprojects are only separated out in the java packaging structure.

Example:

-Projects/
  -HumanResourcesProject/
     build.xml
    +bin/
    +build/
    -src/
      -java/
        -com/
          -domain/
            -hrproject/
              +payroll/
              +pensionsadmin/
              +hrutilities/
               (etc)
      +webapp/
      +conf/
     (etc)

So my question - in the Ant user community's experience, which approach 
works better for very large, complex projects?  Maven favors the "each 
subproject is pretty much independent", but it seems like that's a 
violation of Martin Fowler's "Single Source Point" 
(http://www.martinfowler.com/articles/continuousIntegration.html#N4000B9) 
principle.  On the other hand, if you want to be able to do independent 
release management (ie, version tagging, branching, etc.) of the various 
subprojects, it would almost seem to be a necessity to keep them 
separate.

Perhaps some of this discussion could also supplement/take place on 
ElementsOfAntStyle 
(http://nagoya.apache.org/wiki/apachewiki.cgi?TheElementsOfAntStyle)?

Thanks,
Kyle

_____

Kyle Adams | Java Developer  |  Gordon Food Service  |  616-717-6162


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message