Upgrade to CDS 1.1.5
[policy/parent.git] / integration / pom.xml
index 864dee2..87dbc23 100644 (file)
 
     <properties>
         <java.version>11</java.version>
+        <!-- NOTE: For RELEASE/SNAPSHOT always set to the project version -->
+        <version.parent.resources>3.4.0-SNAPSHOT</version.parent.resources>
         <version.logback>1.2.3</version.logback>
         <version.dmaap>1.1.12</version.dmaap>
         <version.powermock>2.0.9</version.powermock>
         <version.eclipselink>2.7.8</version.eclipselink>
         <version.drools>7.33.0.Final</version.drools>
         <version.jersey>2.33</version.jersey>
-        <version.jackson>2.11.3</version.jackson>
-        <version.ccsdk>0.7.5</version.ccsdk>
+        <version.jackson>2.12.3</version.jackson>
+        <version.ccsdk>1.1.5</version.ccsdk>
         <version.swagger>1.6.2</version.swagger>
         <version.javax.bind>2.3.1</version.javax.bind>
         <version.javax.json>1.1.4</version.javax.json>
         <version.mockserver>5.11.2</version.mockserver>
         <version.immutable>2.8.8</version.immutable>
         <version.springfox>3.0.0</version.springfox>
+        <version.jakarta-api>2.0.2</version.jakarta-api>
         <jacoco.dataFile>${project.basedir}/../target/code-coverage/jacoco-ut.exec</jacoco.dataFile>
         <repo.npm>https://nexus3.onap.org/repository/npm.public/npm/-/</repo.npm>
+        <docker.pull.registry>nexus3.onap.org:10001</docker.pull.registry>
+        <docker.push.registry>nexus3.onap.org:10003</docker.push.registry>
     </properties>
 
     <distributionManagement>
 
     <dependencyManagement>
         <dependencies>
+            <dependency>
+                <groupId>org.onap.policy.parent</groupId>
+                <artifactId>policy-parent-resources</artifactId>
+                <version>${version.parent.resources}</version>
+            </dependency>
+
+            <dependency>
+                <groupId>jakarta.validation</groupId>
+                <artifactId>jakarta.validation-api</artifactId>
+                <version>${version.jakarta-api}</version>
+            </dependency>
 
             <!-- Jackson - needed by glassfish jersey -->
             <dependency>
                 </exclusions>
             </dependency>
 
+            <!--  Swagger Models -->
+            <dependency>
+                <groupId>io.swagger</groupId>
+                <artifactId>swagger-models</artifactId>
+                <version>${version.swagger}</version>
+            </dependency>
+
             <!-- Encoder and decoders for various formats -->
             <dependency>
                 <groupId>commons-codec</groupId>
             <dependency>
                 <groupId>com.thoughtworks.xstream</groupId>
                 <artifactId>xstream</artifactId>
-                <version>1.4.15</version>
+                <version>1.4.17</version>
             </dependency>
 
             <!-- Eclipse JPA API -->
 
             <!-- CDS dependencies -->
             <dependency>
-                <groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId>
+                <groupId>org.onap.ccsdk.cds.blueprintsprocessor.modules</groupId>
                 <artifactId>blueprint-proto</artifactId>
                 <version>${version.ccsdk}</version>
                 <exclusions>
                     </exclusion>
                 </exclusions>
             </dependency>
+            <dependency>
+                <groupId>net.minidev</groupId>
+                <artifactId>json-smart</artifactId>
+                <version>2.4.7</version>
+            </dependency>
 
             <!-- AAF Client -->
             <dependency>
             </dependency>
 
             <dependency>
-            <groupId>org.onap.sdc.sdc-tosca</groupId>
-            <artifactId>sdc-tosca</artifactId>
-            <version>1.5.1</version>
+                <groupId>org.onap.sdc.sdc-tosca</groupId>
+                <artifactId>sdc-tosca</artifactId>
+                <version>1.5.1</version>
             </dependency>
 
             <dependency>
             </dependency>
 
             <dependency>
-            <groupId>org.apache.commons</groupId>
-            <artifactId>commons-vfs2</artifactId>
-            <version>2.8.0</version>
+                <groupId>org.apache.commons</groupId>
+                <artifactId>commons-vfs2</artifactId>
+                <version>2.8.0</version>
             </dependency>
 
             <dependency>
                 <version>3.2.7</version>
                 <scope>test</scope>
             </dependency>
+
+            <!--  Springboot -->
+            <dependency>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-starter-web</artifactId>
+                <version>${version.springboot}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-starter-webflux</artifactId>
+                <version>${version.springboot}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-starter-validation</artifactId>
+                <version>${version.springboot}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-starter-test</artifactId>
+                <version>${version.springboot}</version>
+                <scope>test</scope>
+            </dependency>
+            <dependency>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-starter-security</artifactId>
+                <version>${version.springboot}</version>
+            </dependency>
         </dependencies>
 
     </dependencyManagement>
                 </pluginManagement>
             </build>
         </profile>
+        <profile>
+            <id>generateSwaggerDocs</id>
+            <activation>
+                <property>
+                    <name>!skipTests</name>
+                </property>
+            </activation>
+            <build>
+                <plugins>
+                    <!-- Read the swagger.json file and the definition from SwaggerConfig.java; generate
+                    a list of .adoc files containing the APIs info in more structured way -->
+                    <plugin>
+                        <groupId>io.github.swagger2markup</groupId>
+                        <artifactId>swagger2markup-maven-plugin</artifactId>
+                        <version>1.3.3</version>
+                        <dependencies>
+                            <dependency>
+                                <groupId>io.github.swagger2markup</groupId>
+                                <artifactId>swagger2markup-import-files-ext</artifactId>
+                                <version>1.3.3</version>
+                            </dependency>
+                            <dependency>
+                                <groupId>io.github.swagger2markup</groupId>
+                                <artifactId>swagger2markup-spring-restdocs-ext</artifactId>
+                                <version>1.3.3</version>
+                            </dependency>
+                        </dependencies>
+                        <configuration>
+                            <swaggerInput>${project.build.directory}/swagger/swagger.json</swaggerInput>
+                            <outputDir>${project.build.directory}/asciidoc/generated</outputDir>
+                            <config>
+                                <swagger2markup.markupLanguage>ASCIIDOC</swagger2markup.markupLanguage>
+                            </config>
+                        </configuration>
+                        <executions>
+                            <execution>
+                                <phase>${swagger.generation.phase}</phase>
+                                <goals>
+                                    <goal>convertSwagger2markup</goal>
+                                </goals>
+                            </execution>
+                        </executions>
+                    </plugin>
+
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-dependency-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>unpack-swagger-asciidoc</id>
+                                <phase>${swagger.generation.phase}</phase>
+                                <goals>
+                                    <goal>unpack</goal>
+                                </goals>
+                                <configuration>
+                                    <artifactItems>
+                                        <artifactItem>
+                                            <groupId>org.onap.policy.parent</groupId>
+                                            <artifactId>policy-parent-resources</artifactId>
+                                            <type>jar</type>
+                                            <overWrite>true</overWrite>
+                                            <outputDirectory>${project.build.directory}</outputDirectory>
+                                        </artifactItem>
+                                    </artifactItems>
+                                    <includes>asciidoc/**</includes>
+                                    <outputDirectory>${project.build.directory}</outputDirectory>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+
+                    <!-- Run the generated asciidoc through Asciidoctor to generate other documentation
+                    types, such as PDFs or HTML5 -->
+                    <plugin>
+                        <groupId>org.asciidoctor</groupId>
+                        <artifactId>asciidoctor-maven-plugin</artifactId>
+                        <version>1.5.7.1</version>
+                        <dependencies>
+                            <dependency>
+                                <groupId>org.asciidoctor</groupId>
+                                <artifactId>asciidoctorj-pdf</artifactId>
+                                <version>1.5.0-alpha.10.1</version>
+                            </dependency>
+                        </dependencies>
+                        <configuration>
+                            <sourceDirectory>${project.build.directory}/asciidoc</sourceDirectory>
+                            <sourceDocumentName>swagger.adoc</sourceDocumentName>
+                            <attributes>
+                                <doctype>book</doctype>
+                                <toc>left</toc>
+                                <toclevels>3</toclevels>
+                                <numbered />
+                                <hardbreaks />
+                                <sectlinks />
+                                <sectanchors />
+                                <generated>${project.build.directory}/asciidoc/generated</generated>
+                            </attributes>
+                        </configuration>
+
+                        <executions>
+                            <execution>
+                                <id>output-html</id>
+                                <phase>${swagger.generation.phase}</phase>
+                                <goals>
+                                    <goal>process-asciidoc</goal>
+                                </goals>
+                                <configuration>
+                                    <backend>html5</backend>
+                                    <outputDirectory>${project.build.directory}/swagger</outputDirectory>
+                                </configuration>
+                            </execution>
+                            <execution>
+                                <id>output-pdf</id>
+                                <phase>${swagger.generation.phase}</phase>
+                                <goals>
+                                    <goal>process-asciidoc</goal>
+                                </goals>
+                                <configuration>
+                                    <backend>pdf</backend>
+                                    <outputDirectory>${project.build.directory}/swagger</outputDirectory>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+
+                    <!--  Create a tarball for Swagger documents -->
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-assembly-plugin</artifactId>
+                        <dependencies>
+                            <dependency>
+                                <groupId>org.onap.policy.parent</groupId>
+                                <artifactId>policy-parent-resources</artifactId>
+                                <version>${version.parent.resources}</version>
+                            </dependency>
+                        </dependencies>
+                        <executions>
+                            <execution>
+                                <id>generate-swagger-tar</id>
+                                <phase>${swagger.generation.phase}</phase>
+                                <goals>
+                                    <goal>single</goal>
+                                </goals>
+                                <configuration>
+                                    <descriptorRefs>
+                                        <descriptorRef>swagger-docs</descriptorRef>
+                                    </descriptorRefs>
+                                    <finalName>${project.artifactId}</finalName>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+
+                </plugins>
+            </build>
+        </profile>
     </profiles>
 
     <build>