[
https://issues.apache.org/jira/browse/OFBIZ-4763?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13239903#comment-13239903
]
Markus M. May commented on OFBIZ-4763:
--------------------------------------
Hello,
I would like to use the following process, like already written in the ML (see
above thread):
1) read environment variables
2) read variables from a set "profile"-properties file
3) read default variables
4) set variables in the configuration-XML-files of ofbiz
The profile-specific properties (e.g. local, test, production) are read from
the profile-properties files, which are named like the profile (above mentioned
local, test and production) and which are chosen based on the environment
variable "profile".
So, if a variable -Dprofile=local is given on the ant command line, the
property file runtime/config/local.properties is read. If no variable is given
a default value is used (local?). All variables set in these files can be set
via command line parameters as well.
The main point here is now how to replace the variables in the already existing
configuration files (e.g. framework/base/config/ofbiz-containers.xml). IMHO, we
should move these configuration files to the framework/base/conf-templates
directory and put the variables (e.g. ${port}) in there. On the call of the
"config"-task in ant (which is a dependency of the "run"-task) these files are
copied and the variables are replaced through the set values.
This would mean, that we do move several files and put the original ones into
the .gitignore, .hgignore, svn:ignore properties/files. Most probably we would
also need to check if these files do exist in the platform specific
startup-scripts, otherwise the ant-task would need to get called or an error
message is to be thrown.
We need to define, what kind of properties we would like to configure
centrally. This could be a "start small" approach or an "all or nothing"
approach. I would like to keep it simple and just start with the hostname and
port-stuff, which is the reason why this issue came up.
WDYT?
> create and use startup profiles
> -------------------------------
>
> Key: OFBIZ-4763
> URL: https://issues.apache.org/jira/browse/OFBIZ-4763
> Project: OFBiz
> Issue Type: New Feature
> Affects Versions: SVN trunk
> Reporter: Erwan de FERRIERES
> Assignee: Erwan de FERRIERES
> Fix For: SVN trunk
>
>
> from this thread
> http://ofbiz.135035.n4.nabble.com/OFBiz-integration-in-Apache-sonar-instance-td4484597.html
> we should be able to choose a profile when starting OFBiz, which will
> configure at least the ports used.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira