Skip to content

Change maven cli defaults based on CI env variable #11088

Open

Description

@laeubi

New feature, improvement proposal

CI servers usually define a CI env variable:

For reference:

it would be great if maven could detect that and change some of the default settings then, for example:

  1. show transfer progress is currently ON by default it should be OFF by default on CI servers
  2. batch mode is OFF by default and should be ON by default on CI servers
  3. ... maybe more ...

reason is that these options are usually tweaked for the CI and it always adds some boilerplate to these scripts. It would be great if maven can use convention-over-configuration here and switch the defaults depending on where it runs. If anyone absolutely want other values they can still explicitly configure them.

Activity

  1. added
    enhancement
    on Sep 3, 2025
  2. gnodet commented on Sep 3, 2025

    @gnodet
    Contributor

    We do have the needed infrastructure and we do look for the CI env variable.
    For example, it's used here:

    if (context.invokerRequest.ciInfo().isPresent()) {

    We actually do disable transfer logging in CI jobs:

    if (quiet || noTransferProgress || quietCI) {
    delegate = new QuietMavenTransferListener();

    So yes, we may be missing batch mode here, not sure about others atm.

  3. added a commit that references this issue on Sep 8, 2025
  4. self-assigned this
    on Sep 8, 2025
  5. added a commit that references this issue on Oct 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementmvn4

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions