Skip to content

Maven Central is blocking our IP address when we use maven via bndtools #7228

@Howaner

Description

@Howaner

Seems like Maven Central modified their protection yesterday. Since yesterday, our builds are often failing because the downloading of maven libraries fails.

I discovered that it's triggered by an invalid User-Agent. When we proxy the requests through an reverse proxy and modify the User-Agent to match the original maven User-Agent in style of "Apache-Maven ...", it works.

Original maven is using a custom user-agent, configured here: github.com/apache/maven/blob/master/impl/maven-core/src/main/java/org/apache/maven/internal/aether/DefaultRepositorySystemSessionFactory.java#L172

Is it feasable to also configure the same User-Agent in bndtools?
Is this the correct place to add the configuration parameter? https://github.com/bndtools/bnd/blob/master/biz.aQute.bnd.maven/src/aQute/bnd/maven/lib/resolve/RemotePostProcessor.java#L96

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