Classpath for compilation (build 4037)

I'm trying to compile our project in TC (build 4037) using the 'Runner: Ipr' but the compilation fails since it does not find the correct version of the library on classpath.

The problem is that the project needs a library (binary) to get compiled and this library must be patched by one module (source) that is part of the project. In Idea (6.0.4) it compiles fine since I can setup the module dependencies and the order of modules/libraries on classpath. But in TC it fails and apparently the problem is that the needed class is taken from the binary library (instead of the module that patches these library). Since the library does not contain one method (which adds the patch), the compilation fails.

How is the classpath created when compiling the project? Is it compiled as one bunch of classes or does it compile module by module and keeps the module dependencies? Also, I have used Idea 6.0.4 for creating the IPR project file, is it fine for TC 2.0 beta?

Is there a way to specify classpath or some log where to check this classpath is created correctly?

4 comments
Comment actions Permalink

TeamCity tries to use the same build process like in IDEA, so compilation problem looks like a bug.
You may take a look at the ant build script generated for your IPR build at

buildAgent/work/Server/]]>/integrationBuild.xml

Please try to take a look at this file, if there is a bug, file a Jira report.

Thanks,
KIR

0
Comment actions Permalink

Indeed, it looks like a bug, probably caused by circular dependency. Actually I have found out following:
1. The modules create a circular dependency, let's say that I have three modules A, R and U-patch and a library U-lib.
U-patch patches U-lib and must be on classpath earlier on.
A depends on R, U-patch and U-lib.
U-patch depends on U-lib.
R depends on A and U-lib.

The integrarionBuild.xml file contains a property module.ModuleCycle1.classpath that is used to compile A and R together, but this property does not contain path from U-patch! It does contain path from U-lib.
I'm not sure which algorithm TC uses to generate the ant file but it is not generated correctly in case of circular dependencies.

0
Comment actions Permalink

I'd really appreciate if you file a bug report and provide information like:
- ipr + iml files
- generated integrationBuild.xml file

Thanks,
KIR

0

Please sign in to leave a comment.