maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ken E <>
Subject Maven cyclic dependency when compling tests only - how to resolve easily?
Date Sat, 09 Jun 2012 04:32:42 GMT
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

Many Thanks,

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message