You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by "ASF GitHub Bot (JIRA)" <se...@james.apache.org> on 2018/04/02 17:32:00 UTC

[jira] [Commented] (JAMES-2355) Startup: setenv vs setenv.sh

    [ https://issues.apache.org/jira/browse/JAMES-2355?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16422825#comment-16422825 ] 

ASF GitHub Bot commented on JAMES-2355:
---------------------------------------

Github user phansson commented on a diff in the pull request:

    https://github.com/apache/james-project/pull/108#discussion_r178597544
  
    --- Diff: server/app/src/main/app/bin/setenv.sh ---
    @@ -1,20 +1,29 @@
    -#!/bin/sh
    -# ----------------------------------------------------------------------------
    -# Copyright 2001-2010 The Apache Software Foundation.
    -#
    -# Licensed under the Apache License, Version 2.0 (the "License");
    -# you may not use this file except in compliance with the License.
    -# You may obtain a copy of the License at
    -#
    -#      http://www.apache.org/licenses/LICENSE-2.0
    -#
    -# Unless required by applicable law or agreed to in writing, software
    -# distributed under the License is distributed on an "AS IS" BASIS,
    -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    -# See the License for the specific language governing permissions and
    -# limitations under the License.
    -# ----------------------------------------------------------------------------
    -#
    -# Add every needed extra jar to this
    -CLASSPATH_PREFIX=../conf/lib/*
    -export CLASSPATH_PREFIX
    \ No newline at end of file
    +#!/bin/sh
    +# ----------------------------------------------------------------------------
    +# Copyright 2001-2018 The Apache Software Foundation.
    +#
    +# Licensed under the Apache License, Version 2.0 (the "License");
    +# you may not use this file except in compliance with the License.
    +# You may obtain a copy of the License at
    +#
    +#      http://www.apache.org/licenses/LICENSE-2.0
    +#
    +# Unless required by applicable law or agreed to in writing, software
    +# distributed under the License is distributed on an "AS IS" BASIS,
    +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    +# See the License for the specific language governing permissions and
    +# limitations under the License.
    +# ----------------------------------------------------------------------------
    +#
    +# This file is sourced by the various start scripts. You can use it to
    +# add extra environment variables to the startup procedure.
    +#
    +#   NOTE:  Instead of changing this file it is better to create a file
    +#          named setenv.sh in the ../conf directory as the files in the
    +#          bin directory should generally not be changed.
    +
    +# Add every needed extra jar to this
    +CLASSPATH_PREFIX=../conf/lib/*
    +export CLASSPATH_PREFIX
    +
    +[ -f "$BASEDIR"/conf/setenv.sh ] && . "$BASEDIR"/conf/setenv.sh
    --- End diff --
    
    Sure, but I currently do not understand how those files in the James distribution package, directory `conf`, get their `-template` name from?   Like for other config files, I do not want the product to ship with files in `conf` that may accidentally override customizations already made by the user.


> Startup:  setenv vs setenv.sh
> -----------------------------
>
>                 Key: JAMES-2355
>                 URL: https://issues.apache.org/jira/browse/JAMES-2355
>             Project: James Server
>          Issue Type: Bug
>    Affects Versions: 3.0.0, master, 3.0.1
>            Reporter: phansson
>            Priority: Major
>
> On Unix/Linux using binary distribution of Apache James 3.0.1:
>  
> The shell script {{james}} will look for {{setenv}} and source it if it exists. However, on the disk, the file is named {{setenv.sh}}. This means that the setenv file has no effect in an out-of-the-box install of James.
> Current workaround is to rename {{setenv.sh}} to {{setenv}} during first time setup.
> If the bundled {{setenv.sh}} file is only meant as a template (is it?), then it should be named appropriately and it should have instructions in it for how to make it take effect.
> On another note: The idea of having a setenv file which can affect startup is a good one. Indeed Tomcat does the same. However, I've never understood why this file is found in the /bin directory and not the /conf directory. This is indeed configuration. When you update to a newer version of James you have to remember to bring this file with you. Well, well, this 'deficiency' is shared with Tomcat, so I guess it has become kind of accepted. Except by me. :)



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org