Skip to content

Decouple org.eclipse.oomph.setup.core from direct Apache HttpClient 5 package imports #198

@DmitryZagr

Description

@DmitryZagr

Description:

Currently, org.eclipse.oomph.setup.core (v1.35.0+) has a hard dependency on org.apache.hc.client5.http.cookie via Import-Package. This forced dependency prevents the use of Oomph in lightweight or customized Eclipse distributions that prefer the native Java 11+ HttpClient (provided by org.eclipse.ecf.provider.filetransfer.httpclientjava) over the Apache implementation.

Reasons for Change:

  1. Transport Agnosticism: Oomph should ideally rely on the ECF Filetransfer abstraction rather than a specific low-level HTTP client implementation. Hardcoding Apache HttpClient 5 packages breaks the pluggable nature of ECF providers.
  2. Reduced Footprint: Environments aiming to minimize dependencies by using built-in JDK 11+ capabilities are currently forced to include the entire Apache HttpClient 5 stack solely to satisfy this Oomph requirement.
  3. Flexibility: Users operating behind restrictive proxies or in specific enterprise environments often need to switch between httpclient5 and httpclientjava to resolve connectivity issues. A hard dependency on one makes this troubleshooting or optimization impossible.

Proposed Solution:

  • Refactor Cookie Management: Move the specific cookie handling logic behind an interface or use ECF's internal cookie handling if possible.
  • Optional Resolution: If direct access to HttpClient 5 features is necessary for specific use cases, consider marking the package import as optional (resolution:=optional) and implementing a graceful fallback or a service-based approach.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions