Repository navigation
Commit 75b4daa
Stop attesting Maven pins a profile or user property overrides
VEX discovery attested two Maven pins the build may not resolve:
1. Profile declarations (J1). Discovery dropped every dependency inside
<profiles> from the version grouping and diagnosed only suffixed
profile versions. A profile declaring the pinned GA at the base
version (or any other version) left the hosted ref attested, yet
whenever that profile is active Maven resolves the unpatched jar. The
hosted rewriter leaves profile declarations as written
(redirect_maven_profile_dependency_unpatched) and vendored mode treats
every profile as live, so discovery now agrees with the writers: a
profile declaration of the pinned GA (main jar in <dependencies> or
<dependencyManagement>, a declaration an undefined coordinate property
may make that GA, or an executable classifier copy) at any version
other than the pin keeps the ref but marks it unattested with the new
UnattestedKind::MavenProfileUnpatched (CLI note
vex_maven_profile_unpatched). A profile declaration with no <version>
takes the live pin and does not withhold it. The pre-v5 single-pom
vendored wiring gets the same check against its vendored version.
2. .mvn/maven.config user properties (J4). A ${prop} <version> was
resolved from the pom's <properties> only, though coordinates already
read maven.config's -D user properties. Maven looks user properties up
first, so <version>${v}</version> with <v>1.0-socket.x</v> in the pom
and -Dv=1.0 in maven.config builds the base release while discovery
attested the pin. PomScope now lays the user properties over the root
<properties> once, and both version resolution and coordinate
interpolation read that map. The vendored reactor's interpolator is a
method on the multi-pom Reactor, so it is not reused here; this is the
minimal change in formats/maven.
Tests (each fails on origin/main):
- formats::maven::tests::version_property_reads_user_properties_first
- vex::discover::maven::tests::version_property_reads_maven_config_overrides
- vex::discover::maven::tests::profile_declaration_off_the_pin_is_not_attested
- vex::discover::maven::tests::vendored_ref_under_a_profile_version_is_not_attested
No existing test asserted the old behavior; the golden corpus is
unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>1 parent 7bde3ba commit 75b4daa
5 files changed
Lines changed: 323 additions & 14 deletions
File tree
- crates
- socket-patch-cli
- src/commands
- socket-patch-core/src
- formats/maven
- vex/discover
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
547 | 547 | | |
548 | 548 | | |
549 | 549 | | |
550 | | - | |
| 550 | + | |
551 | 551 | | |
552 | 552 | | |
553 | 553 | | |
| |||
2678 | 2678 | | |
2679 | 2679 | | |
2680 | 2680 | | |
| 2681 | + | |
2681 | 2682 | | |
2682 | 2683 | | |
2683 | 2684 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
232 | 232 | | |
233 | 233 | | |
234 | 234 | | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
235 | 239 | | |
236 | 240 | | |
237 | 241 | | |
| |||
268 | 272 | | |
269 | 273 | | |
270 | 274 | | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
271 | 281 | | |
272 | 282 | | |
273 | 283 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
45 | | - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
46 | 47 | | |
47 | 48 | | |
48 | 49 | | |
| |||
67 | 68 | | |
68 | 69 | | |
69 | 70 | | |
70 | | - | |
| 71 | + | |
| 72 | + | |
71 | 73 | | |
72 | 74 | | |
73 | 75 | | |
| |||
84 | 86 | | |
85 | 87 | | |
86 | 88 | | |
87 | | - | |
88 | | - | |
| 89 | + | |
| 90 | + | |
89 | 91 | | |
90 | 92 | | |
91 | 93 | | |
| |||
103 | 105 | | |
104 | 106 | | |
105 | 107 | | |
106 | | - | |
| 108 | + | |
| 109 | + | |
107 | 110 | | |
108 | | - | |
109 | 111 | | |
110 | 112 | | |
111 | 113 | | |
| |||
733 | 735 | | |
734 | 736 | | |
735 | 737 | | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
736 | 770 | | |
737 | 771 | | |
738 | 772 | | |
| |||
0 commit comments