From db15900f4069dfd3c7b7d8f159019b59095140ba Mon Sep 17 00:00:00 2001 From: Mike Cobbett <77053+techcobweb@users.noreply.github.com> Date: Tue, 5 Nov 2024 15:34:53 +0000 Subject: [PATCH 1/2] list dependencies with a script Signed-off-by: Mike Cobbett <77053+techcobweb@users.noreply.github.com> --- list-dependencies.sh | 91 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100755 list-dependencies.sh diff --git a/list-dependencies.sh b/list-dependencies.sh new file mode 100755 index 0000000..f8c9cb9 --- /dev/null +++ b/list-dependencies.sh @@ -0,0 +1,91 @@ +#!/usr/bin/env bash + +# +# Copyright contributors to the Galasa project +# +# SPDX-License-Identifier: EPL-2.0 +# + +#----------------------------------------------------------------------------------------- +# +# Objectives: Build this repository code locally. +# +#----------------------------------------------------------------------------------------- + +# Where is this script executing from ? +BASEDIR=$(dirname "$0");pushd $BASEDIR 2>&1 >> /dev/null ;BASEDIR=$(pwd);popd 2>&1 >> /dev/null +# echo "Running from directory ${BASEDIR}" +export ORIGINAL_DIR=$(pwd) +# cd "${BASEDIR}" + +cd "${BASEDIR}/.." +PROJECT_DIR=$(pwd) + +#----------------------------------------------------------------------------------------- +# +# Set Colors +# +#----------------------------------------------------------------------------------------- +bold=$(tput bold) +underline=$(tput sgr 0 1) +reset=$(tput sgr0) +red=$(tput setaf 1) +green=$(tput setaf 76) +white=$(tput setaf 7) +tan=$(tput setaf 202) +blue=$(tput setaf 25) + +#----------------------------------------------------------------------------------------- +# +# Headers and Logging +# +#----------------------------------------------------------------------------------------- +underline() { printf "${underline}${bold}%s${reset}\n" "$@" ; } +h1() { printf "\n${underline}${bold}${blue}%s${reset}\n" "$@" ; } +h2() { printf "\n${underline}${bold}${white}%s${reset}\n" "$@" ; } +debug() { printf "${white}[.] %s${reset}\n" "$@" ; } +info() { printf "${white}[➜] %s${reset}\n" "$@" ; } +success() { printf "${white}[${green}✔${white}] ${green}%s${reset}\n" "$@" ; } +error() { printf "${white}[${red}✖${white}] ${red}%s${reset}\n" "$@" ; } +warn() { printf "${white}[${tan}➜${white}] ${tan}%s${reset}\n" "$@" ; } +bold() { printf "${bold}%s${reset}\n" "$@" ; } +note() { printf "\n${underline}${bold}${blue}Note:${reset} ${blue}%s${reset}\n" "$@" ; } + +#----------------------------------------------------------------------------------------- +# Functions +#----------------------------------------------------------------------------------------- +function usage { + info "Syntax: list-dependencies.sh [OPTIONS]" + cat << EOF +Lists all the dependencies in all the code in this repository. + +Options are: +-h | --help : Display this help text +--module The name of the module to start building from +--chain true/false/yes/no/y/n +EOF +} + +cd $BASEDIR/mvp + + +function process_maven_file() { + pom_filename=$1 + h2 "Listing dependencies for pom file $pom_filename" + mvn dependency:tree -f $pom_filename + success "OK" +} + +process_maven_file pom2.xml +process_maven_file pom3.xml +process_maven_file pom4.xml +process_maven_file pom5.xml +process_maven_file pom6.xml +process_maven_file pomDocs.xml +process_maven_file pomGalasactl.xml +process_maven_file pomJavaDoc.xml +process_maven_file pomZip.xml + + + + From 68f73c4f4bdf1622a075f05e76e57c90d2ee9838 Mon Sep 17 00:00:00 2001 From: Mike Cobbett <77053+techcobweb@users.noreply.github.com> Date: Wed, 13 Nov 2024 19:54:47 +0000 Subject: [PATCH 2/2] corrections to the script Signed-off-by: Mike Cobbett <77053+techcobweb@users.noreply.github.com> --- list-dependencies.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/list-dependencies.sh b/list-dependencies.sh index f8c9cb9..65e8563 100755 --- a/list-dependencies.sh +++ b/list-dependencies.sh @@ -8,7 +8,7 @@ #----------------------------------------------------------------------------------------- # -# Objectives: Build this repository code locally. +# Objectives: List dependencies of this repository # #----------------------------------------------------------------------------------------- @@ -60,9 +60,7 @@ function usage { Lists all the dependencies in all the code in this repository. Options are: --h | --help : Display this help text ---module The name of the module to start building from ---chain true/false/yes/no/y/n +n/a EOF }