On Tue, Sep 23, 2008 at 3:01 PM, Geoffrey Wiseman < [EMAIL PROTECTED]> wrote:
> When we run 'mvn clean install' in a particular project, all is well, > compilation and all. When we run 'mvn clean install site' on that same > project, we get a compilation error, seemingly due to one of the > dependencies not being included. This is true on two different > environments, and with both mvn 2.0.9 and mvn 2.1.0-M1 (although possibly > not with mvn 2.0.8, although that may simply be due to the plugin versions > changing, for all I know). > I'm still diagnosing, but in the meantime, if anyone has any thoughts on > what might be happening, I'm happy to hear 'em. > Seems to be some weird interaction between the classpath and the site plugin in a multimodule. Basically, I've got a structure somewhat like this within some part of my project structure: model <- persistence <- service Model contains some domain model classes, but the tests contain a few builders for model classes that help make tests easier to write. Accordingly, the persistence module depends both on the model (main artifact, compile scope) and the model tests (test classifier, test scope). The service code relies on some of those model classes. When you run "mvn clean install" on the whole thing, it's fine. When you run "mvn clean install site" on the whole thing, the service module doesn't include the model main artifact (project or JAR) on the compile classpath, and fails. If you run "mvn clean install site" on the service module alone, it's fine. If I get a chance, I'll put together an example project. In the meantime, I'll probably just put the builders in the main source tree for now - seems to make the problem go away. - Geoffrey -- Geoffrey Wiseman
