diff options
author | Kajur, Harish (vk250x) <vk250x@att.com> | 2018-08-12 23:40:04 -0400 |
---|---|---|
committer | Kajur, Harish (vk250x) <vk250x@att.com> | 2018-08-13 02:49:05 -0400 |
commit | 538aad3add38a0ce4ef6ac25333d50bba7b05ac5 (patch) | |
tree | b0155c033b80bb6d6d316bd92cd5f280e4542e56 /aai-resources/pom.xml | |
parent | 96b7ed4bff9a2259f1f28f288caa6cc11c97db59 (diff) |
Update resources ms to use ingest library
Change the code to replace ModelIngestor
with the NodeIngestor and replace the EdgeRules
with the EdgeIngestor and EdgeSerializer
Edge Ingestor for getting the rules from json files
Edge Serializer for creating the edges between vertexes
Node Ingestor is responsible for the multiple oxm files
Issue-ID: AAI-1462
Change-Id: I555916911dc4076ac017173d63478b3b76b36e42
Signed-off-by: Kajur, Harish (vk250x) <vk250x@att.com>
Diffstat (limited to 'aai-resources/pom.xml')
-rw-r--r-- | aai-resources/pom.xml | 385 |
1 files changed, 229 insertions, 156 deletions
diff --git a/aai-resources/pom.xml b/aai-resources/pom.xml index b2afe70..be6acd2 100644 --- a/aai-resources/pom.xml +++ b/aai-resources/pom.xml @@ -26,29 +26,22 @@ <groupId>org.onap.aai.resources</groupId> <artifactId>aai-resources</artifactId> <version>1.3.0-SNAPSHOT</version> - <parent> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-starter-parent</artifactId> - <version>1.5.12.RELEASE</version> + <groupId>org.onap.aai.resources</groupId> + <artifactId>resources</artifactId> + <version>1.3.0-SNAPSHOT</version> </parent> - <properties> - <swagger.directory>${basedir}/target/classes/META-INF/resources/swagger</swagger.directory> - <icd.file>service.json</icd.file> - <icd.package>com.att.ajsc.ajsc6configdemo.service.rs</icd.package> <java.version>1.8</java.version> - <build.number>local</build.number> - <kube.namespace>org-onap-aai</kube.namespace> - <service.account>ajsc-svc-account</service.account> - <namespace>com.att.ajsc</namespace> <start-class>org.onap.aai.ResourcesApp</start-class> - <aai-schema.version>1.3.0-SNAPSHOT</aai-schema.version> + <aai.schema.version>1.3.0-SNAPSHOT</aai.schema.version> <aai.core.version>1.3.0-SNAPSHOT</aai.core.version> - + <aai.schema.ingest.version>1.3.0-SNAPSHOT</aai.schema.ingest.version> <hbase.version>1.0.2</hbase.version> + <spring.boot.version>1.5.12.RELEASE</spring.boot.version> + <!-- Start of the jacoco plugin properties --> <sonar.language>java</sonar.language> <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin> @@ -58,7 +51,6 @@ <sonar.projectVersion>${project.version}</sonar.projectVersion> <!-- End of the jacoco plugin properties --> - <jolt.version>0.0.24</jolt.version> <jopt.simple.version>4.9</jopt.simple.version> <io.swagger.version>1.5.8</io.swagger.version> @@ -77,12 +69,14 @@ <eelf.core.version>1.0.0</eelf.core.version> <logback.version>1.2.3</logback.version> <hamcrest.junit.version>2.0.0.0</hamcrest.junit.version> + <junit.version>4.12</junit.version> <janino.version>2.7.8</janino.version> - <google.guava.version>16.0</google.guava.version> + <google.guava.version>19.0</google.guava.version> <janusgraph.version>0.2.0</janusgraph.version> <gremlin.driver.version>3.2.2</gremlin.driver.version> <gremlin.core.version>3.2.2</gremlin.core.version> <gremlin.version>3.2.2</gremlin.version> + <groovy.version>2.4.4</groovy.version> <hbase.version>1.0.2</hbase.version> <smack.version>3.0.4</smack.version> <json.simple.version>1.1.1</json.simple.version> @@ -120,38 +114,43 @@ <!-- Location where assembly of our scripts, resources and main jar will be held - Check the aai-resources/src/main/assembly/descriptor.xml for more info + Check the ${project.artifactId}/src/main/assembly/descriptor.xml for more info --> <aai.build.directory>${project.build.directory}/${project.artifactId}-${project.version}-build/ </aai.build.directory> <aai.docker.namespace>onap</aai.docker.namespace> - <maven.skip.tests>true</maven.skip.tests> - <spring.web.version>4.3.6.RELEASE</spring.web.version> - <aai.project.version>1.3.0</aai.project.version> - <aai.docker.version>1.3</aai.docker.version> + <maven.skip.tests>true</maven.skip.tests> + <snapshot.file>${project.basedir}/snapshots/snapshot.graphson</snapshot.file> - <!-- - Nexus Proxy Properties and Snapshot Locations - Ideally this can be overwritten at runtime per internal environment specific values at runtime - --> - <nexusproxy>https://nexus.onap.org</nexusproxy> - <site.path>/content/sites/site/org/onap/aai/resources/${project.artifactId}/${project.version}</site.path> - <release.path>/content/repositories/releases/</release.path> - <snapshot.path>/content/repositories/snapshots/</snapshot.path> + <license.goal.type>check</license.goal.type> + <jacoco.line.coverage.limit>0.68</jacoco.line.coverage.limit> + <spring.web.version>4.3.6.RELEASE</spring.web.version> <netty.handler.version>4.1.9.Final</netty.handler.version> <netty.version>4.0.37.Final</netty.version> - <jackson.core.version>2.8.11.1</jackson.core.version> - <groovy.version>2.4.4</groovy.version> - <spring.test.version>4.3.6.RELEASE</spring.test.version> <!-- This will be used for the docker images as the default format of maven build has issues --> <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format> + <javadoc.plugin.version>2.10.4</javadoc.plugin.version> - <license.goal.type>check</license.goal.type> - <jacoco.line.coverage.limit>0.55</jacoco.line.coverage.limit> + <!-- Start of Default ONAP Schema Properties --> + <schema.source.name>onap</schema.source.name> + <schema.configuration.location>N/A</schema.configuration.location> + <schema.nodes.location>${project.basedir}/src/main/resources/schema/${schema.source.name}/oxm</schema.nodes.location> + <schema.edges.location>${project.basedir}/src/main/resources/schema/${schema.source.name}/dbedgerules</schema.edges.location> + <schema.version.depth.start>v9</schema.version.depth.start> + <schema.version.related.link.start>v10</schema.version.related.link.start> + <schema.version.app.root.start>v11</schema.version.app.root.start> + <schema.version.namespace.change.start>v12</schema.version.namespace.change.start> + <schema.version.edge.label.start>v12</schema.version.edge.label.start> + <schema.version.api.default>v14</schema.version.api.default> + <schema.version.list>v8,v9,v10,v11,v12,v13,v14</schema.version.list> + <schema.uri.base.path>/aai</schema.uri.base.path> + <!-- End of Default ONAP Schema Properties --> + + <!-- Setting some default value to not complain by editor but it will be overridden by gmaven plugin --> </properties> <profiles> <!-- Docker profile to be used for building docker image and pushing to nexus --> @@ -168,13 +167,13 @@ <apiVersion>1.23</apiVersion> <images> <image> - <name>${docker.push.registry}/${aai.docker.namespace}/aai-resources:%l</name> + <name>${docker.push.registry}/${aai.docker.namespace}/${project.artifactId}:%l</name> <build> <filter>@</filter> <tags> <tag>latest</tag> - <tag>${aai.docker.version}-STAGING-${maven.build.timestamp}</tag> - <tag>${aai.docker.version}-STAGING-latest</tag> + <tag>${project.docker.latesttag.version}</tag> + <tag>${project.major.version}.${project.minor.version}-STAGING-${maven.build.timestamp}</tag> </tags> <cleanup>try</cleanup> <dockerFileDir>${project.basedir}/src/main/docker</dockerFileDir> @@ -222,11 +221,16 @@ </plugins> </build> </profile> - <!-- - Use of this profile is a way to support legacy runAjsc profile seen using AJSC 2 - and also because spring-boot:run doesn't work with large classpaths in windows - so this accommodates the behavior of running the application from maven - --> + <!-- Start of ONAP Profile --> + <profile> + <id>onap</id> + <properties> + <schema.source.name>onap</schema.source.name> + <schema.version.namespace.change.start>v12</schema.version.namespace.change.start> + <schema.version.list>v8,v9,v10,v11,v12,v13,v14</schema.version.list> + </properties> + </profile> + <!-- End of ONAP Profile --> <profile> <id>runAjsc</id> <properties> @@ -251,10 +255,58 @@ <configuration> <mainClass>${start-class}</mainClass> <systemProperties> - <systemProperty> + <property> <key>snapshot.location</key> <value>${snapshot.file}</value> - </systemProperty> + </property> + <property> + <key>schema.source.name</key> + <value>${schema.source.name}</value> + </property> + <property> + <key>schema.configuration.location</key> + <value>${schema.configuration.location}</value> + </property> + <property> + <key>schema.nodes.location</key> + <value>${schema.nodes.location}</value> + </property> + <property> + <key>schema.edges.location</key> + <value>${schema.edges.location}</value> + </property> + <property> + <key>schema.version.depth.start</key> + <value>${schema.version.depth.start}</value> + </property> + <property> + <key>schema.version.related.link.start</key> + <value>${schema.version.related.link.start}</value> + </property> + <property> + <key>schema.version.app.root.start</key> + <value>${schema.version.app.root.start}</value> + </property> + <property> + <key>schema.version.namespace.change.start</key> + <value>${schema.version.namespace.change.start}</value> + </property> + <property> + <key>schema.version.edge.label.start</key> + <value>${schema.version.edge.label.start}</value> + </property> + <property> + <key>schema.version.api.default</key> + <value>${schema.version.api.default}</value> + </property> + <property> + <key>schema.version.list</key> + <value>${schema.version.list}</value> + </property> + <property> + <key>schema.uri.base.path</key> + <value>${schema.uri.base.path}</value> + </property> </systemProperties> <executable>java</executable> </configuration> @@ -263,22 +315,19 @@ </build> </profile> </profiles> + <dependencyManagement> + <dependencies> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-parent</artifactId> + <version>${spring.boot.version}</version> + <type>pom</type> + <scope>import</scope> + </dependency> + </dependencies> + </dependencyManagement> <dependencies> <dependency> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-starter-jersey</artifactId> - <exclusions> - <exclusion> - <groupId>com.sun.jersey</groupId> - <artifactId>jersey-servlet</artifactId> - </exclusion> - <exclusion> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-starter-tomcat</artifactId> - </exclusion> - </exclusions> - </dependency> - <dependency> <groupId>net.sf.jopt-simple</groupId> <artifactId>jopt-simple</artifactId> <version>${jopt.simple.version}</version> @@ -300,6 +349,17 @@ <version>${io.swagger.version}</version> </dependency> <dependency> + <groupId>commons-configuration</groupId> + <artifactId>commons-configuration</artifactId> + <version>${commons.configuration.version}</version> + <exclusions> + <exclusion> + <artifactId>commons-lang</artifactId> + <groupId>commons-lang</groupId> + </exclusion> + </exclusions> + </dependency> + <dependency> <groupId>io.swagger</groupId> <artifactId>swagger-jersey-jaxrs</artifactId> <version>${io.swagger.version}</version> @@ -335,17 +395,6 @@ </exclusions> </dependency> <dependency> - <groupId>commons-configuration</groupId> - <artifactId>commons-configuration</artifactId> - <version>${commons.configuration.version}</version> - <exclusions> - <exclusion> - <artifactId>commons-lang</artifactId> - <groupId>commons-lang</groupId> - </exclusion> - </exclusions> - </dependency> - <dependency> <groupId>commons-lang</groupId> <artifactId>commons-lang</artifactId> <version>${commons.lang.version}</version> @@ -379,6 +428,7 @@ <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> + <version>${junit.version}</version> <scope>test</scope> </dependency> <dependency> @@ -409,6 +459,17 @@ </exclusions> </dependency> <dependency> + <groupId>org.janusgraph</groupId> + <artifactId>janusgraph-cql</artifactId> + <version>${janusgraph.version}</version> + <exclusions> + <exclusion> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-log4j12</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> <groupId>org.apache.tinkerpop</groupId> <artifactId>tinkergraph-gremlin</artifactId> <version>${gremlin.version}</version> @@ -492,18 +553,6 @@ <scope>compile</scope> </dependency> <dependency> - <groupId>org.powermock</groupId> - <artifactId>powermock-module-javaagent</artifactId> - <version>${powermock.version}</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.powermock</groupId> - <artifactId>powermock-module-junit4-rule-agent</artifactId> - <version>${powermock.version}</version> - <scope>test</scope> - </dependency> - <dependency> <groupId>com.github.fge</groupId> <artifactId>json-patch</artifactId> <version>${json.patch.version}</version> @@ -535,11 +584,6 @@ </exclusions> </dependency> <dependency> - <groupId>com.bazaarvoice.jolt</groupId> - <artifactId>jolt-complete</artifactId> - <version>${jolt.version}</version> - </dependency> - <dependency> <groupId>com.jayway.jsonpath</groupId> <artifactId>json-path</artifactId> <version>${json.path.version}</version> @@ -574,9 +618,10 @@ </dependency> <dependency> <groupId>org.onap.aai.aai-common</groupId> - <artifactId>aai-schema</artifactId> - <version>${aai-schema.version}</version> + <artifactId>aai-schema-ingest</artifactId> + <version>${aai.schema.ingest.version}</version> </dependency> + <dependency> <groupId>org.springframework</groupId> <artifactId>spring-jms</artifactId> @@ -597,10 +642,6 @@ <version>${httpclient.version}</version> </dependency> <dependency> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-devtools</artifactId> - </dependency> - <dependency> <groupId>org.skyscreamer</groupId> <artifactId>jsonassert</artifactId> <version>${jsonassert.version}</version> @@ -645,6 +686,10 @@ <artifactId>spring-boot-starter-jetty</artifactId> </dependency> <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-jersey</artifactId> + </dependency> + <dependency> <groupId>org.springframework</groupId> <artifactId>spring-web</artifactId> <version>${spring.web.version}</version> @@ -692,8 +737,7 @@ <include>logback.xml</include> <include>localhost-access-logback.xml</include> </includes> - <targetPath>${project.build.directory}/swm/package/nix/dist_files/opt/app/aai-resources/appconfig - </targetPath> + <targetPath>${project.build.directory}/swm/package/nix/dist_files/opt/app/${project.artifactId}/appconfig</targetPath> <filtering>false</filtering> </resource> <resource> @@ -710,8 +754,7 @@ <include>janusgraph-cached.properties</include> <include>aaiconfig.properties</include> </includes> - <targetPath>${project.build.directory}/swm/package/nix/dist_files/opt/app/aai-resources/appconfig - </targetPath> + <targetPath>${project.build.directory}/swm/package/nix/dist_files/opt/app/${project.artifactId}/appconfig</targetPath> <filtering>false</filtering> </resource> <resource> @@ -721,8 +764,7 @@ <include>tomcat_keystore</include> <include>aai_policy.json</include> </includes> - <targetPath>${project.build.directory}/swm/package/nix/dist_files/opt/app/aai-resources/appconfig - </targetPath> + <targetPath>${project.build.directory}/swm/package/nix/dist_files/opt/app/${project.artifactId}/appconfig</targetPath> <filtering>true</filtering> </resource> <resource> @@ -730,12 +772,21 @@ <includes> <include>logback.xml</include> <include>localhost-access-logback.xml</include> + <include>hbase-site.xml</include> </includes> - <targetPath>${project.build.directory}/swm/package/nix/dist_files/opt/app/aai-resources/appconfig - </targetPath> + <targetPath>${project.build.directory}/swm/package/nix/dist_files/opt/app/${project.artifactId}/appconfig</targetPath> <filtering>true</filtering> </resource> <resource> + <directory>${project.basedir}/src/main/resources/schema/</directory> + <includes> + <include>**/oxm/**/*.xml</include> + <include>**/dbedgerules/**/*.json</include> + </includes> + <targetPath>${project.build.directory}/swm/package/nix/dist_files/opt/app/${project.artifactId}/appconfig/schema</targetPath> + <filtering>false</filtering> + </resource> + <resource> <directory>${project.basedir}/src/main/docker</directory> <includes> <include>**/*</include> @@ -743,6 +794,14 @@ <targetPath>${aai.build.directory}</targetPath> <filtering>true</filtering> </resource> + <resource> + <directory>${project.build.directory}/</directory> + <includes> + <include>${project.artifactId}-${project.version}.jar</include> + </includes> + <targetPath>${aai.build.directory}/lib/</targetPath> + <filtering>false</filtering> + </resource> </resources> <pluginManagement> <plugins> @@ -762,9 +821,28 @@ <artifactItem> <groupId>org.onap.aai.aai-common</groupId> <artifactId>aai-schema</artifactId> - <version>${aai.core.version}</version> - <outputDirectory>${project.basedir}/src/main/resources/etc/</outputDirectory> - <includes>oxm/*.xml</includes> + <version>${aai.schema.version}</version> + <outputDirectory>${project.basedir}/src/main/resources/schema/</outputDirectory> + <includes>**/oxm/**/*.xml</includes> + </artifactItem> + </artifactItems> + <!-- other configurations here --> + </configuration> + </execution> + <execution> + <id>unpack-edgerules-dependency</id> + <phase>initialize</phase> + <goals> + <goal>unpack</goal> + </goals> + <configuration> + <artifactItems> + <artifactItem> + <groupId>org.onap.aai.aai-common</groupId> + <artifactId>aai-schema</artifactId> + <version>${aai.schema.version}</version> + <outputDirectory>${project.basedir}/src/main/resources/schema/</outputDirectory> + <includes>**/dbedgerules/**/*.json</includes> </artifactItem> </artifactItems> <!-- other configurations here --> @@ -790,18 +868,39 @@ versionArray = project.properties['aai.project.version'].split('\\.'); } - if (project.properties['aai.project.version'].endsWith("-SNAPSHOT")) { - project.properties['project.docker.latesttag.version'] = versionArray[0] + '.' + versionArray[1] + "-SNAPSHOT-latest"; - } else { - project.properties['project.docker.latesttag.version'] = versionArray[0] + '.' + versionArray[1] + "-STAGING-latest"; - } - + project.properties["project.major.version"] = versionArray[0]; + project.properties["project.minor.version"] = versionArray[1]; + project.properties['project.docker.latesttag.version'] = versionArray[0] + '.' + versionArray[1] + '-STAGING-latest'; println 'New Tag for docker:' + project.properties['project.docker.latesttag.version']; </source> </configuration> </execution> </executions> </plugin> + <plugin> + <groupId>com.mycila</groupId> + <artifactId>license-maven-plugin</artifactId> + <version>3.0</version> + <configuration> + <header>LICENSE.TXT</header> + <includes> + <include>src/main/java/**</include> + <include>src/test/java/**</include> + <include>pom.xml</include> + </includes> + <skipExistingHeaders>false</skipExistingHeaders> + <skip>false</skip> + </configuration> + <executions> + <execution> + <goals> + <!-- Set goal to "format" to auto update license headers --> + <goal>${license.goal.type}</goal> + </goals> + <phase>process-sources</phase> + </execution> + </executions> + </plugin> </plugins> </pluginManagement> <plugins> @@ -811,9 +910,18 @@ </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-gpg-plugin</artifactId> + <artifactId>maven-clean-plugin</artifactId> + <version>2.4.1</version> <configuration> - <skip>true</skip> + <filesets> + <fileset> + <directory>${project.basedir}/src/main/resources/schema</directory> + <includes> + <include>**/*</include> + </includes> + <followSymlinks>false</followSymlinks> + </fileset> + </filesets> </configuration> </plugin> <plugin> @@ -821,15 +929,14 @@ <artifactId>gmaven-plugin</artifactId> </plugin> <plugin> - <artifactId>exec-maven-plugin</artifactId> - <groupId>org.codehaus.mojo</groupId> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-dependency-plugin</artifactId> + <version>2.10</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-javadoc-plugin</artifactId> - <configuration> - <additionalparam>-Xdoclint:none</additionalparam> - </configuration> + <version>${javadoc.plugin.version}</version> </plugin> <plugin> <artifactId>maven-assembly-plugin</artifactId> @@ -858,6 +965,10 @@ </configuration> </plugin> <plugin> + <groupId>com.mycila</groupId> + <artifactId>license-maven-plugin</artifactId> + </plugin> + <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>sonar-maven-plugin</artifactId> <version>3.3</version> @@ -904,6 +1015,7 @@ <configuration> <dataFile>${project.build.directory}/coverage-reports/jacoco.exec</dataFile> <rules> + <!-- implementation is needed only for Maven 2 --> <rule implementation="org.jacoco.maven.RuleConfiguration"> <element>BUNDLE</element> <limits> @@ -943,6 +1055,7 @@ <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> + <version>${spring.boot.version}</version> <configuration> <mainClass>${start-class}</mainClass> <layout>ZIP</layout> @@ -955,30 +1068,6 @@ </execution> </executions> </plugin> - <plugin> - <groupId>com.mycila</groupId> - <artifactId>license-maven-plugin</artifactId> - <version>3.0</version> - <configuration> - <header>LICENSE.TXT</header> - <includes> - <include>src/main/java/**</include> - <include>src/test/java/**</include> - <include>pom.xml</include> - </includes> - <skipExistingHeaders>true</skipExistingHeaders> - <skip>false</skip> - </configuration> - <executions> - <execution> - <goals> - <!-- Set goal to "format" to auto update license headers --> - <goal>${license.goal.type}</goal> - </goals> - <phase>initialize</phase> - </execution> - </executions> - </plugin> </plugins> </build> <reporting> @@ -1001,20 +1090,4 @@ </plugin> </plugins> </reporting> - <distributionManagement> - <repository> - <id>ecomp-releases</id> - <name>ECOMP Release Repository</name> - <url>${nexusproxy}${release.path}</url> - </repository> - <snapshotRepository> - <id>ecomp-snapshots</id> - <name>ECOMP Snapshot Repository</name> - <url>${nexusproxy}${snapshot.path}</url> - </snapshotRepository> - <site> - <id>ecomp-site</id> - <url>dav:${nexusproxy}${site.path}</url> - </site> - </distributionManagement> </project> |