Remove all thrift's dependencies
[sdc.git] / catalog-be / pom.xml
index e32d514..3a9e72d 100644 (file)
@@ -1,4 +1,5 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
@@ -8,11 +9,15 @@
     <parent>
         <groupId>org.openecomp.sdc</groupId>
         <artifactId>sdc-main</artifactId>
-        <version>1.5.0-SNAPSHOT</version>
+        <version>1.7.0-SNAPSHOT</version>
     </parent>
 
     <properties>
         <java-hamcrest.version>2.0.0.0</java-hamcrest.version>
+        <swagger.version>2.1.1</swagger.version>
+        <swagger-ui.version>3.25.0</swagger-ui.version>
+        <maven-dependency-plugin.version>3.1.1</maven-dependency-plugin.version>
+        <replacer.plugin.version>1.5.3</replacer.plugin.version>
     </properties>
 
     <dependencies>
             <scope>compile</scope>
         </dependency>
 
-        <dependency>
-            <groupId>org.openecomp.sdc</groupId>
-            <artifactId>security-utils</artifactId>
-            <version>${project.version}</version>
-            <scope>compile</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.onap.sdc.common</groupId>
-            <artifactId>onap-tosca-datatype</artifactId>
-            <version>${project.version}</version>
-            <scope>compile</scope>
-        </dependency>
-
         <dependency>
             <groupId>org.onap.sdc.common</groupId>
             <artifactId>onap-generic-artifact-browser-service</artifactId>
 
         <!-- Swagger Dependencies Start -->
         <dependency>
-            <groupId>io.swagger</groupId>
-            <artifactId>swagger-jersey2-jaxrs</artifactId>
-            <scope>compile</scope>
-            <version>1.5.15</version>
+            <groupId>io.swagger.core.v3</groupId>
+            <artifactId>swagger-jaxrs2</artifactId>
+            <version>${swagger.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.swagger.core.v3</groupId>
+            <artifactId>swagger-annotations</artifactId>
+            <version>${swagger.version}</version>
         </dependency>
         <!-- Swagger Dependencies End -->
 
             <version>${project.version}</version>
             <scope>compile</scope>
         </dependency>
+        <dependency>
+            <groupId>org.openecomp.sdc.be</groupId>
+            <artifactId>common-be</artifactId>
+            <version>${project.version}</version>
+            <type>test-jar</type>
+            <scope>test</scope>
+        </dependency>
         <dependency>
             <groupId>org.openecomp.sdc.be</groupId>
             <artifactId>catalog-dao</artifactId>
             <scope>compile</scope>
         </dependency>
 
+        <!-- Spring integration (optional) -->
         <dependency>
-            <groupId>org.codehaus.groovy</groupId>
-            <artifactId>groovy</artifactId>
-            <scope>compile</scope>
+            <groupId>org.togglz</groupId>
+            <artifactId>togglz-spring-web</artifactId>
+            <version>${togglz.version}</version>
         </dependency>
 
         <dependency>
             <scope>compile</scope>
         </dependency>
 
-        <!-- TITAN -->
         <dependency>
-            <groupId>com.thinkaurelius.titan</groupId>
-            <artifactId>titan-core</artifactId>
-            <version>${titan.version}</version>
+            <groupId>org.janusgraph</groupId>
+            <artifactId>janusgraph-core</artifactId>
+            <version>${janusgraph.version}</version>
             <scope>compile</scope>
             <exclusions>
                 <exclusion>
                     <artifactId>commons-collections</artifactId>
                     <groupId>commons-collections</groupId>
                 </exclusion>
+                <exclusion>
+                    <groupId>org.apache.thrift</groupId>
+                    <artifactId>libthrift</artifactId>
+                </exclusion>
             </exclusions>
         </dependency>
 
         <dependency>
-            <groupId>org.onap.sdc.sdc-titan-cassandra</groupId>
-            <artifactId>sdc-titan-cassandra</artifactId>
-            <version>${sdc.titan.version}</version>
+            <groupId>org.janusgraph</groupId>
+            <artifactId>janusgraph-cql</artifactId>
+            <version>${janusgraph.version}</version>
             <scope>compile</scope>
             <exclusions>
                 <exclusion>
                     <groupId>org.slf4j</groupId>
                     <artifactId>slf4j-log4j12</artifactId>
                 </exclusion>
+                <exclusion>
+                    <groupId>org.json</groupId>
+                    <artifactId>json</artifactId>
+                </exclusion>
+                <exclusion>
+                    <artifactId>commons-collections</artifactId>
+                    <groupId>commons-collections</groupId>
+                </exclusion>
+                <exclusion>
+                    <artifactId>groovy</artifactId>
+                    <groupId>org.codehaus.groovy</groupId>
+                </exclusion>
                 <exclusion>
                     <groupId>io.netty</groupId>
                     <artifactId>netty-all</artifactId>
             <version>${lang3.version}</version>
             <scope>compile</scope>
         </dependency>
-        <!-- TITAN END -->
 
         <dependency>
             <groupId>com.googlecode.json-simple</groupId>
 
         </dependency>
 
-        <dependency>
-            <groupId>org.elasticsearch</groupId>
-            <artifactId>elasticsearch</artifactId>
-            <version>${elastic-search.version}</version>
-            <scope>compile</scope>
-        </dependency>
-
         <!-- functional java -->
         <dependency>
             <groupId>org.functionaljava</groupId>
             <version>20131018</version>
             <scope>compile</scope>
         </dependency>
-        <dependency>
-            <groupId>org.apache.tinkerpop</groupId>
-            <artifactId>tinkergraph-gremlin</artifactId>
-            <version>3.0.1-incubating</version>
-            <scope>compile</scope>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.tinkerpop</groupId>
-            <artifactId>gremlin-groovy</artifactId>
-            <version>3.0.1-incubating</version>
-            <scope>compile</scope>
-            <exclusions>
-                <exclusion>
-                    <artifactId>groovy</artifactId>
-                    <groupId>org.codehaus.groovy</groupId>
-                </exclusion>
-            </exclusions>
-        </dependency>
 
         <!-- CASSANDRA -->
         <dependency>
                     <artifactId>slf4j-log4j12</artifactId>
                     <groupId>org.slf4j</groupId>
                 </exclusion>
+                <exclusion>
+                    <artifactId>powermock-api-mockito</artifactId>
+                    <groupId>org.powermock</groupId>
+                </exclusion>
+                <exclusion>
+                    <groupId> org.onap.aaf.authz</groupId>
+                    <artifactId> aaf-cadi-aaf</artifactId>
+                </exclusion>
+                <exclusion>
+                    <artifactId>aaf-cadi-core</artifactId>
+                    <groupId>org.onap.aaf.authz</groupId>
+                </exclusion>
+                <exclusion>
+                    <artifactId>commons-codec</artifactId>
+                    <groupId>commons-codec</groupId>
+                </exclusion>
             </exclusions>
         </dependency>
 
             <scope>provided</scope>
         </dependency>
 
+         <!-- CADI -->
+        <dependency>
+                       <groupId>org.onap.aaf.authz</groupId>
+                       <artifactId>aaf-cadi-aaf</artifactId>
+                       <version>${cadi.version}</version>
+                       <exclusions>
+                <exclusion>
+                     <groupId>com.datastax.cassandra</groupId>
+                     <artifactId>cassandra-driver-core</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.slf4j</groupId>
+                    <artifactId>slf4j-log4j12</artifactId>
+                </exclusion>
+             </exclusions>
+                </dependency>
+
         <!-- TEST -->
         <dependency>
             <groupId>org.assertj</groupId>
             <scope>test</scope>
         </dependency>
 
+        <dependency>
+            <groupId>org.hamcrest</groupId>
+            <artifactId>hamcrest</artifactId>
+            <version>${hamcrest.version}</version>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.hamcrest</groupId>
+            <artifactId>hamcrest-library</artifactId>
+            <version>${hamcrest.version}</version>
+            <scope>test</scope>
+        </dependency>
+
         <dependency>
             <groupId>junit</groupId>
             <artifactId>junit</artifactId>
             <scope>test</scope>
         </dependency>
 
+        <dependency>
+            <groupId>org.junit.jupiter</groupId>
+            <artifactId>junit-jupiter</artifactId>
+            <version>${junitJupiter.version}</version>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.mockito</groupId>
+            <artifactId>mockito-junit-jupiter</artifactId>
+            <version>${mockitoJupiter.version}</version>
+            <scope>test</scope>
+        </dependency>
+
         <dependency>
             <groupId>org.mockito</groupId>
             <artifactId>mockito-core</artifactId>
             <scope>test</scope>
         </dependency>
 
-        <dependency>
-            <groupId>org.hamcrest</groupId>
-            <artifactId>java-hamcrest</artifactId>
-            <version>${java-hamcrest.version}</version>
-            <scope>test</scope>
-        </dependency>
-
         <dependency>
             <groupId>org.codehaus.groovy</groupId>
             <artifactId>groovy</artifactId>
             <artifactId>jackson-mapper-asl</artifactId>
             <version>${jackson.mapper.version}</version>
         </dependency>
+        <dependency>
+            <groupId>org.onap.sdc.sdc-be-common</groupId>
+            <artifactId>security-util-lib</artifactId>
+            <version>${security.util.lib.version}</version>
+        </dependency>
     </dependencies>
 
     <build>
-
         <finalName>${project.artifactId}-${project.version}</finalName>
-
         <plugins>
+            <plugin>
+                <!-- Download Swagger UI webjar. -->
+                <artifactId>maven-dependency-plugin</artifactId>
+                <version>${maven-dependency-plugin.version}</version>
+                <executions>
+                    <execution>
+                        <phase>prepare-package</phase>
+                        <goals>
+                            <goal>unpack</goal>
+                        </goals>
+                        <configuration>
+                            <artifactItems>
+                                <artifactItem>
+                                    <groupId>org.webjars</groupId>
+                                    <artifactId>swagger-ui</artifactId>
+                                    <version>${swagger-ui.version}</version>
+                                </artifactItem>
+                            </artifactItems>
+                            <outputDirectory>${project.build.directory}/swagger-ui</outputDirectory>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <!-- Replace the OpenAPI specification example URL with the local one. -->
+                <groupId>com.google.code.maven-replacer-plugin</groupId>
+                <artifactId>replacer</artifactId>
+                <version>${replacer.plugin.version}</version>
+                <executions>
+                    <execution>
+                        <phase>prepare-package</phase>
+                        <goals>
+                            <goal>replace</goal>
+                        </goals>
+                    </execution>
+                </executions>
+                <configuration>
+                    <file>${project.build.directory}/swagger-ui/META-INF/resources/webjars/swagger-ui/${swagger-ui.version}/index.html</file>
+                    <replacements>
+                        <replacement>
+                            <token>https://petstore.swagger.io/v2/swagger.json</token>
+                            <value>/sdc/openapi.json</value>
+                        </replacement>
+                    </replacements>
+                </configuration>
+            </plugin>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-war-plugin</artifactId>
                             <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                         </manifest>
                     </archive>
-
-                    <webResources>
+                    <attachClasses>true</attachClasses>
+                    <webResources combine.children="append">
                         <resource>
-                            <directory>src/main/resources</directory>
-                            <directory>src/main/resources/swagger</directory>
+                            <directory>${project.build.directory}/swagger-ui/META-INF/resources/webjars/swagger-ui/${swagger-ui.version}</directory>
+                            <includes>
+                                <include>**/*.*</include>
+                            </includes>
+                            <targetPath>swagger-ui</targetPath>
                         </resource>
                     </webResources>
-                    <attachClasses>true</attachClasses>
                 </configuration>
             </plugin>
             <plugin>
                                         <include>src/main/resources/**/*.y*ml</include>
                                         <include>src/test/resources/**/*.y*ml</include>
                                     </includes>
+                                    <excludes>
+                                        <exclude>src/test/resources/artifacts/pnfSoftwareInformation/**</exclude>
+                                    </excludes>
                                 </validationSet>
                                 <validationSet>
                                     <includes>
                 <executions>
                     <execution>
                         <id>normatives</id>
-                        <phase>package</phase>
+                        <phase>prepare-package</phase>
                         <goals>
                             <goal>single</goal>
                         </goals>
                             <finalName>normatives</finalName>
                             <appendAssemblyId>false</appendAssemblyId>
                             <descriptors>
-                                <descriptor>${project.basedir}/normatives.xml</descriptor>
+                                <descriptor>src/main/assembly/normatives.xml</descriptor>
                             </descriptors>
                         </configuration>
                     </execution>
                                     </directory>
                                     <followSymlinks>false</followSymlinks>
                                     <includes>
+                                        <include>Artifact-Generator.properties</include>
                                         <include>error-configuration.yaml</include>
                                         <include>ecomp-error-configuration.yaml</include>
                                         <include>logback.xml</include>
                                     <followSymlinks>false</followSymlinks>
                                     <includes>
                                         <include>*.war</include>
+                                        <include>context.xml</include>
                                     </includes>
                                 </fileset>
                                 <fileset>
                                         <include>normatives.tar.gz</include>
                                     </includes>
                                 </fileset>
-
-
                             </filesets>
                         </configuration>
                     </execution>
-
                     <execution>
                         <id>clean-static-files</id>
                         <phase>clean</phase>
                                     <directory>${project.parent.basedir}/catalog-be/src/main/resources/config
                                     </directory>
                                     <includes>
+                                        <include>Artifact-Generator.properties</include>
                                         <include>error-configuration.yaml</include>
                                         <include>ecomp-error-configuration.yaml</include>
                                         <include>logback.xml</include>
             <build>
                 <plugins>
                     <plugin>
-                        <groupId>org.apache.maven.plugins</groupId>
-                        <artifactId>maven-resources-plugin</artifactId>
+                        <artifactId>maven-antrun-plugin</artifactId>
+                        <version>1.8</version>
                         <executions>
                             <execution>
-                                <id>copy-resources-apidocs</id>
-                                <phase>verify</phase>
+                                <id>copy-context-file</id>
+                                <phase>validate</phase>
+                                <configuration>
+                                    <target>
+                                        <copy file="sdc-backend/context.xml.template" tofile="sdc-backend/context.xml" overwrite="true"/>
+                                    </target>
+                                </configuration>
                                 <goals>
-                                    <goal>copy-resources</goal>
+                                    <goal>run</goal>
                                 </goals>
+                            </execution>
+                            <execution>
+                                <id>set-version-in-context-file</id>
+                                <phase>generate-resources</phase>
                                 <configuration>
-                                    <outputDirectory>${basedir}/sdc-backend</outputDirectory>
-                                    <resources>
-                                        <resource>
-                                            <directory>
-                                                ${project.parent.basedir}/openecomp-be/tools/swagger-ui/target/api-docs
-                                            </directory>
-                                            <includes>
-                                                <include>api-docs.war</include>
-                                            </includes>
-                                        </resource>
-                                    </resources>
+                                    <target>
+                                        <replace file="sdc-backend/context.xml">
+                                            <replacetoken>projectversion</replacetoken>
+                                            <replacevalue>${project.version}</replacevalue>
+                                        </replace>
+                                    </target>
                                 </configuration>
+                                <goals>
+                                    <goal>run</goal>
+                               </goals>
                             </execution>
-
+                        </executions>
+                    </plugin>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-resources-plugin</artifactId>
+                        <executions>
                             <execution>
                                 <id>copy-resources-be</id>
                                 <phase>verify</phase>
                                                 <include>catalog-be-${project.version}.war</include>
                                             </includes>
                                         </resource>
-                                        <resource>
-                                            <directory>
-                                                ${project.parent.basedir}/openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/target
-                                            </directory>
-                                            <includes>
-                                                <include>onboarding-be-${project.version}.war</include>
-                                            </includes>
-                                        </resource>
                                     </resources>
                                 </configuration>
                             </execution>
                             <execution>
                                 <id>copy-normatives</id>
-                                <phase>verify</phase>
+                                <phase>package</phase>
                                 <goals>
                                     <goal>copy-resources</goal>
                                 </goals>
             </build>
         </profile>
     </profiles>
-</project>
\ No newline at end of file
+</project>