End of the hell to add a javaagent to tomee with maven?


Until now adding a javaagent to tomee with the tomee maven plugin needed to get the path of the javaagent with a third party plugin (dependency plugin was common). This was making poms huge and the logic quite useless.

Since few days you can get rid of it.

The idea is to simply specify a list of javaagent in the plugin and reuse maven coordinates. For instance to add sirona javaagent:

<plugin>
  <groupId>org.apache.openejb.maven</groupId>
  <artifactId>tomee-maven-plugin</artifactId>
  <version>${tomee.version}</version>
  <configuration>
    <javaagents>
      <javaagent>org.apache.sirona:sirona-javaagent:${sirona.version}:jar:shaded</javaagent>
    </javaagents>
    <!-- other config -->
  </configuration>
</plugin>
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s