maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Manfred Moser" <>
Subject Re: Maven cyclic dependency when compling tests only - how to resolve easily?
Date Sat, 09 Jun 2012 05:16:28 GMT
Pull the test code out into a separate module that makes everything
available you need in there.. and run the test there.


On Fri, June 8, 2012 9:32 pm, Ken E wrote:
> I am working on modernizing an older project to be used with Maven. The
> project is very large and has around 30 modules in it.
> As far as the main source code is concerned, I managed to get all of it to
> compile and establish the dependencies correctly. It actually works and it
> can be run through Maven's tomcat plugin.
> The problem is with compiling the tests.
> Unfortunately, this company did not apply the same dependency restrictions
> for their test code as they did with their main source code.
> For example, C depends on B, and B depends on A in the main source code.
> However, A depends on C to run its tests. Obviously, Maven is going to
> complain and say there is a cyclic dependency.
> Besides out-right fixing the code (which is sadly not going to happen on
> this project - it's tens of millions of lines), is there any way to tell
> Maven, "Please compile ALL of the main source code first, then compile ALL
> of the test code afterward" ? Or is there any other solution around this
> problem?
> Many Thanks,
> Ken

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message