Change Project to run as Spring Boot

This commit is contained in:
YuCheng Hu 2022-08-11 12:55:28 -04:00
parent 3defc87a90
commit eb1f958e06
2 changed files with 544 additions and 577 deletions

View File

@ -19,19 +19,12 @@
<staplerFork>true</staplerFork> <staplerFork>true</staplerFork>
<stapler.version>1.250</stapler.version> <stapler.version>1.250</stapler.version>
<spring.version>2.5.6.SEC03</spring.version> <spring.version>2.5.6.SEC03</spring.version>
<groovy.version>2.4.11</groovy.version>
<!-- TODO: Actually many issues are being filtered by src/findbugs/findbugs-excludes.xml --> <!-- TODO: Actually many issues are being filtered by src/findbugs/findbugs-excludes.xml -->
<findbugs.failOnError>true</findbugs.failOnError> <findbugs.failOnError>true</findbugs.failOnError>
</properties> </properties>
<dependencies> <dependencies>
<!-- LOG -->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
<version>2.11.0</version>
</dependency>
<!-- TEST --> <!-- TEST -->
<dependency> <dependency>
<groupId>junit</groupId> <groupId>junit</groupId>
@ -118,6 +111,30 @@
</dependency> </dependency>
<!-- /UTILITIES --> <!-- /UTILITIES -->
<!-- SPRING -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-autoconfigure</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-oauth2-client</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-oauth2-jose</artifactId>
</dependency>
<!--/CLOUDS --> <!--/CLOUDS -->
<dependency> <dependency>

148
pom.xml
View File

@ -8,7 +8,14 @@
<version>0.1.0</version> <version>0.1.0</version>
<packaging>pom</packaging> <packaging>pom</packaging>
<name>USVisaTrack main module</name> <parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.4.13</version>
</parent>
<name>USVisaTrack Main</name>
<description>The module that constitutes the main USVisaTrack data process system</description> <description>The module that constitutes the main USVisaTrack data process system</description>
<licenses> <licenses>
@ -61,12 +68,12 @@
<maven-plugin.version>2.14</maven-plugin.version> <maven-plugin.version>2.14</maven-plugin.version>
<matrix-project.version>1.4.1</matrix-project.version> <matrix-project.version>1.4.1</matrix-project.version>
<sorcerer.version>0.11</sorcerer.version> <sorcerer.version>0.11</sorcerer.version>
<animal.sniffer.skip>${skipTests}</animal.sniffer.skip>
<findbugs-maven-plugin.version>3.0.4</findbugs-maven-plugin.version> <findbugs-maven-plugin.version>3.0.4</findbugs-maven-plugin.version>
<findbugs.failOnError>true</findbugs.failOnError> <findbugs.failOnError>true</findbugs.failOnError>
<test-annotations.version>1.2</test-annotations.version> <test-annotations.version>1.2</test-annotations.version>
<access-modifier.version>1.11</access-modifier.version> <access-modifier.version>1.11</access-modifier.version>
<access-modifier-annotation.version>${access-modifier.version}</access-modifier-annotation.version> <!-- differing only where needed for timestamped snapshots --> <access-modifier-annotation.version>${access-modifier.version}
</access-modifier-annotation.version> <!-- differing only where needed for timestamped snapshots -->
<access-modifier-checker.version>${access-modifier.version}</access-modifier-checker.version> <access-modifier-checker.version>${access-modifier.version}</access-modifier-checker.version>
<java.level>8</java.level> <java.level>8</java.level>
@ -77,18 +84,9 @@
<!-- Note that the 'repositories' and 'pluginRepositories' blocks below are actually copy-pasted from the Jenkins org pom. This is on purpose <!-- Note that the 'repositories' and 'pluginRepositories' blocks below are actually copy-pasted from the Jenkins org pom. This is on purpose
to keep jenkins core buildable even if one has *not* defined the specific details in the settings.xml file. --> to keep jenkins core buildable even if one has *not* defined the specific details in the settings.xml file. -->
<repositories> <repositories>
<repository>
<id>repo.jenkins-ci.org</id>
<url>http://repo.jenkins-ci.org/public/</url>
<!-- allow snapshots -->
</repository>
</repositories> </repositories>
<pluginRepositories> <pluginRepositories>
<pluginRepository>
<id>repo.jenkins-ci.org</id>
<url>http://repo.jenkins-ci.org/public/</url>
</pluginRepository>
</pluginRepositories> </pluginRepositories>
<dependencyManagement> <dependencyManagement>
@ -107,6 +105,7 @@
</dependencyManagement> </dependencyManagement>
<dependencies> <dependencies>
<!-- LOGGING WITH SELF4J AND LOG4J2 --> <!-- LOGGING WITH SELF4J AND LOG4J2 -->
<dependency> <dependency>
<groupId>org.slf4j</groupId> <groupId>org.slf4j</groupId>
@ -185,7 +184,33 @@
<version>1.6.2</version> <version>1.6.2</version>
</dependency> </dependency>
<!-- SPRING -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-autoconfigure</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-batch</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-oauth2-client</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-oauth2-jose</artifactId>
</dependency>
<!-- UTILITIES --> <!-- UTILITIES -->
<dependency> <dependency>
@ -233,9 +258,6 @@
<version>3.0.1-b08</version> <version>3.0.1-b08</version>
</dependency> </dependency>
<!-- TEST --> <!-- TEST -->
<dependency> <dependency>
<groupId>junit</groupId> <groupId>junit</groupId>
@ -267,6 +289,10 @@
</resources> </resources>
<pluginManagement> <pluginManagement>
<plugins> <plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId> <artifactId>maven-deploy-plugin</artifactId>
@ -322,7 +348,8 @@
<artifactId>maven-surefire-plugin</artifactId> <artifactId>maven-surefire-plugin</artifactId>
<version>2.20</version> <version>2.20</version>
<configuration> <configuration>
<argLine>-noverify</argLine> <!-- some versions of JDK7/8 causes VerifyError during mock tests: http://code.google.com/p/powermock/issues/detail?id=504 --> <argLine>-noverify
</argLine> <!-- some versions of JDK7/8 causes VerifyError during mock tests: http://code.google.com/p/powermock/issues/detail?id=504 -->
<systemPropertyVariables> <systemPropertyVariables>
<java.io.tmpdir>${project.build.directory}</java.io.tmpdir> <java.io.tmpdir>${project.build.directory}</java.io.tmpdir>
<forkedProcessTimeoutInSeconds>3600</forkedProcessTimeoutInSeconds> <forkedProcessTimeoutInSeconds>3600</forkedProcessTimeoutInSeconds>
@ -337,40 +364,13 @@
<artifactId>maven-assembly-plugin</artifactId> <artifactId>maven-assembly-plugin</artifactId>
<version>2.5.5</version> <version>2.5.5</version>
</plugin> </plugin>
<plugin>
<artifactId>maven-jarsigner-plugin</artifactId>
<version>1.2</version>
<configuration>
<!-- during the development, debug profile will cause the jars to be signed by a self-certified dummy public key. For release, you should
define the real values in ~/.m2/settings.xml -->
<alias>${hudson.sign.alias}</alias>
<storepass>${hudson.sign.storepass}</storepass>
<keystore>${hudson.sign.keystore}</keystore>
</configuration>
</plugin>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId> <artifactId>maven-resources-plugin</artifactId>
<version>2.6</version> <version>2.6</version>
</plugin> </plugin>
<plugin>
<!-- Both test harness and core uses stapler as an extension, and apparently without having extension preloaded at the parent, the main
artifact of the 'test' module ends up installed with 'stapler-jar' extension (which normally is an indication that the ArtifactTypeHandler defined
in this extension is not getting picked up.) To avoid this problem, I'm defining an extension here. Not sure if the nested <dependencies> is
necessary. It's also possible that I misdiagnosed the problem and the root cause is something entirely different. To test if you can remove this
work around, do a rebuild from main and see if the test harness is installed with the right extension into the local repository. -->
<groupId>org.kohsuke.stapler</groupId>
<artifactId>maven-stapler-plugin</artifactId>
<!-- version specified in grandparent pom -->
<extensions>true</extensions>
<dependencies>
<dependency>
<groupId>org.jvnet.maven-jellydoc-plugin</groupId>
<artifactId>maven-jellydoc-plugin</artifactId>
<version>1.4</version>
</dependency>
</dependencies>
</plugin>
<plugin> <plugin>
<groupId>org.kohsuke</groupId> <groupId>org.kohsuke</groupId>
<artifactId>access-modifier-checker</artifactId> <artifactId>access-modifier-checker</artifactId>
@ -472,21 +472,6 @@
</pluginManagement> </pluginManagement>
<plugins> <plugins>
<plugin>
<artifactId>maven-remote-resources-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>process</goal>
</goals>
<configuration>
<resourceBundles>
<resourceBundle>org.jvnet.hudson:license:1.0</resourceBundle>
</resourceBundles>
</configuration>
</execution>
</executions>
</plugin>
<plugin> <plugin>
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
@ -526,13 +511,7 @@
<id>metrics</id> <id>metrics</id>
<build> <build>
<plugins> <plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<configuration>
<threshold>High</threshold>
</configuration>
</plugin>
</plugins> </plugins>
</build> </build>
</profile> </profile>
@ -541,31 +520,16 @@
<id>sorcerer</id> <id>sorcerer</id>
<reporting> <reporting>
<plugins> <plugins>
<plugin>
<groupId>org.kohsuke.sorcerer</groupId>
<artifactId>maven-sorcerer-plugin</artifactId>
<version>${sorcerer.version}</version>
<configuration>
<source>1.${java.level}</source>
</configuration>
</plugin>
</plugins> </plugins>
</reporting> </reporting>
<build> <build>
<plugins> <plugins>
<plugin>
<groupId>org.kohsuke.sorcerer</groupId>
<artifactId>maven-sorcerer-plugin</artifactId>
<version>${sorcerer.version}</version>
<configuration>
<source>1.${java.level}</source>
</configuration>
</plugin>
</plugins> </plugins>
</build> </build>
</profile> </profile>
<profile> <profile>
<id>m2e</id> <id>m2e</id>
<properties> <properties>
@ -579,21 +543,7 @@
<build> <build>
<directory>${m2BuildDirectory}</directory> <directory>${m2BuildDirectory}</directory>
<plugins> <plugins>
<plugin>
<groupId>org.maven.ide.eclipse</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>0.12.0</version>
<configuration>
<mappingId>customizable</mappingId>
<configurators>
<configurator id="org.maven.ide.eclipse.jdt.javaConfigurator" />
<configurator id="org.maven.ide.eclipse.plexus.annotations.plexusConfigurator" />
</configurators>
<mojoExecutions>
<mojoExecution>org.apache.maven.plugins:maven-resources-plugin::</mojoExecution>
</mojoExecutions>
</configuration>
</plugin>
</plugins> </plugins>
</build> </build>
</profile> </profile>