Developer
DevOps
Jahia 8.2
How to add a JVM requirement in a module?
Question
I want to force the usage of the JDK 11 for my module, how to add this JVM requirement to
the module?
Answer
You can modify the file pom.xml to add this requirement, like that:
<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<instructions>
<Bundle-RequiredExecutionEnvironment>JavaSE-11</Bundle-RequiredExecutionEnvironment>
</instructions>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<release>11</release>
</configuration>
</plugin>
</plugins>
</build>