summaryrefslogtreecommitdiffstats
path: root/pom.xml
blob: 2781799b00ecfe2656bcb28d1dc920390dd76e20 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92

@media only all and (prefers-color-scheme: dark) {
.highlight .hll { background-color: #49483e }
.highlight .c { color: #75715e } /* Comment */
.highlight .err { color: #960050; background-color: #1e0010 } /* Error */
.highlight .k { color: #66d9ef } /* Keyword */
.highlight .l { color: #ae81ff } /* Literal */
.highlight .n { color: #f8f8f2 } /* Name */
.highlight .o { color: #f92672 } /* Operator */
.highlight .p { color: #f8f8f2 } /* Punctuation */
.highlight .ch { color: #75715e } /* Comment.Hashbang */
.highlight .cm { color: #75715e } /* Comment.Multiline */
.highlight .cp { color: #75715e } /* Comment.Preproc */
.highlight .cpf { color: #75715e } /* Comment.PreprocFile */
.highlight .c1 { color: #75715e } /* Comment.Single */
.highlight .cs { color: #75715e } /* Comment.Special */
.highlight .gd { color: #f92672 } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .gi { color: #a6e22e } /* Generic.Inserted */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #75715e } /* Generic.Subheading */
.highlight .kc { color: #66d9ef } /* Keyword.Constant */
.highlight .kd { color: #66d9ef } /* Keyword.Declaration */
.highlight .kn { color: #f92672 } /* Keyword.Namespace */
.highlight .kp { color: #66d9ef } /* Keyword.Pseudo */
.highlight .kr { color: #66d9ef } /* Keyword.Reserved */
.highlight .kt { color: #66d9ef } /* Keyword.Type */
.highlight .ld { color: #e6db74 } /* Literal.Date */
.highlight .m { color: #ae81ff } /* Literal.Number */
.highlight .s { color: #e6db74 } /* Literal.String */
.highlight .na { color: #a6e22e } /* Name.Attribute */
.highlight .nb { color: #f8f8f2 } /* Name.Builtin */
.highlight .nc { color: #a6e22e } /* Name.Class */
.highlight .no { color: #66d9ef } /* Name.Constant */
.highlight .nd { color: #a6e22e } /* Name.Decorator */
.highlight .ni { color: #f8f8f2 } /* Name.Entity */
.highlight .ne { color: #a6e22e } /* Name.Exception */
.highlight .nf { color: #a6e22e } /* Name.Function */
.highlight .nl { color: #f8f8f2 } /* Name.Label */
.highlight .nn { color: #f8f8f2 } /* Name.Namespace */
.highlight .nx { color: #a6e22e } /* Name.Other */
.highlight .py { color: #f8f8f2 } /* Name.Property */
.highlight .nt { color: #f92672 } /* Name.Tag */
.highlight .nv { color: #f8f8f2 } /* Name.Variable */
.highlight .ow { color: #f92672 } /* Operator.Word */
.highlight .w { color: #f8f8f2 } /* Text.Whitespace */
.highlight .mb { color: #ae81ff } /* Literal.Number.Bin */
.highlight .mf { color: #ae81ff } /* Literal.Number.Float */
.highlight .mh { color: #ae81ff } /* Literal.Number.Hex */
.highlight .mi { color: #ae81ff } /* Literal.Number.Integer */
.highlight .mo { color: #ae81ff } /* Literal.Number.Oct */
.highlight .sa { color: #e6db74 } /* Literal.String.Affix */
.highlight .sb { color: #e6db74 } /* Literal.String.Backtick */
.highlight .sc { color: #e6db74 } /* Literal.String.Char */
.highlight .dl { color: #e6db74 } /* Literal.String.Delimiter */
.highlight .sd { color: #e6db74 } /* Literal.String.Doc */
.highlight .s2 { color: #e6db74 } /* Literal.String.Double */
.highlight .se { color: #ae81ff } /* Literal.String.Escape */
.highlight .sh { color: #e6db74 } /* Literal.String.Heredoc */
.highlight .si { color: #e6db74 } /* Literal.String.Interpol */
.highlight .sx { color: #e6db74 } /* Literal.String.Other */
.highlight .sr { color: #e6db74 } /* Literal.String.Regex */
.highlight .s1 { color: #e6db74 } /* Literal.String.Single */
.highlight .ss { color: #e6db74 } /* Literal.String.Symbol */
.highlight .bp { color: #f8f8f2 } /* Name.Builtin.Pseudo */
.highlight .fm { color: #a6e22e } /* Name.Function.Magic */
.highlight .vc { color: #f8f8f2 } /* Name.Variable.Class */
.highlight .vg { color: #f8f8f2 } /* Name.Variable.Global */
.highlight .vi { color: #f8f8f2 } /* Name.Variable.Instance */
.highlight .vm { color: #f8f8f2 } /* Name.Variable.Magic */
.highlight .il { color: #ae81ff } /* Literal.Number.Integer.Long */
}
@media (prefers-color-scheme: light) {
.highlight .hll { background-color: #ffffcc }
.highlight .c { color: #888888 } /* Comment */
.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
.highlight .k { color: #008800; font-weight: bold } /* Keyword */
.highlight .ch { color: #888888 } /* Comment.Hashbang */
.highlight .cm { color: #888888 } /* Comment.Multiline */
.highlight .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */
.highlight .cpf { color: #888888 } /* Comment.PreprocFile */
.highlight .c1 { color: #888888 } /* Comment.Single */
.highlight .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */
.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .gr { color: #aa0000 } /* Generic.Error */
.highlight .gh { color: #333333 } /* Generic.Heading */
.highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
.highlight .go { color: #888888 } /* Generic.Output */
.highlight .gp { color: #555555 } /* Generic.Prompt */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #666666 } /* Generic.Subheading */
.highlight .gt { color: #aa0000 } /* Generic.Traceback */
.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */
.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */
.highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */
.highlight .kp { color: #008800 } /* Keyword.Pseudo */
.highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */
.highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */
.highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */
.highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */
.highlight .na { color: #336699 } /* Name.Attribute */
.highlight .nb { color: #003388 } /* Name.Builtin */
.highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */
.highlight .no { color: #003366; font-weight: bold } /* Name.Constant */
.highlight .nd { color: #555555 } /* Name.Decorator */
.highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */
.highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */
.highlight .nl { color: #336699; font-style: italic } /* Name.Label */
.highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */
.highlight .py { color: #336699; font-weight: bold } /* Name.Property */
.highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */
.highlight .nv { color: #336699 } /* Name.Variable */
.highlight .ow { color: #008800 } /* Operator.Word */
.highlight .w { color: #bbbbbb } /* Text.Whitespace */
.highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */
.highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */
.highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */
.highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */
.highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */
.highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */
.highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */
.highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */
.highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */
.highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */
.highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */
.highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */
.highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */
.highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */
.highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */
.highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */
.highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */
.highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */
.highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */
.highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */
.highlight .vc { color: #336699 } /* Name.Variable.Class */
.highlight .vg { color: #dd7700 } /* Name.Variable.Global */
.highlight .vi { color: #3333bb } /* Name.Variable.Instance */
.highlight .vm { color: #336699 } /* Name.Variable.Magic */
.highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
}
#!/bin/bash
# Copyright © 2019 Orange
# Copyright © 2020 Samsung Electronics
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#       http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# make sure the script fails if any of commands failed
set -e

while read DB ; do
    USER_VAR="MYSQL_USER_${DB^^}"
    PASS_VAR="MYSQL_PASSWORD_${DB^^}"
    USER=${!USER_VAR}
    PASS=`echo -n ${!PASS_VAR} | sed -e "s/'/''/g"`
    MYSQL_OPTS=( -h ${DB_HOST} -P ${DB_PORT} -uroot -p${MYSQL_ROOT_PASSWORD} )

    echo "Creating database ${DB} and user ${USER}..."

    mysql "${MYSQL_OPTS[@]}" -e "CREATE OR REPLACE USER '${USER}'@'%' IDENTIFIED BY '${PASS}'"
    mysql "${MYSQL_OPTS[@]}" -e "CREATE DATABASE IF NOT EXISTS ${DB}"
    mysql "${MYSQL_OPTS[@]}" -e "GRANT ALL PRIVILEGES ON ${DB}.* TO '${USER}'@'%'"

    echo "Created database ${DB} and user ${USER}."
done <<EOF
{{ .Values.config.mysqlDatabase }}
{{- range $db, $_value := .Values.config.mysqlAdditionalDatabases }}
{{ $db }}
{{- end }}
EOF
20'>520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670
<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ ============LICENSE_START=======================================================
  ~ dcaegen2-collectors-veshv
  ~ ================================================================================
  ~ Copyright (C) 2018 NOKIA
  ~ ================================================================================
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~      http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  ~ ============LICENSE_END=========================================================
  -->
<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>

    <licenses>
        <license>
            <name>The Apache Software License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
        </license>
    </licenses>

    <parent>
        <groupId>org.onap.oparent</groupId>
        <artifactId>oparent</artifactId>
        <version>0.1.1</version>
        <relativePath/>
    </parent>

    <groupId>org.onap.dcaegen2.collectors.hv-ves</groupId>
    <artifactId>ves-hv-collector</artifactId>
    <version>1.0.0-SNAPSHOT</version>
    <name>dcaegen2-collectors-veshv</name>
    <description>VES HighVolume Collector</description>
    <packaging>pom</packaging>

    <modules>
        <module>hv-collector-analysis</module>
        <module>hv-collector-core</module>
        <module>hv-collector-coverage</module>
        <module>hv-collector-ct</module>
        <module>hv-collector-dcae-app-simulator</module>
        <module>hv-collector-domain</module>
        <module>hv-collector-health-check</module>
        <module>hv-collector-main</module>
        <module>hv-collector-test-utils</module>
        <module>hv-collector-utils</module>
        <module>hv-collector-ves-message-generator</module>
        <module>hv-collector-xnf-simulator</module>
    </modules>

    <properties>
        <kotlin.version>1.2.61</kotlin.version>
        <arrow.version>0.7.3</arrow.version>
        <maven-compiler-plugin.version>3.7.0</maven-compiler-plugin.version>
        <build-helper-maven-plugin.version>1.7</build-helper-maven-plugin.version>
        <jacoco.version>0.8.2</jacoco.version>

        <!-- Protocol buffers -->
        <protobuf.version>3.5.1</protobuf.version>
        <protoc-jar-maven-plugin.version>3.5.1.1</protoc-jar-maven-plugin.version>
        <protobuf-generated-files.directory>${project.build.directory}/generated-sources/proto/main/java/
        </protobuf-generated-files.directory>

        <!-- Testing and code analysis -->
        <junit-platform.version>1.2.0-RC1</junit-platform.version>
        <junit-jupiter.version>5.2.0-RC1</junit-jupiter.version>
        <spek.version>1.1.5</spek.version>
        <maven-surefire-plugin.version>2.22.0</maven-surefire-plugin.version>
        <failIfMissingUnitTests>false</failIfMissingUnitTests>
        <failIfMissingComponentTests>false</failIfMissingComponentTests>
        <skipAnalysis>true</skipAnalysis>

        <!-- Docker -->
        <skipDocker>false</skipDocker>
        <skipDockerPush>true</skipDockerPush>
        <maven.build.timestamp.format>yyyyMMdd'T'HHmmss</maven.build.timestamp.format>
        <docker-image.registry>${onap.nexus.dockerregistry.daily}</docker-image.registry>
        <docker-image.namespace>onap</docker-image.namespace>
        <docker-image.name>${project.groupId}.${project.artifactId}</docker-image.name>
        <docker.http_proxy></docker.http_proxy>

    </properties>

    <build>
        <sourceDirectory>${project.basedir}/src/main/kotlin</sourceDirectory>
        <testSourceDirectory>${project.basedir}/src/test/kotlin</testSourceDirectory>
        <resources>
            <resource>
                <directory>${project.basedir}/src/main/resources</directory>
            </resource>
        </resources>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>3.1.0</version>
                    <configuration>
                        <encoding>UTF-8</encoding>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <configuration>
                        <skip>true</skip>
                    </configuration>
                </plugin>
                <plugin>
                    <artifactId>kotlin-maven-plugin</artifactId>
                    <groupId>org.jetbrains.kotlin</groupId>
                    <version>${kotlin.version}</version>
                    <configuration>
                        <jvmTarget>1.8</jvmTarget>
                        <experimentalCoroutines>enable</experimentalCoroutines>
                    </configuration>
                    <executions>
                        <execution>
                            <id>compile</id>
                            <goals>
                                <goal>compile</goal>
                            </goals>
                            <configuration>
                                <sourceDirs>
                                    <source>${project.build.sourceDirectory}</source>
                                    <source>${project.build.directory}/generated-sources/annotations</source>
                                </sourceDirs>
                            </configuration>
                        </execution>
                        <execution>
                            <id>test-compile</id>
                            <goals>
                                <goal>test-compile</goal>
                            </goals>
                            <configuration>
                                <sourceDirs>
                                    <source>${project.build.testSourceDirectory}</source>
                                </sourceDirs>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>com.github.os72</groupId>
                    <artifactId>protoc-jar-maven-plugin</artifactId>
                    <version>${protoc-jar-maven-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>build-helper-maven-plugin</artifactId>
                    <version>${build-helper-maven-plugin.version}</version>
                    <executions>
                        <execution>
                            <id>add-source</id>
                            <phase>generate-sources</phase>
                            <goals>
                                <goal>add-source</goal>
                            </goals>
                            <configuration>
                                <sources>
                                    <source>${protobuf-generated-files.directory}</source>
                                </sources>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>${maven-compiler-plugin.version}</version>
                    <configuration>
                        <source>8</source>
                        <target>8</target>
                        <encoding>UTF-8</encoding>
                        <showWarnings>true</showWarnings>
                        <showDeprecation>true</showDeprecation>
                        <failOnWarning>false</failOnWarning>
                    </configuration>
                    <dependencies>
                        <dependency>
                            <groupId>org.ow2.asm</groupId>
                            <artifactId>asm</artifactId>
                            <version>6.1.1</version> <!-- Use newer version of ASM -->
                        </dependency>
                    </dependencies>
                </plugin>
                <!--
                 Due to a memory leak in Surefire 2.20 and issues running on Java 9, the junit-platform-surefire-provider
                 currently only works with Surefire 2.19.1.
                 For updates see https://junit.org/junit5/docs/current/user-guide/#running-tests-build-maven
                 -->
                <plugin>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <groupId>org.apache.maven.plugins</groupId>
                    <version>${maven-surefire-plugin.version}</version>
                    <configuration>
                        <failIfNoTests>${failIfMissingUnitTests}</failIfNoTests>
                        <forkCount>1</forkCount>
                        <includes>
                            <include>**/*Test.*</include>
                        </includes>
                    </configuration>
                    <dependencies>
                        <dependency>
                            <groupId>org.apache.commons</groupId>
                            <artifactId>commons-lang3</artifactId>
                            <version>3.7</version>
                        </dependency>
                        <dependency>
                            <groupId>org.junit.platform</groupId>
                            <artifactId>junit-platform-surefire-provider</artifactId>
                            <version>${junit-platform.version}</version>
                            <scope>runtime</scope>
                        </dependency>
                        <dependency>
                            <groupId>org.jetbrains.spek</groupId>
                            <artifactId>spek-junit-platform-engine</artifactId>
                            <version>${spek.version}</version>
                            <scope>runtime</scope>
                        </dependency>
                    </dependencies>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-failsafe-plugin</artifactId>
                    <version>2.22.0</version>
                    <configuration>
                        <failIfNoTests>${failIfMissingComponentTests}</failIfNoTests>
                        <forkCount>1</forkCount>
                        <includes>
                            <include>**/*Specification.*</include>
                        </includes>
                    </configuration>
                    <dependencies>
                        <dependency>
                            <groupId>org.apache.commons</groupId>
                            <artifactId>commons-lang3</artifactId>
                            <version>3.7</version>
                        </dependency>
                        <dependency>
                            <groupId>org.junit.platform</groupId>
                            <artifactId>junit-platform-surefire-provider</artifactId>
                            <version>${junit-platform.version}</version>
                            <scope>runtime</scope>
                        </dependency>
                        <dependency>
                            <groupId>org.jetbrains.spek</groupId>
                            <artifactId>spek-junit-platform-engine</artifactId>
                            <version>${spek.version}</version>
                            <scope>runtime</scope>
                        </dependency>
                    </dependencies>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <version>2.17</version>
                <dependencies>
                    <dependency>
                        <groupId>org.onap.oparent</groupId>
                        <artifactId>checkstyle</artifactId>
                        <version>1.1.1</version>
                    </dependency>
                </dependencies>
                <executions>
                    <execution>
                        <!-- To override oparent configuration different id must be used
                             We need to override it to include .kt files in check. -->
                        <id>check-license-kotlin</id>
                        <goals>
                            <goal>check</goal>
                        </goals>
                        <phase>process-sources</phase>
                        <configuration>
                            <configLocation>onap-checkstyle/check-license.xml</configLocation>
                            <includeResources>false</includeResources>
                            <includeTestSourceDirectory>true</includeTestSourceDirectory>
                            <includeTestResources>false</includeTestResources>
                            <includes>**\/*.kt</includes>
                            <consoleOutput>true</consoleOutput>
                            <!--<failOnViolation>false</failOnViolation>-->
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-antrun-plugin</artifactId>
                <version>1.8</version>
                <executions>
                    <execution>
                        <!-- This can be run separately with mvn antrun:run@detekt -->
                        <id>detekt</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <configuration>
                            <target name="detekt" unless="${skipAnalysis}">
                                <java taskname="detekt" dir="${basedir}"
                                        fork="true"
                                        failonerror="true"
                                        classname="io.gitlab.arturbosch.detekt.cli.Main"
                                        classpathref="maven.plugin.classpath">
                                    <arg value="--input"/>
                                    <arg value="${basedir}/src/main/kotlin"/>
                                    <arg value="--config-resource"/>
                                    <arg value="onap-detekt-config.yml"/>
                                    <arg value="--filters"/>
                                    <arg value=".*/target/.*,.*/resources/.*"/>
                                    <arg value="--output"/>
                                    <arg value="${basedir}/target/reports"/>
                                    <arg value="--output-name"/>
                                    <arg value="detekt-report"/>
                                    <arg value="--baseline"/>
                                    <arg value="${basedir}/target/reports/baseline.xml"/>
                                </java>
                            </target>
                        </configuration>
                    </execution>
                </executions>
                <dependencies>
                    <dependency>
                        <groupId>io.gitlab.arturbosch.detekt</groupId>
                        <artifactId>detekt-cli</artifactId>
                        <version>1.0.0.RC7</version>
                    </dependency>
                    <dependency>
                        <groupId>${project.groupId}</groupId>
                        <artifactId>hv-collector-analysis</artifactId>
                        <version>1.0.0-SNAPSHOT</version>
                    </dependency>
                </dependencies>
            </plugin>
        </plugins>
        <extensions>
            <extension>
                <groupId>kr.motd.maven</groupId>
                <artifactId>os-maven-plugin</artifactId>
                <version>1.6.0</version>
            </extension>
        </extensions>
    </build>

    <profiles>
        <profile>
            <id>docker</id>
            <activation>
                <property>
                    <name>!skipDocker</name>
                </property>
            </activation>
            <properties>
                <os.detected.name>linux</os.detected.name>
                <os.detected.arch>x86_64</os.detected.arch>
                <os.detected.classifier>${os.detected.name}-${os.detected.arch}</os.detected.classifier>
            </properties>
            <build>
                <pluginManagement>
                    <plugins>
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-dependency-plugin</artifactId>
                            <version>3.1.1</version>
                            <executions>
                                <execution>
                                    <id>docker-copy-internal-deps</id>
                                    <phase>package</phase>
                                    <goals>
                                        <goal>copy-dependencies</goal>
                                    </goals>
                                    <configuration>
                                        <outputDirectory>${project.build.directory}/libs/internal</outputDirectory>
                                        <includeGroupIds>${project.parent.groupId}</includeGroupIds>
                                        <includeScope>runtime</includeScope>
                                    </configuration>
                                </execution>
                                <execution>
                                    <id>docker-copy-external-deps</id>
                                    <phase>package</phase>
                                    <goals>
                                        <goal>copy-dependencies</goal>
                                    </goals>
                                    <configuration>
                                        <outputDirectory>${project.build.directory}/libs/external</outputDirectory>
                                        <excludeGroupIds>${project.parent.groupId}</excludeGroupIds>
                                        <includeScope>runtime</includeScope>
                                    </configuration>
                                </execution>
                            </executions>
                        </plugin>
                        <plugin>
                            <groupId>io.fabric8</groupId>
                            <artifactId>docker-maven-plugin</artifactId>
                            <version>0.26.0</version>
                            <executions>
                                <execution>
                                    <id>docker-build-image</id>
                                    <phase>package</phase>
                                    <goals>
                                        <goal>build</goal>
                                    </goals>
                                </execution>
                                <execution>
                                    <id>docker-push-image</id>
                                    <phase>deploy</phase>
                                    <goals>
                                        <goal>push</goal>
                                    </goals>
                                </execution>
                            </executions>
                            <configuration>
                                <skipPush>${skipDockerPush}</skipPush>
                                <verbose>true</verbose>
                                <imagePullPolicy>IfNotPresent</imagePullPolicy>
                                <images>
                                    <image>
                                        <alias>${project.artifactId}</alias>
                                        <name>${docker-image.namespace}/${docker-image.name}
                                        </name>
                                        <registry>${docker-image.registry}</registry>
                                        <build>
                                            <!--
                                            <args>
                                                <http_proxy>${docker.http_proxy}</http_proxy>
                                                <https_proxy>${docker.http_proxy}</https_proxy>
                                            </args>
                                            -->
                                            <dockerFileDir>${project.basedir}</dockerFileDir>
                                            <tags>
                                                <tag>${project.version}-SNAPSHOT-${maven.build.timestamp}Z</tag>
                                                <tag>${project.version}</tag>
                                                <tag>latest</tag>
                                            </tags>
                                        </build>
                                    </image>
                                </images>
                            </configuration>
                            <dependencies>
                                <dependency>
                                    <groupId>io.fabric8</groupId>
                                    <artifactId>run-java-sh</artifactId>
                                    <version>1.2.2</version>
                                </dependency>
                            </dependencies>
                        </plugin>
                    </plugins>
                </pluginManagement>
            </build>
        </profile>
    </profiles>

    <pluginRepositories>
        <pluginRepository>
            <id>arturbosch-code-analysis</id>
            <name>arturbosch-code-analysis (for detekt)</name>
            <url>https://dl.bintray.com/arturbosch/code-analysis/</url>
            <layout>default</layout>
            <releases>
                <enabled>true</enabled>
                <updatePolicy>never</updatePolicy>
            </releases>
            <snapshots>
                <enabled>false</enabled>
                <updatePolicy>never</updatePolicy>
            </snapshots>
        </pluginRepository>
    </pluginRepositories>

    <repositories>
        <repository>
            <id>40_openecomp-release</id>
            <name>40_openecomp-release</name>
            <url>https://nexus.onap.org/content/repositories/releases/</url>
            <releases>
                <enabled>true</enabled>
                <updatePolicy>daily</updatePolicy>
            </releases>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
    </repositories>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>com.google.guava</groupId>
                <artifactId>guava</artifactId>
                <version>25.0-jre</version>
                <exclusions>
                    <exclusion>
                        <groupId>com.google.code.findbugs</groupId>
                        <artifactId>jsr305</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.jetbrains.kotlin</groupId>
                <artifactId>kotlin-stdlib-jdk8</artifactId>
                <version>${kotlin.version}</version>
            </dependency>
            <dependency>
                <groupId>org.jetbrains.kotlin</groupId>
                <artifactId>kotlin-reflect</artifactId>
                <version>${kotlin.version}</version>
            </dependency>
            <dependency>
                <groupId>io.arrow-kt</groupId>
                <artifactId>arrow-core</artifactId>
                <version>${arrow.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.jetbrains.kotlin</groupId>
                        <artifactId>kotlin-stdlib</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.jetbrains.kotlin</groupId>
                        <artifactId>kotlin-stdlib-jdk7</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>io.arrow-kt</groupId>
                <artifactId>arrow-syntax</artifactId>
                <version>${arrow.version}</version>
            </dependency>
            <dependency>
                <groupId>io.arrow-kt</groupId>
                <artifactId>arrow-instances-core</artifactId>
                <version>${arrow.version}</version>
            </dependency>
            <dependency>
                <groupId>io.arrow-kt</groupId>
                <artifactId>arrow-instances-data</artifactId>
                <version>${arrow.version}</version>
            </dependency>
            <dependency>
                <groupId>io.arrow-kt</groupId>
                <artifactId>arrow-effects</artifactId>
                <version>${arrow.version}</version>
            </dependency>
            <dependency>
                <groupId>ch.qos.logback</groupId>
                <artifactId>logback-classic</artifactId>
                <version>1.3.0-alpha4</version>
                <scope>runtime</scope>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>1.8.0-beta1</version>
            </dependency>
            <dependency>
                <groupId>io.projectreactor</groupId>
                <artifactId>reactor-bom</artifactId>
                <version>Bismuth-SR10</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>io.netty</groupId>
                <artifactId>netty-tcnative-boringssl-static</artifactId>
                <version>2.0.8.Final</version>
                <classifier>${os.detected.classifier}</classifier>
            </dependency>
            <dependency>
                <groupId>com.google.protobuf</groupId>
                <artifactId>protobuf-java</artifactId>
                <version>${protobuf.version}</version>
            </dependency>
            <dependency>
                <groupId>com.google.protobuf</groupId>
                <artifactId>protobuf-java-util</artifactId>
                <version>${protobuf.version}</version>
            </dependency>
            <dependency>
                <groupId>commons-cli</groupId>
                <artifactId>commons-cli</artifactId>
                <version>1.4</version>
            </dependency>
            <dependency>
                <groupId>javax.json</groupId>
                <artifactId>javax.json-api</artifactId>
                <version>1.1.2</version>
            </dependency>
            <dependency>
                <groupId>org.glassfish</groupId>
                <artifactId>javax.json</artifactId>
                <version>1.1.2</version>
            </dependency>
            <dependency>
                <groupId>io.ratpack</groupId>
                <artifactId>ratpack-core</artifactId>
                <version>1.5.4</version>
            </dependency>
            <dependency>
                <groupId>io.micrometer</groupId>
                <artifactId>micrometer-registry-jmx</artifactId>
                <version>1.0.5</version>
            </dependency>

            <!-- Test dependencies -->

            <dependency>
                <groupId>org.jetbrains.spek</groupId>
                <artifactId>spek-api</artifactId>
                <version>${spek.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.jetbrains.spek</groupId>
                <artifactId>spek-junit-platform-engine</artifactId>
                <version>${spek.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.assertj</groupId>
                <artifactId>assertj-core</artifactId>
                <version>3.9.1</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>com.nhaarman</groupId>
                <artifactId>mockito-kotlin</artifactId>
                <version>1.5.0</version>
                <scope>test</scope>
                <exclusions>
                    <exclusion>
                        <groupId>org.mockito</groupId>
                        <artifactId>mockito-core</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-core</artifactId>
                <version>2.18.3</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.jetbrains.kotlin</groupId>
                <artifactId>kotlin-test</artifactId>
                <version>${kotlin.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>io.projectreactor</groupId>
                <artifactId>reactor-test</artifactId>
                <version>3.1.7.RELEASE</version>
                <scope>test</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>
</project>