I need to be able to change the internal port used by Nexus Repository Manager, the Jetty server. And I unfortunately need to do this using an environment variable. I found a solution for this about a week ago that worked, but that is now gone from my memory.
I know about the file .\etc\nexus-default.properties
## DO NOT EDIT - CUSTOMIZATIONS BELONG IN $data-dir/etc/nexus.properties
##
# Jetty section
application-port=8081
application-host=0.0.0.0
nexus-args=${jetty.etc}/jetty.xml,${jetty.etc}/jetty-http.xml,${jetty.etc}/jetty-requestlog.xml
nexus-context-path=/
# Nexus section
nexus-edition=nexus-pro-edition
nexus-features=\
nexus-pro-feature
nexus.hazelcast.discovery.isEnabled=true
I really need to do this using environment varibles though. I have tried the following without success
APPLICATION_PORT=80
NEXUS_APPLICATION_PORT=80
NEXUS_PROPERTIES_APPLICATION_PORT=80
From the source code I can clearly see that the ConfigurationBuilder
uses EnvarBasedValueSource
, which should mean that environment variables are loaded based on some naming convention.
Does anybody know how this works?