Skip to content

[MNG-6903] Extensions support Profiles - Improvement / New Feature #8414

@jira-importer

Description

@jira-importer

John Patrick opened MNG-6903 and commented

Maybe a Maven 4 feature...

At the moment you can add extensions using '.mvn/extensions.xml'. But some extensions or executions it might make sense if they can be enabled or disabled via a profiles.

So buildtime profiler, useful to understand how long builds are taking and what is consuming the time, but I don't want it to always execution because it does cause more confusion supporting other developers to understand the output. So at the moment it is checked into git as '.mvn/extensions.xml.disabled', and README.md mentions renaming the file locally if you want to enable the extension.

So currently;

<?xml version="1.0" encoding="UTF-8"?>
<extensions xmlns="http://maven.apache.org/EXTENSIONS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/EXTENSIONS/1.0.0 http://maven.apache.org/xsd/core-extensions-1.0.0.xsd">
    <extension>
        <groupId>com.soebes.maven.extensions</groupId>
        <artifactId>maven-buildtime-profiler</artifactId>
        <version>0.2.0</version>
    </extension>
</extensions>

To something like this;

<?xml version="1.0" encoding="UTF-8"?>
<extensions ...>
    <profile>
      <id/>
      <activation/>
      <extension>
        <groupId>com.soebes.maven.extensions</groupId>
        <artifactId>maven-buildtime-profiler</artifactId>
        <version>0.2.0</version>
      </extension>
    </profile>
</extensions>

No real preference if extension is nested within another element within profile, but extensions->profiles->profile->extensions->extension does seam a little overkill, but it would make it more inline with 'settings.xml' and 'pom.xml'.

I just would like -PaProfile and help to also consider '.mvn/extensions.xml'.


Affects: 3.6.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions