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
com.google.flogger:flogger:0.5.1 pom.xml is referencing itself #152
Comments
Can you please bump this priority to P1 or P2 since even the latest version of copy_dependency fails to copy all dependencies because of this error. Error message:
|
I think we autogenerate this |
Maybe I can binary-search my way out of this, given that 0.5 is affected and 0.5.1 is not. No promises, but I will see if I can figure it out quickly. Thank you for the report. |
There are very few commits between the releases, and 4b78b14 looked suspicious, so I didn't even need I suspect that the problem is the |
Internally, I just speculated:
|
I think this invalid pom.xml hit Apache Beam's updateOfflineRepository task (BEAM-10157). @cpovirk Do you know the root cause now? I'm thinking to start troubleshooting if it's not yet done. My memo: https://gist.github.com/suztomo/fff07dc7bcdb5a7d4647e86b32050882 |
I don't have a deep understanding here, but I have a general theory. I will poke around a little to see what I can find. |
I see that removing In the long term, it probably "should" be listed in I'm going to see if there's an easy way to do something like #152 (comment). Otherwise, I think we should accept your PR while we figure out a long-term solution. |
I wasted a little time before concluding that, fundamentally, the problem is the mismatch between our internal target structure and our external artifact structure -- or rather, the fact that our external target structure follows the former rather than the latter. I mailed a proposed fix (as an internal CL). |
The problem: While we want the `pom_file` target to depend directly on the target with `maven_coordinates`, we do _not_ want it to depend on _other_ targets that _in turn_ depend on the target with `maven_coordinates`. Prior to this CL, the `pom_file` target depends on `:log_sites`, which in turn depends on `:api`, which has `maven_coordinates`. This CL changes the setup of our _external_ `BUILD` file. Specifically, it puts _all_ of the main Flogger artifact into a single `:api` target (aside from `:platform_provider`, since we create by directly writing bytecode, rather than compiling Java sources). This makes it impossible for a target to both be included in the `pom_file` _and_ depend on `:api`. Tested with... - release/install-local-snapshot.sh && grep project.version $HOME/.m2/repository/com/google/flogger/flogger/LOCAL-SNAPSHOT/flogger-LOCAL-SNAPSHOT.pom (and verified no other changes to the pom) - diffing of the contents of the jar generated with and without this CL (no diffs) - comparison of $HOME/.m2/repository/com/google/flogger/flogger-*/LOCAL-SNAPSHOT/flogger-*-LOCAL-SNAPSHOT.pom with and without this CL (no diffs) Fixes google#152 Closes google#165 (by implementing an alternative) RELNOTES=Eliminated self-reference in pom.xml. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=314530982
Fixed in master. We'll need to do a release for that to solve the problems you're seeing, of course. I don't remember offhand if I have permission to publish a release. I will try to have a look within the next week or so. Thanks again for the report. |
@cpovirk Thank you. |
@cpovirk Can you please check if you can release a new version with this fix? Thanks. |
@cpovirk yeah if we could get a fix that'd be great |
@cgdecker is planning to do a release in the coming weeks. |
Hi,
When running maven site plugin I get a warning:
I indeed see the self dependency in the pom.xml at line 58
flogger-0.5.1.pom.txt
This does not prevent the "maven site" from finishing successfully but probably will be good to fix.
The text was updated successfully, but these errors were encountered: