Circular sub-project dependency (involving test-scope properties files)

When using Maven to build OG-Parent, it is dependent on OG-Integration and OG-Util, and OG-Integration is dependent upon OG-Util, so the build sequence is OG-Util before OG-Intergation etc. So far so good.

Unfortunately OG-Util has tests which require a “tests.properties” file that lives in OG-Integration. Because OG-Util is being built before OG-Integration, the config files of OG-Integration have not yet been copied to the OG-Integration/target/config folder.

Thus it is necessary to tell the test suite of OG-Util to source its “tests.properties” file from the directory “…/OG-Integration/config” which is a source (not a target) location for that project.

This can be solved by duplicating “tests.properties” in the OG-Util project (undesirable), or by creating a new sub-project within OG-Parent which has the sole purpose of storing config files upon which multiple sub-projects might depend. I feel the creation of the sub-project is the preferred option. Presuming that was called OG-Config, the directory path used by Maven to resolve the “tests.properties” would be “…/OG-Config/target/test-classes” (since test/config is copied there when the tests are built). This is a more consistent structure and avoids any “source” dependencies at test-time.

Hi Robin

Sorry that we haven’t responded to your post before now.

Our support for Maven is being steadily increased but at the moment it is unofficial and not ready for running the full suite of tests. The Ant/Ivy build system is currently the way to do this. Thanks for analysing the problem here - we will have to tackle this at some point.

Regards
Jon

So I have to install Ant? That’s so 2005…