Jorg Heymans wrote:

Hi,

How do people feel about moving sample content and source from a block
out of the block directory into its own location ?
Carsten already did that for the portal, although not with either of the directory structures you list below. Ultimately this needs to be done so that blocks can be downloaded as binaries without the samples.

eg something like

/src
  /blocks
         /cforms
              pom.xml
  /blocks-samples
         /cforms
              pom.xml

In maven speak, the cforms-samples block would just inherit from the
cforms block so the build and deployment link between the two blocks is
not lost.

Alternatively we could do
/src
  /blocks
         /cforms
             pom.xml
             /samples
                 /src
                    /java
                 pom.xml
I don't like this structure much.  I prefer

/src
   /blocks
             /cforms
                  /api
                       pom.xml
                  /impl
                       pom/xml
                  /samples
                       pom.xml
                  /test
                       pom.xml


Some blocks might only have an api or an impl and that is ok. Having a separate test module has several advantages; it is easy to find the tests, it is easy to run them (or not if you don't want to), it is easy to separate them out, and it encourages folks to actually create tests since it is very obvious when you don't have any

One thing that we have found as a benefit with maven 1 is to have a "master" build.properties file that contains all the versions of the dependencies - the project.xml files only specify the artifact and not the verison. This makes sure that all the subprojects are all using the same versions. That could become a significant problem with all the blocks Cocoon has if the core project doesn't control the versions.

Ralph

Reply via email to