Repository navigation
FELIX-6876 - Look up Wagon from the plugin container in the remote OBR goals - #592
slachiewicz wants to merge 2 commits into
Conversation
f87699a to
1650b60
Compare
|
Thanks for this, the refactor itself looks good. I compared it with maven-compat 3.8.1, where getWagon(Repository) is just a lookup by protocol. Your replacement keeps the same behavior, including the case-insensitive server id match and decrypting the passwords. The tests are a nice addition too. I have a couple of proposals and would like your feedback on them.
Two smaller points, optional: In connect(), a RuntimeException from the decrypter or the wagon skips releaseWagon(). Finally, a question: do you use the remote OBR goals yourself? The OBR code has seen no functional change since 2020, and I’m considering deprecating the goals. Knowing whether anyone relies on them, and whether you tested deploy-file and remote-clean, would help me decide. |
FELIX-6876: the remote OBR goals (
bundle:deploywithremoteOBR,bundle:deploy-file,bundle:remote-clean) no longer use maven-compat'sWagonManager, and no longer depend on thewagon-fileandwagon-httpproviders Maven ships inlib/.RemoteFileManagerlooks the Wagon up by protocol in the plugin's container (the callWagonManager.getWagonmade), takes credentials from the matching settings<server>throughSettingsDecrypter, and keeps using the first active proxy (as before: no protocol match), whose password is now decrypted too. The server id is matched case-insensitively, as the maven-compat 3.8.1 the plugin builds against did. The Wagon is released after use.wagon-fileandwagon-http3.5.3; other protocols still come from build extensions.maven-compatstays for now:BundlePlugin,BundleAllPluginandAbstractBaselinePluginstill use itsArtifactResolver,ArtifactCollectorandMavenProjectBuilder(FELIX-6606).Verified:
install bundle:deploy -DremoteOBRagainst afile://OBR and an HTTP OBR with and without Basic auth, run twice sorepository.xmlis created and then merged → passes on Maven 3.9.16 and 4.0.0-rc-7; on a 3.9.16 copy withoutlib/wagon-file*andlib/wagon-http*, master fails withUnsupported protocol: 'file'and this change passes.mvn verifyin the module: 38 tests (9 new) and 14 ITs pass. Not run end to end:deploy-file,remote-clean, scp/sftp through an extension, a real proxy.