As a general rule of thumb, instrumentation needs to be performed in case you run a program or a test that will execute ActiveJDBC models. See Instrumentation for more detail. Instrumentation needs to execute after compile and before running your code.

Video: IntelliJ Idea + Instrumentation

This video clip shows how to do rapid application development with IntelliJ Idea and integrated instrumentation step.

Configuration

Perform these steps:

  • Run -> Edit configurations -> Defaults -> JUnit

  • Enter this as a post-Make step:

org.javalite:activejdbc-instrumentation:[VERSION]:instrument
Intellij Idea

Intellij Idea

Ensure to enter the latest (or appropriate) version of the library

Since you configured this as a JUnit default configuration, every new JUnit run you create will automatically have this configuration.

One-off manual instrumentation

If you just want to execute a one-off instrumentation, simply run it from the Maven tab:

Intellij Idea manual instrumentation

Intellij Idea manual instrumentation

Non-Maven integrations

If you use Ant, simply add an Ant task in the same way as explained above. Same goes for simple command line scripts, as long as they are executed after Make and before run time.


How to comment

The comment section below is to discuss documentation on this page.

If you have an issue, or discover bug, please follow instructions on the Support page