diff --git a/.gitignore b/.gitignore index c60fec97c8bae4a10e19d588dd814e6115bff85f..ca9c30474c250595093c18d7299b76d662d3d747 100644 --- a/.gitignore +++ b/.gitignore @@ -1,31 +1,8 @@ -indexer-service-root/HELP.md target/ -!.mvn/wrapper/maven-wrapper.jar -!**/src/main/** -!**/src/test/** - -### STS ### -.apt_generated -.classpath -.factorypath -.project -.settings -.springBeans -.sts4-cache +.mvn/wrapper/maven-wrapper.jar ### IntelliJ IDEA ### .idea *.iws *.iml *.ipr - -### NetBeans ### -/nbproject/private/ -/nbbuild/ -/dist/ -/nbdist/ -/.nb-gradle/ -build/ - -### VS Code ### -.vscode/ diff --git a/indexer-service-root/pom.xml b/indexer-service-root/pom.xml index 37e645ecbe9c0df245ea3ed8f2facac265c73664..22ef2961a0e206083f601d0a94d06d1545983154 100644 --- a/indexer-service-root/pom.xml +++ b/indexer-service-root/pom.xml @@ -23,18 +23,18 @@ <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-actuator</artifactId> </dependency> -<!-- <dependency>--> -<!-- <groupId>org.springframework.boot</groupId>--> -<!-- <artifactId>spring-boot-starter-data-jpa</artifactId>--> -<!-- </dependency>--> -<!-- <dependency>--> -<!-- <groupId>org.springframework.boot</groupId>--> -<!-- <artifactId>spring-boot-starter-data-redis</artifactId>--> -<!-- </dependency>--> -<!-- <dependency>--> -<!-- <groupId>org.springframework.boot</groupId>--> -<!-- <artifactId>spring-boot-starter-data-rest</artifactId>--> -<!-- </dependency>--> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-data-redis</artifactId> + </dependency> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-jersey</artifactId> + </dependency> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-oauth2-client</artifactId> + </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-security</artifactId> @@ -43,23 +43,77 @@ <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> - <dependency> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-devtools</artifactId> - <scope>runtime</scope> - <optional>true</optional> + <groupId>org.springframework.cloud</groupId> + <artifactId>spring-cloud-starter-oauth2</artifactId> </dependency> -<!-- <dependency>--> -<!-- <groupId>org.springframework.boot</groupId>--> -<!-- <artifactId>spring-boot-configuration-processor</artifactId>--> -<!-- <optional>true</optional>--> -<!-- </dependency>--> + <dependency> + <groupId>org.springframework.cloud</groupId> + <artifactId>spring-cloud-starter-security</artifactId> + </dependency> + <dependency> <groupId>org.projectlombok</groupId> <artifactId>lombok</artifactId> <optional>true</optional> </dependency> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-tomcat</artifactId> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>com.google.guava</groupId> + <artifactId>guava</artifactId> + <version>27.1-jre</version> + </dependency> + <dependency> + <groupId>com.google.code.gson</groupId> + <artifactId>gson</artifactId> + <version>2.8.5</version> + </dependency> + <dependency> + <groupId>commons-codec</groupId> + <artifactId>commons-codec</artifactId> + <version>1.12</version> + </dependency> + <dependency> + <groupId>com.fasterxml.jackson.core</groupId> + <artifactId>jackson-databind</artifactId> + <version>2.9.9.3</version> + </dependency> + <dependency> + <groupId>io.jsonwebtoken</groupId> + <artifactId>jjwt</artifactId> + <version>0.9.1</version> + <exclusions> + <exclusion> + <groupId>com.fasterxml.jackson.core</groupId> + <artifactId>jackson-databind</artifactId> + </exclusion> + </exclusions> + </dependency> + + <!-- https://mvnrepository.com/artifact/io.github.resilience4j/resilience4j-circuitbreaker --> + <dependency> + <groupId>io.github.resilience4j</groupId> + <artifactId>resilience4j-circuitbreaker</artifactId> + <version>0.17.0</version> + </dependency> + <!-- https://mvnrepository.com/artifact/io.github.resilience4j/resilience4j-retry --> + <dependency> + <groupId>io.github.resilience4j</groupId> + <artifactId>resilience4j-retry</artifactId> + <version>0.17.0</version> + </dependency> + <!-- https://mvnrepository.com/artifact/commons-lang/commons-lang --> + <dependency> + <groupId>commons-lang</groupId> + <artifactId>commons-lang</artifactId> + <version>2.6</version> + </dependency> + + <!-- Test Dependencies --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> @@ -70,8 +124,62 @@ <artifactId>spring-security-test</artifactId> <scope>test</scope> </dependency> + + <!-- Test Dependencies --> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>4.12</version> + <scope>test</scope> + </dependency> + <!-- https://mvnrepository.com/artifact/org.powermock/powermock-api-mockito2 --> + <dependency> + <groupId>org.powermock</groupId> + <artifactId>powermock-api-mockito2</artifactId> + <version>2.0.2</version> + <scope>test</scope> + </dependency> + <!-- https://mvnrepository.com/artifact/org.powermock/powermock-module-junit4 --> + <dependency> + <groupId>org.powermock</groupId> + <artifactId>powermock-module-junit4</artifactId> + <version>2.0.2</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.mockito</groupId> + <artifactId>mockito-core</artifactId> + <version>3.0.0</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.codehaus.mojo</groupId> + <artifactId>cobertura-maven-plugin</artifactId> + <version>2.7</version> + <scope>test</scope> + </dependency> + + <!-- https://mvnrepository.com/artifact/com.github.stefanbirkner/system-rules --> + <dependency> + <groupId>com.github.stefanbirkner</groupId> + <artifactId>system-rules</artifactId> + <version>1.2.0</version> + <scope>test</scope> + </dependency> </dependencies> + <dependencyManagement> + <dependencies> + <dependency> + <groupId>org.springframework.cloud</groupId> + <artifactId>spring-cloud-dependencies</artifactId> + <version>${spring-cloud.version}</version> + <type>pom</type> + <scope>import</scope> + </dependency> + </dependencies> + </dependencyManagement> + <build> <plugins> <plugin> diff --git a/pom.xml b/pom.xml index 41198a5661d0094402987348f1dea4c8931b79a3..01052a709b608bcd7751933dca296a2805322af7 100644 --- a/pom.xml +++ b/pom.xml @@ -23,6 +23,76 @@ <properties> <java.version>1.8</java.version> + <spring-cloud.version>Greenwich.SR2</spring-cloud.version> </properties> + + <profiles> + <profile> + <id>indexer-service-root</id> + <activation> + <!-- this profile is active by default --> + <activeByDefault>true</activeByDefault> + </activation> + + <modules> + <module>indexer-service-root</module> + </modules> + </profile> + + <profile> + <id>indexer-service-gcp</id> + <activation> + <property> + <name>vendor</name> + <value>gcp</value> + </property> + </activation> + + <modules> + <module>indexer-service-gcp</module> + </modules> + + </profile> + <profile> + <id>indexer-service-azure</id> + <activation> + <property> + <name>vendor</name> + <value>azure</value> + </property> + </activation> + + <modules> + <module>indexer-service-azure</module> + </modules> + + </profile> + + <!-- Unit test only --> + <profile> + <id>dev</id> + <properties> + <skip.unit.tests>false</skip.unit.tests> + <skip.integration.tests>true</skip.integration.tests> + </properties> + </profile> + <!-- Integration test only --> + <profile> + <id>integration-test</id> + <properties> + <skip.integration.tests>false</skip.integration.tests> + <skip.unit.tests>true</skip.unit.tests> + </properties> + </profile> + <!-- Unit and Integration tests combined --> + <profile> + <id>test-all</id> + <properties> + <skip.integration.tests>false</skip.integration.tests> + <skip.unit.tests>false</skip.unit.tests> + </properties> + </profile> + </profiles> + </project> \ No newline at end of file