From 58e82bfe01ebb01fbcbd95a799a2556acbb7d844 Mon Sep 17 00:00:00 2001
From: "bhill6@wisc.edu" <bhill6@wisc.edu>
Date: Fri, 22 Jul 2022 08:29:10 -0500
Subject: [PATCH] Changes to migrate deployment to gitlab,adding gitlab-ci file

---
 .gitlab-ci.yml                  | 34 +++++++++++++++++++++++++++++++++
 pom.xml                         |  4 ++++
 uw-spring-security-core/pom.xml | 10 +++++-----
 3 files changed, 43 insertions(+), 5 deletions(-)
 create mode 100644 .gitlab-ci.yml

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 0000000..fd64d2f
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,34 @@
+image: maven:3-amazoncorretto-8
+
+variables:
+  # This will suppress any download for dependencies and plugins or upload messages which would clutter the console log.
+  # `showDateTime` will show the passed time in milliseconds. You need to specify `--batch-mode` to make this work.
+  MAVEN_OPTS: "-Dmaven.repo.local=.m2/repository -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN -Dorg.slf4j.simpleLogger.showDateTime=true -Djava.awt.headless=true"
+  # As of Maven 3.3.0 instead of this you may define these options in `.mvn/maven.config` so the same config is used
+  # when running from the command line.
+  # `installAtEnd` and `deployAtEnd`are only effective with recent version of the corresponding plugins.
+  MAVEN_CLI_OPTS: "--settings .m2/settings.xml --batch-mode --errors --fail-at-end --show-version -DinstallAtEnd=true -DdeployAtEnd=true"
+
+# Cache downloaded dependencies and plugins between builds.
+# To keep cache across branches add 'key: "$CI_JOB_REF_NAME"'
+cache:
+  paths:
+    - .m2/repository
+
+default:
+  tags:
+    - aws
+    - docker
+
+test:
+  stage: test
+  script:
+    - mvn clean $MAVEN_CLI_OPTS verify
+
+deploy:
+  stage: deploy
+  only:
+    - master
+  script:
+    - env
+    - mvn $MAVEN_CLI_OPTS deploy -Pdeploy -X
diff --git a/pom.xml b/pom.xml
index 6800eb6..2f0b605 100644
--- a/pom.xml
+++ b/pom.xml
@@ -26,6 +26,10 @@
 			<id>adi-ia-libraries</id>
 			<url>https://git.doit.wisc.edu/api/v4/groups/15/-/packages/maven</url>
 		</repository>
+		<repository>
+			<id>uw-open-releases</id>
+			<url>https://artifacts.doit.wisc.edu/artifactory/maven-uw-open-releases</url>
+		</repository>
 	</repositories>
 
 	<properties>
diff --git a/uw-spring-security-core/pom.xml b/uw-spring-security-core/pom.xml
index c2b36d3..e7e3d49 100644
--- a/uw-spring-security-core/pom.xml
+++ b/uw-spring-security-core/pom.xml
@@ -18,10 +18,6 @@
 			<groupId>com.fasterxml.jackson.dataformat</groupId>
 			<artifactId>jackson-dataformat-yaml</artifactId>
 		</dependency>
-		<!--<dependency>
-			<groupId>edu.wisc.services.uds</groupId>
-    		<artifactId>uds-person-ws</artifactId>
-    	</dependency>-->
 		<dependency>
 			<groupId>edu.wisc.services.uds</groupId>
 			<artifactId>uds-person-client-java</artifactId>
@@ -72,5 +68,9 @@
 			<artifactId>spring-test</artifactId>
 			<scope>test</scope>
 		</dependency>
-	</dependencies>
+        <dependency>
+            <groupId>javax.annotation</groupId>
+            <artifactId>jsr250-api</artifactId>
+        </dependency>
+    </dependencies>
 </project>
\ No newline at end of file
-- 
GitLab