Location of application.properties

Hello - I am following the instructions to build an Axelor instance from source; have successfully run the git and gradle commands and ended up with the file build/libs/axelor-erp-6.0.0.war.

The instructions now tell me that I should copy the file axelor-source/axelor-erp/src/main/resources/application.properties to /opt/tomcat/application.properties. How can this be right? Surely that file should be somewhere like webapps/ROOT/WEB-INF/classes/application.properties? We may well have several instances of Axelor running under /opt/tomcat. This is at odds with the documentation for installing from a WAR file.

For me application.properties is in the war , and deployed when start tomcat

Yes - that is what I was expecting. But the WAR file is created by the gradle process, which I do not yet understand. If the application.properties file which is contained within the WAR needs to be edited, then I suppose I can just run jar xvf to unpack the WAR, edit the application.properties file, then run jar cvf to pack it up again? I am guessing the proper procedure is to change the configuration somehow before I run the gradlew command, but I have no idea how to do that!



The application configuration can be provided from some external location using a JVM option.

$ export JAVA_OPTS="-Daxelor.config=/path/to/my-app.properties"


Thankyou, but I do not see how that helps: if I have multiple instances of Axelor running on the same tomcat server, i.e. multiple “Host” entries in the server.xml file, how would I pass a different configuration to each of them?

Problem resolved by editing application.properties for each instance before running the build (gradle). As far as I can see, the strategy of passing the location of the configuration file via JAVA_OPTS is no use unless you are only ever going to have a single instance of Axelor running on a tomcat server

it’s not relevant but we made GitHub action usage to handle these things