After some further investigation, CCValidator appears not to be able
to handle ENTITY declarations
that containing a path to a file, which itself contains further ENTITY
declarations:

I can't work out why this is now failing because I've had this
structure in place for nearly 3 years,
and CCValidator always handled this before...

This is my ccnet-config file:

<!DOCTYPE cruisecontrol [
    <!ENTITY servername     SYSTEM "file:servername.xml">
    <!ENTITY common         SYSTEM "file:common.xml">

    <!-- CCValidator complains if these two lines are present -  but
CruiseControl service itself handles this fine :(
       -->
    <!ENTITY % projectdefs  SYSTEM "file:machine/projectdefs.xml">
<!-- 1. Pick up machine-specific project definitions -->
 
%projectdefs;
<!-- 2. Declare them so projects.xml can refer to them -->

    <!ENTITY projects       SYSTEM "file:machine/
projects.xml">         <!-- 3. Pick up machine-specific projects
config -->
    <!ENTITY masterproj     SYSTEM "file:masterproj.xml">
]>

<cruisecontrol xmlns:pre="urn:ccnet.config.builder">

    <!-- Include the definition of BuildServerName from
servername.xml-->
    &servername;

    <!-- Include the common definitions defined in common.xml -->
    &common;

    <!-- Include machine-specific project config from projects.xml-->
    &projects;

    <!-- Include the master ccnetconfig project from masterproj.xml-->
    &masterproj;

</cruisecontrol>

And here's a sample of what machine/projectdefs.xml looks like, it
contains entity declarations for
each build project that a particular machine can produce:

<!ENTITY FooBarProject         SYSTEM "file:FooBarProject.proj.xml">

FooBarProject.proj.xml  contains a full <project> block for my build
project, but it is parameterized so that
all the code-branch-specific stuff is expected to be passed in, like
this:

eg:  <project name="FooBarProject $(BranchName)" >....etc

My machine-specific projects.xml file defines which code branches I
want FooBarProject to build for,
providing the branch-specific parameters required:

eg:
  <pre:scope BranchName="1.2.3"
         <!-- other params for this branch -->
        >
          &FooBarProject;
  </pre:scope>

  <pre:scope BranchName="1.2.4"
         <!-- other params for this branch -->
        >
          &FooBarProject;
  </pre:scope>

Reply via email to