simim schrieb: > Jan Torben Heuer-3 wrote: > >> Try to completely eliminate the "cyclic" reference by using an interface >> in >> A, so that you don't need to specifiy a dependency from B to A >> >> >> Jan >> >> > > thanks, but i think thats not a smooth solution in my case. at compilation > time there > is definitively not cycle, because B doesn`t need A in any way, at > compilation. > but maven abort the compilation with the message above. > > so, i see no problem at the design. i cannot understand why maven detects > there > an psoudo-cycle. maybe the relevant scope-option are not considered. > > maybe there is a possibility to set a "cycle-order" in maven? with that i > could set > reference A -> B before reference B -> A. maybe i can realize an order > with a common parent pom-file for A and B? perhaps that the wrong way? > > other ideas? thanks! >
No, there is no solution to this with maven except the one that Jan gave. Maven downloads all dependencies, even the runtime-scoped ones, during building. So B needs A before it can build, but A needs B before it can build. Note that there are maven plugins that run apps, eg the exec, jetty or cargo plugins. These will need the runtime-scoped jars available. And maven doesn't look ahead to determine whether the current pom configures plugins that will need runtime-scoped dependencies. It can't anyway, as something like the maven-antrun-plugin might need the runtime deps depending on what is inside some external file it cannot parse. Regards, Simon --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
