TomEE Maven Plugin: run using existing installation of TomEE

Viewed 40

I have downloaded apache-tomee-8.0.12-plus.tar.gz and installed it on my computer. However, when I use the TomEE Maven Plugin to run the code in a project for the first time (i.e. using mvn package tomee:run), Maven downloads another (embedded?) copy of TomEE to run the code.

Question

Is there a way to configure Maven to run my code using the TomEE I installed, instead of having Maven download another instance of TomEE?

1 Answers

By default:

  • The downloaded (or ~/.m2 cached) artifact is extracted to the target folder of the respective project everytime tomee:run is invoked.

  • Manual changes are overridden as customization can be done via the configuration section of the plugin.

Yet, you can change the default behaviour by

  • Point catalinaBase to an existing TomEE installation
  • Setting overrideOnUnzip and skipRootFolderOnUnzip to false, so unzipping does not override things in catalinaBase

However, this might not stop the plugin from downloading a TomEE distribution to the local maven repository.

Related