Teamcity 7.0.x and incremental build with maven
Hi,
I am frustrated by the incremental build feature in the team city 7.0.3.
Does anybody use this feature successfully within a large maven build?
In my project teamcity correctly recognizes the projects which have a subversion change and starts building all artifacts for projects depending on these (preparation phase).
Next, the changed artifcats are built (build main phase) but NOT the modules depending on the changed modules.
Why is that? In our case, we are building an EAR as a final step in the full maven build, and this is never triggered. Why not call "maven like --project example -am" ?
Thank - any help is appreciated!
Torsten
Please sign in to leave a comment.
Torsten,
Sorry for the delay.
Please, give us more details on your project structure. Is it the same as here: http://devnet.jetbrains.net/thread/436473 ?
Also, please attach an example build log with the issue (you can download one via TeamCity UI)
It's not the same.
http://devnet.jetbrains.net/thread/436473 shows, that maven modules within active profiles are not recognized by teamcity (I think, teamcity does not work with the effective pom). And my simple example project shows this bug.
Greetings
Torsten
I see.
Then we need more details on your project structure. Also, please attach the build log.
Thanks.
Here is the log file. The module under change is ArchivePluginManagementService. teamcity recognize this, but the does not build artifacts/ modules which are dependent on ArchivePluginManagementService like the EAR Module ArchiveEAR
This a build with more than 70 modules....
Greetings
Torsten
Attachment(s):
build.log.gz
Thank you for the logs.
To further investigate the problem, we need to know your project structure.
Would you mind attaching your project directory structure with pom.xml files?
In case it contains sensitive information, feel free to send it to teamcity-feedback@jetbrains.com. Please, mention this forum thread in subject or body of the message.
Torsten,
Looks like, we are still missing something, as I'm unable to catch the issue. Could you please attach a screen shot of maven build step configuration page?
Here is the maven build step configuration.
Torsten
Attachment(s):
incremental.png
Still no luck. ArchiveEAP module is listed as affected for me. Maybe something specific to used profile and settings.xml? Would you mind sending settings.xml to us?
Torsten,
Thank you for all the data you sent to us.
I thought of another (and very simple!) case, when modules depending on changed module may be not built: a committed change does not affect dependencies downstream. E.g., if you change something in test sources for a module, there is no need to rebuild depending modules.
Do you make changes to production code or to test code?
Hi,
it seems to me that we have not reached a common understanding of our problem, so I'd like to explain our issue again.
Let's assume that we have three modules: A, B, C.
B depends on A
C depends on B
A --> B --> C
it we have changes on the production code (tests are not involved) in B, the following happens:
1) A is built (preparation phase)
2) B is built
Unfortunaltey, C does not get built - but we need it to be built.
In our case, B is the ArchivePluginManagement and C is the ArchiveEAR.
The EAR is the final product of our build chain and always needs to be built.
Hope that clarifies our situation.
Thanks for your effort!
Best regards,
Torsten
Thanks for clarifications. I just whanted to double check that production (not tests) code is changed in module "B". I will attach updated version of maven plugin with additional debug information here.
I've prepared a patched version of Maven2 plugin for you. It contains more logging for maven incremental builds analysis.
Please, place the archive in <TeamCity_Data_Dir>/plugins folder and restart the server. New version will be propagated to agents.
Then, please, enable agent debug logging and run an incremental build under quiestion. After the build starts, look for [ImpactAnalyser] messages in teamcity-agent.log on the agent and post them here. Messages will appear shortly after the build starts, so there is no need to wait for build to finish.
Attachment(s):
Maven2.zip
how enabling debug logging on build agent? Is this a property in the agent configuration?
Please, see this part of TeamCity documentation for information about Agent logs.