Building a HAR

This is the de facto example for har packaging. This example pom.xml demonstrates what you need in order to have maven generate a HAR file using maven-har-plugin. The <extensions/> element must be present and must be set to true for the plugin to operate correctly. Also remember to set <packaging/> to har.

<project>
  ...
  <build>
    ...
    <plugins>
      ...
      <plugin>
        <groupId>net.sf.maven-har</groupId>
        <artifactId>maven-har-plugin</artifactId>
        <version>1.0</version>
        <extensions>true</extensions>
      </plugin>
      ...
    </plugins>
    ...
  </build>
  ...
  <packaging>har</packaging>
  ...
</project>