From 6add3ce91e1d49244cb1cf80e07d248ff61e1fe5 Mon Sep 17 00:00:00 2001 From: Michael Nguyen <michael.nguyen@parivedasolutions.com> Date: Thu, 24 Oct 2019 15:21:24 -0500 Subject: [PATCH] updating wip. --- indexer-service-aws/pom.xml | 40 ++--- .../indexer/aws/IndexerAwsApplication.java | 14 ++ .../indexer/aws/ServerletInitializer.java | 11 ++ indexer-service-root/pom.xml | 24 ++- .../osdu/indexer/IndexerApplication.java | 8 +- pom.xml | 139 ++++++++---------- 6 files changed, 135 insertions(+), 101 deletions(-) create mode 100644 indexer-service-aws/src/main/java/org/opengroup/osdu/indexer/aws/IndexerAwsApplication.java create mode 100644 indexer-service-aws/src/main/java/org/opengroup/osdu/indexer/aws/ServerletInitializer.java diff --git a/indexer-service-aws/pom.xml b/indexer-service-aws/pom.xml index e3e4c90b3..be2416219 100644 --- a/indexer-service-aws/pom.xml +++ b/indexer-service-aws/pom.xml @@ -6,12 +6,12 @@ <groupId>org.opengroup.osdu.indexer</groupId> <artifactId>indexer-service</artifactId> <version>1.0-SNAPSHOT</version> + <relativePath>../pom.xml</relativePath> </parent> <groupId>org.opengroup.osdu.indexer.aws</groupId> <artifactId>indexer-service-aws</artifactId> <version>1.0-SNAPSHOT</version> <name>indexer-service-aws</name> - <url>http://maven.apache.org</url> <dependencies> <dependency> <groupId>org.opengroup.osdu.indexer</groupId> @@ -119,23 +119,23 @@ <version>6.6.2</version> </dependency> </dependencies> - <build> - <plugins> - <plugin> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-maven-plugin</artifactId> - <executions> - <execution> - <goals> - <goal>repackage</goal> - </goals> - <configuration> - <classifier>spring-boot</classifier> - <mainClass>org.opengroup.osdu.indexer.IndexerApplication</mainClass> - </configuration> - </execution> - </executions> - </plugin> - </plugins> - </build> + <build> + <plugins> + <plugin> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-maven-plugin</artifactId> + <executions> + <execution> + <goals> + <goal>repackage</goal> + </goals> + <configuration> + <classifier>spring-boot</classifier> + <mainClass>org.opengroup.osdu.indexer.aws.IndexerAwsApplication</mainClass> + </configuration> + </execution> + </executions> + </plugin> + </plugins> + </build> </project> diff --git a/indexer-service-aws/src/main/java/org/opengroup/osdu/indexer/aws/IndexerAwsApplication.java b/indexer-service-aws/src/main/java/org/opengroup/osdu/indexer/aws/IndexerAwsApplication.java new file mode 100644 index 000000000..6d4e96c97 --- /dev/null +++ b/indexer-service-aws/src/main/java/org/opengroup/osdu/indexer/aws/IndexerAwsApplication.java @@ -0,0 +1,14 @@ +package org.opengroup.osdu.indexer.aws; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.context.annotation.ComponentScan; + +@SpringBootApplication +@ComponentScan({"org.opengroup.osdu.is.core", "org.opengroup.osdu.indexer"}) +public class IndexerAwsApplication { + public static void main( String[] args ) + { + SpringApplication.run(IndexerAwsApplication.class, args); + } +} diff --git a/indexer-service-aws/src/main/java/org/opengroup/osdu/indexer/aws/ServerletInitializer.java b/indexer-service-aws/src/main/java/org/opengroup/osdu/indexer/aws/ServerletInitializer.java new file mode 100644 index 000000000..24cb8d109 --- /dev/null +++ b/indexer-service-aws/src/main/java/org/opengroup/osdu/indexer/aws/ServerletInitializer.java @@ -0,0 +1,11 @@ +package org.opengroup.osdu.indexer.aws; + +import org.springframework.boot.builder.SpringApplicationBuilder; +import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; + +public class ServerletInitializer extends SpringBootServletInitializer { + @Override + protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { + return application.sources(IndexerAwsApplication.class); + } +} diff --git a/indexer-service-root/pom.xml b/indexer-service-root/pom.xml index ef524baa0..ae49db544 100644 --- a/indexer-service-root/pom.xml +++ b/indexer-service-root/pom.xml @@ -6,6 +6,7 @@ <groupId>org.opengroup.osdu.indexer</groupId> <artifactId>indexer-service</artifactId> <version>1.0-SNAPSHOT</version> + <relativePath>../pom.xml</relativePath> </parent> <artifactId>indexer-service-root</artifactId> @@ -68,7 +69,8 @@ <dependency> <groupId>org.opengroup.osdu</groupId> <artifactId>indexer-search-core-lib</artifactId> - <version>1.0.7</version> + <version>1.0.9</version> + <scope>compile</scope> </dependency> <dependency> @@ -198,5 +200,23 @@ </dependency> </dependencies> - + <build> + <plugins> + <plugin> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-maven-plugin</artifactId> + <executions> + <execution> + <goals> + <goal>repackage</goal> + </goals> + <configuration> + <classifier>spring-boot</classifier> + <mainClass>org.opengroup.osdu.indexer.IndexerApplication</mainClass> + </configuration> + </execution> + </executions> + </plugin> + </plugins> + </build> </project> diff --git a/indexer-service-root/src/main/java/org/opengroup/osdu/indexer/IndexerApplication.java b/indexer-service-root/src/main/java/org/opengroup/osdu/indexer/IndexerApplication.java index 2a63fe944..b5af63210 100644 --- a/indexer-service-root/src/main/java/org/opengroup/osdu/indexer/IndexerApplication.java +++ b/indexer-service-root/src/main/java/org/opengroup/osdu/indexer/IndexerApplication.java @@ -1,9 +1,15 @@ package org.opengroup.osdu.indexer; import org.springframework.boot.SpringApplication; +import org.springframework.boot.actuate.autoconfigure.security.servlet.ManagementWebSecurityAutoConfiguration; import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration; +import org.springframework.context.annotation.ComponentScan; +import org.springframework.context.annotation.Configuration; -@SpringBootApplication +@Configuration +@SpringBootApplication(exclude = { SecurityAutoConfiguration.class, ManagementWebSecurityAutoConfiguration.class }) +@ComponentScan({"org.opengroup.osdu.is.core"}) public class IndexerApplication { public static void main( String[] args ) { diff --git a/pom.xml b/pom.xml index b9d866be7..870fb9c40 100644 --- a/pom.xml +++ b/pom.xml @@ -14,11 +14,12 @@ <packaging>pom</packaging> <version>1.0-SNAPSHOT</version> <description>Indexer Service</description> -<!-- <modules>--> -<!-- <module>indexer-service-root</module>--> + <modules> + <module>indexer-service-aws</module> + <module>indexer-service-root</module> <!-- <module>indexer-service-gcp</module>--> <!-- <module>indexer-service-azure</module>--> -<!-- </modules>--> + </modules> <properties> <java.version>1.8</java.version> @@ -48,61 +49,61 @@ </repository> </repositories> - <profiles> - <profile> - <id>root</id> - <activation> - <!-- this profile is active by default --> - <activeByDefault>true</activeByDefault> - </activation> - - <modules> - <module>indexer-service-root</module> - </modules> - </profile> - - <profile> - <id>aws</id> - <activation> - <property> - <name>vendor</name> - <value>aws</value> - </property> - </activation> - - <modules> - <module>indexer-service-aws</module> - </modules> - - </profile> - <profile> - <id>gcp</id> - <activation> - <property> - <name>vendor</name> - <value>gcp</value> - </property> - </activation> - - <modules> - <module>indexer-service-gcp</module> - </modules> - - </profile> - <profile> - <id>azure</id> - <activation> - <property> - <name>vendor</name> - <value>azure</value> - </property> - </activation> - - <modules> - <module>indexer-service-azure</module> - </modules> - - </profile> +<!-- <profiles>--> +<!-- <profile>--> +<!-- <id>root</id>--> +<!-- <activation>--> +<!-- <!– this profile is active by default –>--> +<!-- <activeByDefault>true</activeByDefault>--> +<!-- </activation>--> + +<!-- <modules>--> +<!-- <module>indexer-service-root</module>--> +<!-- </modules>--> +<!-- </profile>--> + +<!-- <profile>--> +<!-- <id>aws</id>--> +<!-- <activation>--> +<!-- <property>--> +<!-- <name>vendor</name>--> +<!-- <value>aws</value>--> +<!-- </property>--> +<!-- </activation>--> + +<!-- <modules>--> +<!-- <module>indexer-service-aws</module>--> +<!-- </modules>--> + +<!-- </profile>--> +<!-- <profile>--> +<!-- <id>gcp</id>--> +<!-- <activation>--> +<!-- <property>--> +<!-- <name>vendor</name>--> +<!-- <value>gcp</value>--> +<!-- </property>--> +<!-- </activation>--> + +<!-- <modules>--> +<!-- <module>indexer-service-gcp</module>--> +<!-- </modules>--> + +<!-- </profile>--> +<!-- <profile>--> +<!-- <id>azure</id>--> +<!-- <activation>--> +<!-- <property>--> +<!-- <name>vendor</name>--> +<!-- <value>azure</value>--> +<!-- </property>--> +<!-- </activation>--> + +<!-- <modules>--> +<!-- <module>indexer-service-azure</module>--> +<!-- </modules>--> + +<!-- </profile>--> <!-- <!– Unit test only –>--> <!-- <profile>--> @@ -128,7 +129,7 @@ <!-- <skip.unit.tests>false</skip.unit.tests>--> <!-- </properties>--> <!-- </profile>--> - </profiles> +<!-- </profiles>--> <dependencies> <dependency> <groupId>org.springframework.boot</groupId> @@ -150,23 +151,5 @@ <artifactId>spring-boot-starter-validation</artifactId> </dependency> </dependencies> - <build> - <plugins> - <plugin> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-maven-plugin</artifactId> - <executions> - <execution> - <goals> - <goal>repackage</goal> - </goals> - <configuration> - <classifier>spring-boot</classifier> - <mainClass>org.opengroup.osdu.indexer.IndexerApplication</mainClass> - </configuration> - </execution> - </executions> - </plugin> - </plugins> - </build> + </project> -- GitLab