-
Notifications
You must be signed in to change notification settings - Fork 156
[FELIX-6493] Extend is-up-to-date logic of Manifest goal #124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Besides the changes affecting the logic a moderate number of possible clean up changes. |
- check if the MANIFEST.MF file to generate even exists - consider modifications of pom.xml (and its parents) - write incremental-info after manifest to not self-cause out-of-date
Actually the pom's of all parent projects have to be considered as well. |
cde3294 to
ca8fba5
Compare
I'm not sure if this is not a bit out of scope. I would assume that if one updates the parent he also has to update the child to reflect the new version? What I actually wonder is: Is there really a measurable benefit for all those stale checking? I could only think of a resource that was modified and thus do not change the generated manifest but does it really impact performance to regenerate the manifest in those scenarios? |
For incremental builds in IDE's like Eclipse this is actually useful. If one modifies the parent pom (in a way that also affects the child's generated Manifest), Eclipse triggers an incremental build of parent and child project (I assume the ResourcesPlugin checks the project inter-dependencies). If the manifest plugin does not check the parent pom it falsely assume the manifest is up to date (because the child's pom did not change) and skips the execution. In order to re-generated the manifest a user would have to trigger a full build or modify the child pom manually. But especially during development between releases it is not necessary to change to version of the parent which would require adjustments of the child,
From my recent observations the BND-Analyzer takes some time for larger projects with many classes to scan. So I think it is not worthless. At the moment But what I'm pretty confident about is that checking for new or modified Java-source files in anyJavaSourceFileTouchedSinceLastBuild() is not necessary because |
Sure but how often is an incremental build triggered that does not is detected as a change? e.g if I see correctly it is only checked if a java file is affected but not if the change actually is a relevant change (e.g. if I just add a comment into a file this will still trigger generation of the manifest!).
I'm not sure if this is always true as far as I know under linux one could disable that parents are updated. |
In general a change is not detected, if a non java resource is modified that is not copied into
Of course one could disable autobuild in Eclipse (I don't know how other IDE handle it), but then no incremental builds happen anyways. But except this case, I don't know how to disable the write of compiled class files into target/classes directory? |
I mean that writing into a directory also updates the directory timestamp! |
Ah, sorry I didn't understand that. |
Okay it seems I misread your comment then, I though you have proposed to only check the timestmap of the folder instead of its contents. |
No no. Sorry for being unclear. My proposal is to skip the |
|
@jbonofre, @cziegeler, hboutemy or @gnodet could you be so kind and review this change or ping somebody who can? |
|
I'm reviewing and testing this proposed change. |
jbonofre
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. NB: it would have been great to add a test to verify the metadata is cleanly generated.
Thank you. |
This PR addresses issue FELIX-6493 and extends the is-up-to-date logic of the Manifest goal to