#
# Copyright (c) 2024, 2025 Contributors to the Eclipse Foundation.
# Copyright (c) 2004, 2018 Oracle and/or its affiliates. All rights reserved.
#
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License v. 2.0, which is available at
# http://www.eclipse.org/legal/epl-2.0.
#
# This Source Code may also be made available under the following Secondary
# Licenses when the conditions for such availability set forth in the
# Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
# version 2 with the GNU Classpath Exception, which is available at
# https://www.gnu.org/software/classpath/license.html.
#
# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
#

#
#                       * * *    N O T E     * * *
#
# Although the lines in this file are formatted as environment
# variable assignments, this file is NOT typically invoked as a script
# from another script to define these variables.  Rather, this file is read
# and processed by a server as it starts up.  That scanning code resolves
# the relative paths against the GlassFish installation directory.
#
# Yet, this file is also where users of earlier versions have sometimes added
# a definition of AS_JAVA to control which version of Java GlassFish
# should use.  As a result, in order to run a user-specified version of Java,
# the asadmin and appclient scripts do indeed invoke this file as a
# script - but ONLY to define AS_JAVA.  Any calling script should not
# rely on the other settings because the relative paths will be resolved
# against the current directory when the calling script is run, not the
# installation directory of GlassFish, and such resolution will not work
# correctly unless the script happens to be run from the GlassFish installation
# directory.
#
# This file uses UTF-8 character encoding.

export AS_DERBY_INSTALL="${AS_DERBY_INSTALL:-$AS_INSTALL/../javadb}"
export AS_IMQ_LIB="${AS_IMQ_LIB:-$AS_INSTALL/../mq/lib}"
export AS_IMQ_BIN="${AS_IMQ_BIN:-$AS_INSTALL/../mq/bin}"

export AS_CONFIG="${AS_CONFIG:-$AS_INSTALL/config}"
export AS_DEF_DOMAINS_PATH="${AS_DEF_DOMAINS_PATH:-$AS_INSTALL/domains}"
export AS_DEF_NODES_PATH="${AS_DEF_NODES_PATH:-$AS_INSTALL/nodes}"

export ASADMIN_MODULEPATH="${AS_INSTALL}/lib/bootstrap"
export ASADMIN_JVM_OPTIONS="-Djava.util.logging.manager=org.glassfish.main.jul.GlassFishLogManager"
export ASADMIN_CLASSPATH="$AS_INSTALL/admin-cli.jar:$AS_INSTALL/lib/asadmin/*:$AS_INSTALL/modules/admin-util.jar:$AS_INSTALL/modules/backup.jar:$AS_INSTALL/modules/cluster-common.jar:$AS_INSTALL/modules/cluster-ssh.jar:$AS_INSTALL/modules/config-api.jar:$AS_INSTALL/modules/config-types.jar:$AS_INSTALL/modules/common-util.jar:$AS_INSTALL/modules/glassfish-api.jar:$AS_INSTALL/modules/hk2.jar:$AS_INSTALL/modules/hk2-config-generator.jar:$AS_INSTALL/modules/internal-api.jar:$AS_INSTALL/modules/jackson-core.jar:$AS_INSTALL/modules/jakarta.activation-api.jar:$AS_INSTALL/modules/jakarta.validation-api.jar:$AS_INSTALL/modules/jakarta.xml.bind-api.jar:$AS_INSTALL/modules/jaxb-osgi.jar:$AS_INSTALL/modules/jettison.jar:$AS_INSTALL/modules/jsch.jar:$AS_INSTALL/modules/launcher.jar:$AS_INSTALL/modules/mimepull.jar"
