From 099ab436ed8acc41aaf93e7eb272566ea3807fb4 Mon Sep 17 00:00:00 2001 From: rrz516 Date: Thu, 10 Apr 2025 08:55:41 -0400 Subject: [PATCH] add ability to set mvn repo with env var --- README.md | 5 +++++ setup.py | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d26db4ce..b078cdb4 100644 --- a/README.md +++ b/README.md @@ -65,6 +65,11 @@ From the root of this repo, run: python setup.py download_jars python setup.py install +If you'd like to override the default search location for the jars, you can set the `KCL_MVN_REPO_SEARCH_URL` +environment variable to the location of the maven repository you'd like to use. + + export KCL_MVN_REPO_SEARCH_URL=https://path/to/maven/repo + Now the `amazon_kclpy` and [boto][boto] (used by the sample putter script) and required jars should be installed in your environment. To start the sample putter, run: diff --git a/setup.py b/setup.py index d83d3152..6ea1992f 100644 --- a/setup.py +++ b/setup.py @@ -115,7 +115,7 @@ def package_url(self, group_id, artifact_id, version): # Sample url: # https://search.maven.org/remotecontent?filepath=org/apache/httpcomponents/httpclient/4.2/httpclient-4.2.jar # - prefix = 'https://search.maven.org/remotecontent?filepath=' + prefix = os.getenv("KCL_MVN_REPO_SEARCH_URL", 'https://search.maven.org/remotecontent?filepath=') return '{prefix}{path}/{artifact_id}/{version}/{dest}'.format( prefix=prefix, path='/'.join(group_id.split('.')),