diff --git a/DISCLAIMER b/DISCLAIMER-WIP similarity index 100% rename from DISCLAIMER rename to DISCLAIMER-WIP diff --git a/NOTICE b/NOTICE new file mode 100644 index 000000000..6a7d335aa --- /dev/null +++ b/NOTICE @@ -0,0 +1,9 @@ +Apache KIE +Copyright 2023 The Apache Software Foundation + +This product includes software developed at +The Apache Software Foundation (http://www.apache.org/). + +The Initial Developer of some parts of the framework, which are copied from, derived from, or +inspired by KIE (Knowledge Is Everthing) group, is Red Hat, Inc (https://www.redhat.com/). +Copyright Red Hat, Inc. and/or its affiliates.. All Rights Reserved. diff --git a/scripts/common.py b/scripts/common.py index e65129542..26592b361 100644 --- a/scripts/common.py +++ b/scripts/common.py @@ -430,6 +430,19 @@ def update_maven_repo_in_setup_maven(repo_url, replace_default_repository): replacement = 'export MAVEN_REPO_URL="{}"'.format(repo_url) update_in_file(SETUP_MAVEN_SCRIPT, pattern, replacement) +def update_maven_repos_in_setup_maven(repos_url): + """ + Update maven repositories into setup-maven.sh script + :param repos_url: Maven repositories urls + """ + repo_list = repos_url.split(',') + print("Set maven repos {} in setup-maven script".format(repo_list)) + pattern = re.compile(r'(# export MAVEN_REPO_URL=.*)') + replacement = f"export MAVEN_REPOS={','.join(['REPO_' + str(i) for i, _ in enumerate(repo_list)])}\n" + for i, value in enumerate(repo_list): + replacement += f"export REPO_{i}_MAVEN_REPO_URL={value}\n" + update_in_file(SETUP_MAVEN_SCRIPT, pattern, replacement) + def update_env_value(env_name, env_value): """ Update environment value into the given yaml module/image file diff --git a/scripts/update-repository.py b/scripts/update-repository.py index f854b37d9..48ad38d5d 100644 --- a/scripts/update-repository.py +++ b/scripts/update-repository.py @@ -32,6 +32,7 @@ if __name__ == "__main__": parser = argparse.ArgumentParser(description='Update Maven information in repo from the given artifact url and ' 'version.') + parser.add_argument('--repo-urls', dest='repo_urls', help='Defines the urls of the repositories to setup maven, comma (,) separated') parser.add_argument('--repo-url', dest='repo_url', help='Defines the url of the repository to setup into the tests') parser.add_argument('--replace-default-repo', dest='replace_default_repo', default=False, action='store_true', help='Enable if repo-url should replace the default repository') @@ -53,6 +54,9 @@ parser.add_argument('--tests-only', dest='tests_only', default=False, action='store_true', help='Update product modules/images') args = parser.parse_args() + if args.repo_urls: + common.update_maven_repos_in_setup_maven(args.repo_urls) + if args.repo_url: common.update_maven_repo_in_build_config(args.repo_url, args.replace_default_repo) common.update_maven_repo_in_setup_maven(args.repo_url, args.replace_default_repo)