[wildfly-dev] wfly bin\*.conf.ps1 files question
Tomaž Cerar
tomaz.cerar at gmail.com
Fri May 25 04:12:35 EDT 2018
Hey Rebecca,
I've initially wrote that script but to be fair I do not really remember
reasoning behind every detail...
But one thing I do remember is that enviroment variables have different
scopes.
and should not be equaled to how env variables in powershell work comparing
to linux.
So you have scopes which can be
- system enviroment, (which can differ as per user/per whole system)
- script local (bit special with imports/includes)
- process local
and I do remember I did play around with process scope a bit to get some
stuff working.
Main goal was to have common.ps1 that would have common logic for all
scripts.
and than the actual scripts (standalone.ps1, jboss-cli.ps1,...) would just
have the extra specifics.
One thing I was also looking into was creating common.ps1 as a powershell
module [1] [2],
that would server as that "common" part and it would simplify things even
more.
But I never got to finishing it.
I know this is all really vague, but I still hope it will help a bit.
cheers,
tomaz
[1] https://msdn.microsoft.com/en-us/library/dd878340(v=vs.85).aspx
[2] https://msdn.microsoft.com/en-us/library/dd878324(v=vs.85).aspx
On Wed, May 23, 2018 at 8:53 PM, Rebecca Searls <rsearls at redhat.com> wrote:
>
> I don't understand the reason for setting the (local) variable JAVA_OPTS
> in the *.conf.ps1 files when the common.ps1 functions completely ignores
> the local setting and always reads and uses the environment variable value.
>
> The in-file comments leads the reader to believe he can override the system
> env var and define a new JAVA_OPTS in the conf file which will be used by
> the
> calling script. Currently this is not true.
>
> Can someone explain the intent here? Is this a bug or obsolete code that
> should be removed?
>
>
> _______________________________________________
> wildfly-dev mailing list
> wildfly-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/wildfly-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/wildfly-dev/attachments/20180525/3e53dc92/attachment.html
More information about the wildfly-dev
mailing list