From 171ca708988ae87e0d97253b70f09d1e5ad62c82 Mon Sep 17 00:00:00 2001
From: Kirk Rodrigues <2454684+kirkrodrigues@users.noreply.github.com>
Date: Mon, 22 Jul 2024 00:56:28 -0400
Subject: [PATCH] Install jar to a local repo properly rather than copying it
hackily.
---
Taskfile.yml | 13 ++++++++-----
integration-tests/jar-load-native-lib/pom.xml | 8 --------
2 files changed, 8 insertions(+), 13 deletions(-)
diff --git a/Taskfile.yml b/Taskfile.yml
index 94be218..5d1d919 100644
--- a/Taskfile.yml
+++ b/Taskfile.yml
@@ -31,12 +31,15 @@ tasks:
- task: "integration-tests"
integration-tests:
- deps: ["package"]
- vars:
- MAVEN_REPO_DIR: "{{.G_BUILD_DIR}}/repo/com/yscope/clp/clp-ffi/{{.G_PROJECT_VERSION}}"
+ env:
+ # Use a local directory for the Maven repo so that we can install the jar (for the integration
+ # tests to use) without affecting the user's environment.
+ # NOTE: Maven doesn't strip quotes around the value, but treats everything on the right hand
+ # side of the equals sign as the value; so we don't need to quote the path.
+ MAVEN_OPTS: "-Dmaven.repo.local={{.G_BUILD_DIR}}/repo"
cmds:
- - "mkdir -p '{{.MAVEN_REPO_DIR}}'"
- - "cp '{{.G_BUILD_DIR}}/clp-ffi-{{.G_PROJECT_VERSION}}.jar' '{{.MAVEN_REPO_DIR}}'"
+ # NOTE: Since we're using a custom repo-directory, this will end up rebuilding the package.
+ - "mvn install -DskipTests"
- |-
cd "integration-tests/jar-load-native-lib"
mvn compile
diff --git a/integration-tests/jar-load-native-lib/pom.xml b/integration-tests/jar-load-native-lib/pom.xml
index 0a70536..a06a2c3 100644
--- a/integration-tests/jar-load-native-lib/pom.xml
+++ b/integration-tests/jar-load-native-lib/pom.xml
@@ -15,14 +15,6 @@
1.8
-
-
- local
- local
- file://${project.basedir}/../../target/repo
-
-
-
com.yscope.clp