Dear Maven 2 users, I encountered an annoying issue using Maven 2 in my project.
This project is (simplified view of it) composed of 4 modules. ModuleA depends on nothing and propose services interfaces (no implementation). ModuleA has a src directory. ModuleA has a test directory, that contains 'compatibility test kit' (abstract tests), that verify that ANY implementation of an interface (from ANY vendor) respect the interface contracts. Think to it as for example JDO TCK or JMS TCK... ModuleB depends on ModuleA (and ModuleA services). It contains both src and test directories. Tests here are concrete. Most of tests ( > thousands) can not be ran since they rely on the selection of services implementation selection (that is not yet avalaible). Think of ModuleB as a 'biznes layer'... ModuleCxx and ModuleCyyy are ModuleA interfaces implementations. All ModuleCxxx depend on ModuleB (not only ModuleA). They contain both src and test directories. Tests here are concrete. They contain concrete implementations of ModuleA abstract TCK tests. Using MAVEN I succeded in compiling this project; there are no cyclic dependancies (just top/down dependancies). When I want to run tests, I encounter the following issue: Sure-fire execute tests in all module => ModuleB tests are ran. But they are ran with the classpath of ModuleB. So without any service implementations. ModuleA implementation found in ModuleCxxx are not yet compiled.... Solution identified: 1°) the best one (the harder of course), is to break the dependancy from ModuleC1 and ModuleC2 toward ModuleB and only keep dependancy toward ModuleA. And Make ModuleB depends on either ModuleC1 or ModuleC2 (using profiles). It's a selection of implementation in project level. => it makes difficulties to have both environnemnt in the same IDEs (Eclipse or Idea)... 2°) inhibit all tests in ModuleA and ModuleB. And run all tests (from the three modules) at ModuleCxxx layer. HOW can I aggregate tests source directories from all modules (A, B and C) to run in sure-fire (in one pass)? 3°) Make all ModuleA and ModuleB abstract, and implement them in ModuleCxxx => Multiplication of tests classes (> thousands)... Is there a way to inject dependancies at runtime only in tests? I tried to make a 'reverse' dependancy from A to Cxxx at RUNTIME scope only. But the reactor cyclic dependancy verification failed. Many Thanks for any help. Guillaume. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
