Starting with Axon Ivy version 13.2, we have switched the Java compilation from a highly customized solution to a standard compilation procedure. Java compilation takes place at the time of developing the Ivy project in the IDE or when building it with Maven. Where "compiling" refers to the step in which *.java files are transformed into .class files. This step is mandatory to make Ivy projects executable on the engine.
Legacy compilation
Why are we switching from a custom, let's call it legacy compilation? Until now, we have abused an Axon Ivy Engine for compilation. This approach lacks transparency, as the engine enriches the compile classpath with many Ivy Java classes and third-party libraries that are not specified in the Maven pom.xml. As a result, the Java part of an Ivy project cannot be developed in an arbitrary Java IDE because the extended classpath provided by the engine is missing.
Standard compilation
To enable Java development in VS Code and comply with the Maven standard, the Maven pom.xml must specify which classes are available during compilation.
We expect that version 13.2 of an Ivy project contains the Maven parent ivy-project-parent. In the latest project migration, the parent is added if no other parent is specified.
<parent>
<groupId>com.axonivy.ivy.api</groupId>
<artifactId>ivy-project-parent</artifactId>
<version>13.2.0</version>
<relativePath></relativePath>
</parent>
In addition, we expect the Ivy project to contain the dependency ivy-api which will also be added during the project migration.
<dependency>
<groupId>com.axonivy.ivy.api</groupId>
<artifactId>ivy-api</artifactId>
</dependency>
The ivy-api dependency provides our Ivy Java API, as well as some third-party libraries. However, it is a subset of the classes compared to the legacy classpath provided by the engine.
Using ivy-project-parent and ivy-api, it is possible to compile in the standard way, e.g. in the VS Code IDE or with the Maven compile plugin.
Help
With this change, we expect possible errors, as the classpath for compilation has changed. Here is a collection of assistance:
When building with Maven, it is currently still possible to perform legacy compilation by appending -P-ivy to the command, e.g.:
mvn clean verify -P-ivy