I need the following vm options to be passed into maven.
-Dvertx.disableFileCPResolving=true
-Dlog4j.configurationFile=log4j2.xml
-Dlogger-factory-class-name=io.vertx.core.logging.Log4j2LogDelegateFactory
-DAPP_ID=9757632
At present I am passing them via the IDE (Intellij) and everything is working fine. (See screenshot)
But how can I add them as part of the Maven project, possibly via POM file or a resource file?
Tried the following in my POM file based on the suggestion in this page but it doesn't work.
https://stackoverflow.com/a/39751176/9401029
<properties>
<vertx.disableFileCPResolving>true</vertx.disableFileCPResolving>
<log4j.configurationFile>log4j2.xml </log4j.configurationFile>
<vertx.logger-delegate-factory-class-name>io.vertx.core.logging.Log4j2LogDelegateFactory</vertx.logger-delegate-factory-class-name>
<APP_ID>9757632</APP_ID>
</properties>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<compilerArgs>
<arg>${vertx.disableFileCPResolving}</arg>
<arg>${log4j.configurationFile}</arg>
<arg>${vertx.logger-delegate-factory-class-name}</arg>
<arg>${APP_ID}</arg>
</compilerArgs>
</configuration>
</plugin>
Saw another example using the file JVMARGS (no extension) which holds following values.
-Dvertx.disableFileCPResolving=true
-Dlog4j.configurationFile=log4j2.xml
-Dlogger-factory-class-name=io.vertx.core.logging.Log4j2LogDelegateFactory
-DAPP_ID=9757632
Placed this file at the root level and within resource folder. That doesn't work either.
Please advice how to pass these values into my maven project, preferably via POM file. Thank you.