Maven incremental build fails to determine dependencies when modules span ClearCase VOBs
I'm building a Java based project using Maven 3.0.3 with 100+ modules running TeamCity Enterprise 7.0.4 (build 21474), a single source file change results in long build and test phases due to Maven's incremental build handling. TeamCity's "Build only modules affected by changes" function is exactly what I'm looking for but it doesn't work when the project is split across multiple ClearCase VOBs and is based on a dynamic view.
I've created a mock project that highlights the issue, so if I have the following
vob1/project/root-pom/pom.xml
vob1/project/all-modules/pom.xml
vob1/project/modules/module1/...
vob2/foo/module2/...
If I change src in module1 TeamCity correctly triggers the build, evaluates affected modules and builds as expected. However, if I change src in module2 TeamCity correctly triggers the build but then does nothing and logs "No modules affected by changed files detected".
Has anyone experienced this and/or is this a known issue?
Thx,
Jason
Please sign in to leave a comment.
Jason, this is not a known issue.
Would you mind attaching a sample project here? And a description of how do you check out your vobs (checkout rules?) could help.
Jason,
Could you please attach here the sample project? Do you have any checkout rules involved?
Nikita thx for getting back to me. I've zipped up my mock project (project.zip), added my project config (project-config.xml), added the log I got from the agent (Log.txt, has both a good and bad run) and added some detail about the problem (Maven Incremental Building Fails to Determine Dependencies Spanning VOBs.docx).
My view is dynamic and the config spec is as follows:
element * CHECKEDOUT
element * .../collinj_maven_20130516/LATEST
mkbranch collinj_maven_20130516
element * /main/LATEST
end mkbranch
Let me know if there's anything you need.
Thx,
Jason
Attachment(s):
Maven Incremental Building Fails to Determine Dependencies Spanning VOBs.docx
Log.txt.zip
project-config.xml
project.zip
Nikita, is there any progress on this? Thx
Hello Jason,
Thank you for the information. Would you mind enabling full debug logs on the agent ( look for <!--DELETE THIS LINE FOR ENABLING DEBUG LOGGING--> lines in teamcity-agent-log4j.xml ) and trying to run incremental build in module #5 (the one, that does not get detected properly). I expect some lines marked with [ImpactAnalyser] to appear in the log file. Please, attach resulting log to this tread
Please find attatched log. Thx
Attachment(s):
teamcity agent log.txt.zip
Thank you for the logs.
Looks like, TeamCity affected modules analyzer is confused by checkout directory path.
For changed files in Module5, analyzer receives paths, relative to VCS Root (where these changes were detected, applying checkout rules). These paths are then resolved against Checkout Directory - and this is where everything goes wrong.
I believe, there is a workaround for the issue. Please try the following:
+:.=> fo_fx_applbuild/appl.build/java.build/maven
+:.=> fo_fx_applbuild/appl/java
Just had a quick go and it looks good, I think that's done the trick.
Thx for your help Nikita