#!/bin/bash
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements.  See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership.  The ASF licenses this file
# to you 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.
#


PROJECT_HOME=$(dirname $(cd $(dirname $0) && pwd))
#cd $PROJECT_HOME

java -cp $PROJECT_HOME/lib/${project.artifactId}-${project.version}-shaded.jar \
  -Drya.shell.home="${PROJECT_HOME}/" \
  -Dlog4j.configuration="file://$PROJECT_HOME/conf/log4j.properties" \
  org.springframework.shell.Bootstrap "$@"
  
# --profiles - Specifies values for the system property spring.profiles.active so that Spring 3.1 and greater profile support is enabled.
# --cmdfile - Specifies a file to read that contains shell commands
# --histsize - Specifies the maximum number of lines to store in the command history file. Default value is 3000.
# --disableInternalCommands - Flag that disables all commands that would be pre-registered with the shell. There is no argument to this option. You can selectively add back any internal commands by referencing them in your shell plugin file. Look at the Spring Shell javadocs for specific commands located in the org.springframework.shell.commands package as well as the section in this documentation of Built in commands.
