In Maven extensions is it possible to add <configuration> block in the pom.xml like we do for plugins?

1.4k Views Asked by At

We have a Maven extension which does some post actions at the end of build, but we want to extended its features by adding some flags/properties/something else in <configuration> block same as the way we do for plugin configurations in pom.xml. Is it possible to do that?

We tried adding it in pom.xml but it is throwing exceptions during build, also didn't managed find it in the docs.

Want to have something like below in the pom.xml:

<build>
  ...
  <extensions>
    ...
    <extension>
      <groupId>org.apache.maven.extensions</groupId>
      <artifactId>maven-test-extension</artifactId>
      <version>1.0-SNAPSHOT</version>
      <configuration>
        ....
      </configuration>
    </extension>
    ...
  </extensions>
  ...
</build>
1

There are 1 best solutions below

2
Reddysekhar Gaduputi On BEST ANSWER

We tried it in different way, we have configured the extension as plugin using <extention>true</extension> in pom.xml and it accepts the <configuration>....</configuration> block.