John Patrick created MNG-6903:
---------------------------------

             Summary: Extensions support Profiles - Improvement / New Feature
                 Key: MNG-6903
                 URL: https://issues.apache.org/jira/browse/MNG-6903
             Project: Maven
          Issue Type: New Feature
          Components: core
    Affects Versions: 3.6.3
            Reporter: John Patrick


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;
{code:xml}
<?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>
{code}

To something like this;
{code:xml}
<?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>
{code}

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'}}.




--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to