Custom detekt rule for logger usage check 91/73891/6
authorPiotr Jaszczyk <piotr.jaszczyk@nokia.com>
Wed, 28 Nov 2018 14:46:50 +0000 (15:46 +0100)
committerPiotr Jaszczyk <piotr.jaszczyk@nokia.com>
Thu, 29 Nov 2018 13:41:42 +0000 (14:41 +0100)
Check if logger invocations don't use unoptimal invocations, eg.
concatenation `debug("a=" + a)` instead of lambda use `debug {"a=" + a}`

Unfortunately to avoid defining dependencies in many places and having
circural dependencies it was necessarry to reorganize the maven module
structure. The goal was to have `sources` module with production code and
`build` module with build-time tooling (detekt rules among them).

Issue-ID: DCAEGEN2-1002
Change-Id: I36e677b98972aaae6905d722597cbce5e863d201
Signed-off-by: Piotr Jaszczyk <piotr.jaszczyk@nokia.com>
168 files changed:
build/hv-collector-analysis/pom.xml [new file with mode: 0644]
build/hv-collector-analysis/src/main/kotlin/org/onap/dcae/collectors/veshv/analysis/SuboptimalLoggerUsage.kt [new file with mode: 0644]
build/hv-collector-analysis/src/main/kotlin/org/onap/dcae/collectors/veshv/analysis/VesHvRuleSetProvider.kt [new file with mode: 0644]
build/hv-collector-analysis/src/main/resources/META-INF/services/io.gitlab.arturbosch.detekt.api.RuleSetProvider [new file with mode: 0644]
build/hv-collector-analysis/src/main/resources/onap-detekt-config.yml [moved from hv-collector-analysis/src/main/resources/onap-detekt-config.yml with 99% similarity]
build/hv-collector-analysis/src/test/kotlin/org/onap/dcae/collectors/veshv/analysis/SuboptimalLoggerUsageTest.kt [new file with mode: 0644]
build/hv-collector-analysis/src/test/resources/META-INF/services/javax.script.ScriptEngineFactory [new file with mode: 0644]
build/hv-collector-coverage/check-coverage.sh [moved from hv-collector-coverage/check-coverage.sh with 100% similarity]
build/hv-collector-coverage/pom.xml [moved from hv-collector-coverage/pom.xml with 98% similarity]
build/pom.xml [moved from hv-collector-analysis/pom.xml with 54% similarity]
pom.xml
sources/hv-collector-core/pom.xml [moved from hv-collector-core/pom.xml with 98% similarity]
sources/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/boundary/adapters.kt [moved from hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/boundary/adapters.kt with 100% similarity]
sources/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/boundary/api.kt [moved from hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/boundary/api.kt with 100% similarity]
sources/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/factory/CollectorFactory.kt [moved from hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/factory/CollectorFactory.kt with 100% similarity]
sources/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/factory/ServerFactory.kt [moved from hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/factory/ServerFactory.kt with 100% similarity]
sources/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/MessageValidator.kt [moved from hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/MessageValidator.kt with 100% similarity]
sources/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/Router.kt [moved from hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/Router.kt with 100% similarity]
sources/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/VesDecoder.kt [moved from hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/VesDecoder.kt with 100% similarity]
sources/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/VesHvCollector.kt [moved from hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/VesHvCollector.kt with 97% similarity]
sources/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/adapters/AdapterFactory.kt [moved from hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/adapters/AdapterFactory.kt with 100% similarity]
sources/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/adapters/ConsulConfigurationProvider.kt [moved from hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/adapters/ConsulConfigurationProvider.kt with 100% similarity]
sources/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/adapters/HttpAdapter.kt [moved from hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/adapters/HttpAdapter.kt with 100% similarity]
sources/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/adapters/LoggingSinkProvider.kt [moved from hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/adapters/LoggingSinkProvider.kt with 100% similarity]
sources/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/adapters/kafka/KafkaSink.kt [moved from hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/adapters/kafka/KafkaSink.kt with 100% similarity]
sources/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/adapters/kafka/KafkaSinkProvider.kt [moved from hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/adapters/kafka/KafkaSinkProvider.kt with 100% similarity]
sources/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/adapters/kafka/ProtobufSerializer.kt [moved from hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/adapters/kafka/ProtobufSerializer.kt with 100% similarity]
sources/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/adapters/kafka/VesMessageSerializer.kt [moved from hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/adapters/kafka/VesMessageSerializer.kt with 100% similarity]
sources/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/socket/NettyTcpServer.kt [moved from hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/socket/NettyTcpServer.kt with 100% similarity]
sources/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/wire/WireChunkDecoder.kt [moved from hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/wire/WireChunkDecoder.kt with 100% similarity]
sources/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/wire/WireFrameException.kt [moved from hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/wire/WireFrameException.kt with 100% similarity]
sources/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/model/CollectorConfiguration.kt [moved from hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/model/CollectorConfiguration.kt with 100% similarity]
sources/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/model/ConfigurationProviderParams.kt [moved from hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/model/ConfigurationProviderParams.kt with 100% similarity]
sources/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/model/RoutedMessage.kt [moved from hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/model/RoutedMessage.kt with 100% similarity]
sources/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/model/ServerConfiguration.kt [moved from hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/model/ServerConfiguration.kt with 100% similarity]
sources/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/model/VesMessage.kt [moved from hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/model/VesMessage.kt with 100% similarity]
sources/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/model/routing.kt [moved from hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/model/routing.kt with 100% similarity]
sources/hv-collector-core/src/test/kotlin/org/onap/dcae/collectors/veshv/impl/MessageValidatorTest.kt [moved from hv-collector-core/src/test/kotlin/org/onap/dcae/collectors/veshv/impl/MessageValidatorTest.kt with 100% similarity]
sources/hv-collector-core/src/test/kotlin/org/onap/dcae/collectors/veshv/impl/RouterTest.kt [moved from hv-collector-core/src/test/kotlin/org/onap/dcae/collectors/veshv/impl/RouterTest.kt with 100% similarity]
sources/hv-collector-core/src/test/kotlin/org/onap/dcae/collectors/veshv/impl/VesDecoderTest.kt [moved from hv-collector-core/src/test/kotlin/org/onap/dcae/collectors/veshv/impl/VesDecoderTest.kt with 100% similarity]
sources/hv-collector-core/src/test/kotlin/org/onap/dcae/collectors/veshv/impl/adapters/ConsulConfigurationProviderTest.kt [moved from hv-collector-core/src/test/kotlin/org/onap/dcae/collectors/veshv/impl/adapters/ConsulConfigurationProviderTest.kt with 100% similarity]
sources/hv-collector-core/src/test/kotlin/org/onap/dcae/collectors/veshv/impl/adapters/HttpAdapterTest.kt [moved from hv-collector-core/src/test/kotlin/org/onap/dcae/collectors/veshv/impl/adapters/HttpAdapterTest.kt with 100% similarity]
sources/hv-collector-core/src/test/kotlin/org/onap/dcae/collectors/veshv/impl/wire/WireChunkDecoderTest.kt [moved from hv-collector-core/src/test/kotlin/org/onap/dcae/collectors/veshv/impl/wire/WireChunkDecoderTest.kt with 100% similarity]
sources/hv-collector-core/src/test/resources/logback-test.xml [moved from hv-collector-core/src/test/resources/logback-test.xml with 100% similarity]
sources/hv-collector-ct/pom.xml [moved from hv-collector-ct/pom.xml with 98% similarity]
sources/hv-collector-ct/src/test/kotlin/org/onap/dcae/collectors/veshv/tests/component/PerformanceSpecification.kt [moved from hv-collector-ct/src/test/kotlin/org/onap/dcae/collectors/veshv/tests/component/PerformanceSpecification.kt with 100% similarity]
sources/hv-collector-ct/src/test/kotlin/org/onap/dcae/collectors/veshv/tests/component/Sut.kt [moved from hv-collector-ct/src/test/kotlin/org/onap/dcae/collectors/veshv/tests/component/Sut.kt with 100% similarity]
sources/hv-collector-ct/src/test/kotlin/org/onap/dcae/collectors/veshv/tests/component/VesHvSpecification.kt [moved from hv-collector-ct/src/test/kotlin/org/onap/dcae/collectors/veshv/tests/component/VesHvSpecification.kt with 100% similarity]
sources/hv-collector-ct/src/test/kotlin/org/onap/dcae/collectors/veshv/tests/component/spekUtils.kt [moved from hv-collector-ct/src/test/kotlin/org/onap/dcae/collectors/veshv/tests/component/spekUtils.kt with 100% similarity]
sources/hv-collector-ct/src/test/kotlin/org/onap/dcae/collectors/veshv/tests/fakes/FakeHealthState.kt [moved from hv-collector-ct/src/test/kotlin/org/onap/dcae/collectors/veshv/tests/fakes/FakeHealthState.kt with 100% similarity]
sources/hv-collector-ct/src/test/kotlin/org/onap/dcae/collectors/veshv/tests/fakes/configuration.kt [moved from hv-collector-ct/src/test/kotlin/org/onap/dcae/collectors/veshv/tests/fakes/configuration.kt with 100% similarity]
sources/hv-collector-ct/src/test/kotlin/org/onap/dcae/collectors/veshv/tests/fakes/metrics.kt [moved from hv-collector-ct/src/test/kotlin/org/onap/dcae/collectors/veshv/tests/fakes/metrics.kt with 100% similarity]
sources/hv-collector-ct/src/test/kotlin/org/onap/dcae/collectors/veshv/tests/fakes/sink.kt [moved from hv-collector-ct/src/test/kotlin/org/onap/dcae/collectors/veshv/tests/fakes/sink.kt with 100% similarity]
sources/hv-collector-ct/src/test/resources/logback-test.xml [moved from hv-collector-ct/src/test/resources/logback-test.xml with 100% similarity]
sources/hv-collector-dcae-app-simulator/Dockerfile [moved from hv-collector-dcae-app-simulator/Dockerfile with 100% similarity]
sources/hv-collector-dcae-app-simulator/pom.xml [moved from hv-collector-dcae-app-simulator/pom.xml with 98% similarity]
sources/hv-collector-dcae-app-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/dcaeapp/impl/DcaeAppSimulator.kt [moved from hv-collector-dcae-app-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/dcaeapp/impl/DcaeAppSimulator.kt with 100% similarity]
sources/hv-collector-dcae-app-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/dcaeapp/impl/MessageStreamValidation.kt [moved from hv-collector-dcae-app-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/dcaeapp/impl/MessageStreamValidation.kt with 100% similarity]
sources/hv-collector-dcae-app-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/dcaeapp/impl/adapters/DcaeAppApiServer.kt [moved from hv-collector-dcae-app-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/dcaeapp/impl/adapters/DcaeAppApiServer.kt with 100% similarity]
sources/hv-collector-dcae-app-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/dcaeapp/impl/adapters/KafkaSource.kt [moved from hv-collector-dcae-app-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/dcaeapp/impl/adapters/KafkaSource.kt with 100% similarity]
sources/hv-collector-dcae-app-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/dcaeapp/impl/config/ArgDcaeAppSimConfiguration.kt [moved from hv-collector-dcae-app-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/dcaeapp/impl/config/ArgDcaeAppSimConfiguration.kt with 100% similarity]
sources/hv-collector-dcae-app-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/dcaeapp/impl/config/DcaeAppSimConfiguration.kt [moved from hv-collector-dcae-app-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/dcaeapp/impl/config/DcaeAppSimConfiguration.kt with 100% similarity]
sources/hv-collector-dcae-app-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/dcaeapp/impl/consumer.kt [moved from hv-collector-dcae-app-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/dcaeapp/impl/consumer.kt with 100% similarity]
sources/hv-collector-dcae-app-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/dcaeapp/main.kt [moved from hv-collector-dcae-app-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/dcaeapp/main.kt with 100% similarity]
sources/hv-collector-dcae-app-simulator/src/main/resources/logback.xml [moved from hv-collector-dcae-app-simulator/src/main/resources/logback.xml with 100% similarity]
sources/hv-collector-dcae-app-simulator/src/test/kotlin/org/onap/dcae/collectors/veshv/simulators/dcaeapp/impl/ConsumerTest.kt [moved from hv-collector-dcae-app-simulator/src/test/kotlin/org/onap/dcae/collectors/veshv/simulators/dcaeapp/impl/ConsumerTest.kt with 100% similarity]
sources/hv-collector-dcae-app-simulator/src/test/kotlin/org/onap/dcae/collectors/veshv/simulators/dcaeapp/impl/DcaeAppSimulatorTest.kt [moved from hv-collector-dcae-app-simulator/src/test/kotlin/org/onap/dcae/collectors/veshv/simulators/dcaeapp/impl/DcaeAppSimulatorTest.kt with 100% similarity]
sources/hv-collector-dcae-app-simulator/src/test/kotlin/org/onap/dcae/collectors/veshv/simulators/dcaeapp/impl/MessageStreamValidationTest.kt [moved from hv-collector-dcae-app-simulator/src/test/kotlin/org/onap/dcae/collectors/veshv/simulators/dcaeapp/impl/MessageStreamValidationTest.kt with 100% similarity]
sources/hv-collector-dcae-app-simulator/src/test/kotlin/org/onap/dcae/collectors/veshv/simulators/dcaeapp/impl/adapters/KafkaSourceTest.kt [moved from hv-collector-dcae-app-simulator/src/test/kotlin/org/onap/dcae/collectors/veshv/simulators/dcaeapp/impl/adapters/KafkaSourceTest.kt with 100% similarity]
sources/hv-collector-dcae-app-simulator/src/test/kotlin/org/onap/dcae/collectors/veshv/simulators/dcaeapp/impl/config/ArgDcaeAppSimConfigurationTest.kt [moved from hv-collector-dcae-app-simulator/src/test/kotlin/org/onap/dcae/collectors/veshv/simulators/dcaeapp/impl/config/ArgDcaeAppSimConfigurationTest.kt with 100% similarity]
sources/hv-collector-domain/pom.xml [moved from hv-collector-domain/pom.xml with 98% similarity]
sources/hv-collector-domain/src/main/kotlin/org/onap/dcae/collectors/veshv/domain/ByteData.kt [moved from hv-collector-domain/src/main/kotlin/org/onap/dcae/collectors/veshv/domain/ByteData.kt with 100% similarity]
sources/hv-collector-domain/src/main/kotlin/org/onap/dcae/collectors/veshv/domain/PayloadContentType.kt [moved from hv-collector-domain/src/main/kotlin/org/onap/dcae/collectors/veshv/domain/PayloadContentType.kt with 100% similarity]
sources/hv-collector-domain/src/main/kotlin/org/onap/dcae/collectors/veshv/domain/SecurityConfiguration.kt [moved from hv-collector-domain/src/main/kotlin/org/onap/dcae/collectors/veshv/domain/SecurityConfiguration.kt with 100% similarity]
sources/hv-collector-domain/src/main/kotlin/org/onap/dcae/collectors/veshv/domain/VesEventDomain.kt [moved from hv-collector-domain/src/main/kotlin/org/onap/dcae/collectors/veshv/domain/VesEventDomain.kt with 100% similarity]
sources/hv-collector-domain/src/main/kotlin/org/onap/dcae/collectors/veshv/domain/codec.kt [moved from hv-collector-domain/src/main/kotlin/org/onap/dcae/collectors/veshv/domain/codec.kt with 100% similarity]
sources/hv-collector-domain/src/main/kotlin/org/onap/dcae/collectors/veshv/domain/errors.kt [moved from hv-collector-domain/src/main/kotlin/org/onap/dcae/collectors/veshv/domain/errors.kt with 100% similarity]
sources/hv-collector-domain/src/main/kotlin/org/onap/dcae/collectors/veshv/domain/validation.kt [moved from hv-collector-domain/src/main/kotlin/org/onap/dcae/collectors/veshv/domain/validation.kt with 100% similarity]
sources/hv-collector-domain/src/main/kotlin/org/onap/dcae/collectors/veshv/domain/wire_frame.kt [moved from hv-collector-domain/src/main/kotlin/org/onap/dcae/collectors/veshv/domain/wire_frame.kt with 100% similarity]
sources/hv-collector-domain/src/main/proto/event/VesEvent.proto [moved from hv-collector-domain/src/main/proto/event/VesEvent.proto with 100% similarity]
sources/hv-collector-domain/src/main/proto/measurements/README.md [moved from hv-collector-domain/src/main/proto/measurements/README.md with 100% similarity]
sources/hv-collector-domain/src/test/kotlin/org/onap/dcae/collectors/veshv/domain/WireFrameCodecsTest.kt [moved from hv-collector-domain/src/test/kotlin/org/onap/dcae/collectors/veshv/domain/WireFrameCodecsTest.kt with 100% similarity]
sources/hv-collector-domain/src/test/resources/logback.xml [moved from hv-collector-domain/src/test/resources/logback.xml with 100% similarity]
sources/hv-collector-health-check/pom.xml [moved from hv-collector-health-check/pom.xml with 97% similarity]
sources/hv-collector-health-check/src/main/kotlin/org/onap/dcae/collectors/veshv/healthcheck/api/HealthDescription.kt [moved from hv-collector-health-check/src/main/kotlin/org/onap/dcae/collectors/veshv/healthcheck/api/HealthDescription.kt with 100% similarity]
sources/hv-collector-health-check/src/main/kotlin/org/onap/dcae/collectors/veshv/healthcheck/api/HealthState.kt [moved from hv-collector-health-check/src/main/kotlin/org/onap/dcae/collectors/veshv/healthcheck/api/HealthState.kt with 100% similarity]
sources/hv-collector-health-check/src/main/kotlin/org/onap/dcae/collectors/veshv/healthcheck/api/HealthStatus.kt [moved from hv-collector-health-check/src/main/kotlin/org/onap/dcae/collectors/veshv/healthcheck/api/HealthStatus.kt with 100% similarity]
sources/hv-collector-health-check/src/main/kotlin/org/onap/dcae/collectors/veshv/healthcheck/factory/HealthCheckApiServer.kt [moved from hv-collector-health-check/src/main/kotlin/org/onap/dcae/collectors/veshv/healthcheck/factory/HealthCheckApiServer.kt with 100% similarity]
sources/hv-collector-health-check/src/main/kotlin/org/onap/dcae/collectors/veshv/healthcheck/impl/HealthStateImpl.kt [moved from hv-collector-health-check/src/main/kotlin/org/onap/dcae/collectors/veshv/healthcheck/impl/HealthStateImpl.kt with 100% similarity]
sources/hv-collector-health-check/src/test/kotlin/org/onap/dcae/collectors/veshv/healthcheck/impl/HealthStateProviderImplTest.kt [moved from hv-collector-health-check/src/test/kotlin/org/onap/dcae/collectors/veshv/healthcheck/impl/HealthStateProviderImplTest.kt with 100% similarity]
sources/hv-collector-main/Dockerfile [moved from hv-collector-main/Dockerfile with 100% similarity]
sources/hv-collector-main/pom.xml [moved from hv-collector-main/pom.xml with 98% similarity]
sources/hv-collector-main/src/main/kotlin/org/onap/dcae/collectors/veshv/main/ArgVesHvConfiguration.kt [moved from hv-collector-main/src/main/kotlin/org/onap/dcae/collectors/veshv/main/ArgVesHvConfiguration.kt with 100% similarity]
sources/hv-collector-main/src/main/kotlin/org/onap/dcae/collectors/veshv/main/MicrometerMetrics.kt [moved from hv-collector-main/src/main/kotlin/org/onap/dcae/collectors/veshv/main/MicrometerMetrics.kt with 100% similarity]
sources/hv-collector-main/src/main/kotlin/org/onap/dcae/collectors/veshv/main/main.kt [moved from hv-collector-main/src/main/kotlin/org/onap/dcae/collectors/veshv/main/main.kt with 100% similarity]
sources/hv-collector-main/src/main/kotlin/org/onap/dcae/collectors/veshv/main/servers/HealthCheckServer.kt [moved from hv-collector-main/src/main/kotlin/org/onap/dcae/collectors/veshv/main/servers/HealthCheckServer.kt with 100% similarity]
sources/hv-collector-main/src/main/kotlin/org/onap/dcae/collectors/veshv/main/servers/ServerStarter.kt [moved from hv-collector-main/src/main/kotlin/org/onap/dcae/collectors/veshv/main/servers/ServerStarter.kt with 100% similarity]
sources/hv-collector-main/src/main/kotlin/org/onap/dcae/collectors/veshv/main/servers/VesServer.kt [moved from hv-collector-main/src/main/kotlin/org/onap/dcae/collectors/veshv/main/servers/VesServer.kt with 100% similarity]
sources/hv-collector-main/src/main/resources/logback.xml [moved from hv-collector-main/src/main/resources/logback.xml with 100% similarity]
sources/hv-collector-main/src/main/scripts/healthcheck.sh [moved from hv-collector-main/src/main/scripts/healthcheck.sh with 100% similarity]
sources/hv-collector-main/src/test/kotlin/org/onap/dcae/collectors/veshv/main/ArgVesHvConfigurationTest.kt [moved from hv-collector-main/src/test/kotlin/org/onap/dcae/collectors/veshv/main/ArgVesHvConfigurationTest.kt with 100% similarity]
sources/hv-collector-main/src/test/kotlin/org/onap/dcae/collectors/veshv/main/MicrometerMetricsTest.kt [moved from hv-collector-main/src/test/kotlin/org/onap/dcae/collectors/veshv/main/MicrometerMetricsTest.kt with 100% similarity]
sources/hv-collector-main/src/test/kotlin/org/onap/dcae/collectors/veshv/main/NioBuffersTest.kt [moved from hv-collector-main/src/test/kotlin/org/onap/dcae/collectors/veshv/main/NioBuffersTest.kt with 100% similarity]
sources/hv-collector-ssl/pom.xml [moved from hv-collector-ssl/pom.xml with 98% similarity]
sources/hv-collector-ssl/src/main/kotlin/org/onap/dcae/collectors/veshv/ssl/boundary/ClientSslContextFactory.kt [moved from hv-collector-ssl/src/main/kotlin/org/onap/dcae/collectors/veshv/ssl/boundary/ClientSslContextFactory.kt with 100% similarity]
sources/hv-collector-ssl/src/main/kotlin/org/onap/dcae/collectors/veshv/ssl/boundary/ServerSslContextFactory.kt [moved from hv-collector-ssl/src/main/kotlin/org/onap/dcae/collectors/veshv/ssl/boundary/ServerSslContextFactory.kt with 100% similarity]
sources/hv-collector-ssl/src/main/kotlin/org/onap/dcae/collectors/veshv/ssl/boundary/SslContextFactory.kt [moved from hv-collector-ssl/src/main/kotlin/org/onap/dcae/collectors/veshv/ssl/boundary/SslContextFactory.kt with 100% similarity]
sources/hv-collector-ssl/src/main/kotlin/org/onap/dcae/collectors/veshv/ssl/boundary/utils.kt [moved from hv-collector-ssl/src/main/kotlin/org/onap/dcae/collectors/veshv/ssl/boundary/utils.kt with 100% similarity]
sources/hv-collector-ssl/src/main/kotlin/org/onap/dcae/collectors/veshv/ssl/impl/SslFactories.kt [moved from hv-collector-ssl/src/main/kotlin/org/onap/dcae/collectors/veshv/ssl/impl/SslFactories.kt with 100% similarity]
sources/hv-collector-ssl/src/test/kotlin/org/onap/dcae/collectors/veshv/ssl/boundary/ServerSslContextFactoryTest.kt [moved from hv-collector-ssl/src/test/kotlin/org/onap/dcae/collectors/veshv/ssl/boundary/ServerSslContextFactoryTest.kt with 100% similarity]
sources/hv-collector-ssl/src/test/resources/logback-test.xml [moved from hv-collector-ssl/src/test/resources/logback-test.xml with 100% similarity]
sources/hv-collector-ssl/src/test/resources/ssl/ca.crt [moved from hv-collector-ssl/src/test/resources/ssl/ca.crt with 100% similarity]
sources/hv-collector-ssl/src/test/resources/ssl/server.crt [moved from hv-collector-ssl/src/test/resources/ssl/server.crt with 100% similarity]
sources/hv-collector-ssl/src/test/resources/ssl/server.key [moved from hv-collector-ssl/src/test/resources/ssl/server.key with 100% similarity]
sources/hv-collector-ssl/src/test/resources/ssl/server.ks.pkcs12 [moved from hv-collector-ssl/src/test/resources/ssl/server.ks.pkcs12 with 100% similarity]
sources/hv-collector-ssl/src/test/resources/ssl/trust.pkcs12 [moved from hv-collector-ssl/src/test/resources/ssl/trust.pkcs12 with 100% similarity]
sources/hv-collector-test-utils/pom.xml [moved from hv-collector-test-utils/pom.xml with 97% similarity]
sources/hv-collector-test-utils/src/main/kotlin/org/onap/dcae/collectors/veshv/tests/utils/arrow.kt [moved from hv-collector-test-utils/src/main/kotlin/org/onap/dcae/collectors/veshv/tests/utils/arrow.kt with 100% similarity]
sources/hv-collector-test-utils/src/main/kotlin/org/onap/dcae/collectors/veshv/tests/utils/assertions.kt [moved from hv-collector-test-utils/src/main/kotlin/org/onap/dcae/collectors/veshv/tests/utils/assertions.kt with 100% similarity]
sources/hv-collector-test-utils/src/main/kotlin/org/onap/dcae/collectors/veshv/tests/utils/configurations.kt [moved from hv-collector-test-utils/src/main/kotlin/org/onap/dcae/collectors/veshv/tests/utils/configurations.kt with 100% similarity]
sources/hv-collector-test-utils/src/main/kotlin/org/onap/dcae/collectors/veshv/tests/utils/messages.kt [moved from hv-collector-test-utils/src/main/kotlin/org/onap/dcae/collectors/veshv/tests/utils/messages.kt with 100% similarity]
sources/hv-collector-test-utils/src/main/kotlin/org/onap/dcae/collectors/veshv/tests/utils/vesEvents.kt [moved from hv-collector-test-utils/src/main/kotlin/org/onap/dcae/collectors/veshv/tests/utils/vesEvents.kt with 100% similarity]
sources/hv-collector-test-utils/src/main/resources/mockito-extensions/org.mockito.plugins.MockMaker [moved from hv-collector-test-utils/src/main/resources/mockito-extensions/org.mockito.plugins.MockMaker with 100% similarity]
sources/hv-collector-utils/pom.xml [moved from hv-collector-utils/pom.xml with 98% similarity]
sources/hv-collector-utils/src/main/kotlin/org/onap/dcae/collectors/veshv/utils/arrow/core.kt [moved from hv-collector-utils/src/main/kotlin/org/onap/dcae/collectors/veshv/utils/arrow/core.kt with 100% similarity]
sources/hv-collector-utils/src/main/kotlin/org/onap/dcae/collectors/veshv/utils/arrow/effects.kt [moved from hv-collector-utils/src/main/kotlin/org/onap/dcae/collectors/veshv/utils/arrow/effects.kt with 100% similarity]
sources/hv-collector-utils/src/main/kotlin/org/onap/dcae/collectors/veshv/utils/commandline/ArgBasedConfiguration.kt [moved from hv-collector-utils/src/main/kotlin/org/onap/dcae/collectors/veshv/utils/commandline/ArgBasedConfiguration.kt with 100% similarity]
sources/hv-collector-utils/src/main/kotlin/org/onap/dcae/collectors/veshv/utils/commandline/CommandLineOption.kt [moved from hv-collector-utils/src/main/kotlin/org/onap/dcae/collectors/veshv/utils/commandline/CommandLineOption.kt with 100% similarity]
sources/hv-collector-utils/src/main/kotlin/org/onap/dcae/collectors/veshv/utils/commandline/WrongArgumentError.kt [moved from hv-collector-utils/src/main/kotlin/org/onap/dcae/collectors/veshv/utils/commandline/WrongArgumentError.kt with 100% similarity]
sources/hv-collector-utils/src/main/kotlin/org/onap/dcae/collectors/veshv/utils/commandline/extensions.kt [moved from hv-collector-utils/src/main/kotlin/org/onap/dcae/collectors/veshv/utils/commandline/extensions.kt with 100% similarity]
sources/hv-collector-utils/src/main/kotlin/org/onap/dcae/collectors/veshv/utils/http/http.kt [moved from hv-collector-utils/src/main/kotlin/org/onap/dcae/collectors/veshv/utils/http/http.kt with 100% similarity]
sources/hv-collector-utils/src/main/kotlin/org/onap/dcae/collectors/veshv/utils/http/ratpack.kt [moved from hv-collector-utils/src/main/kotlin/org/onap/dcae/collectors/veshv/utils/http/ratpack.kt with 100% similarity]
sources/hv-collector-utils/src/main/kotlin/org/onap/dcae/collectors/veshv/utils/logging/Logger.kt [moved from hv-collector-utils/src/main/kotlin/org/onap/dcae/collectors/veshv/utils/logging/Logger.kt with 98% similarity]
sources/hv-collector-utils/src/main/kotlin/org/onap/dcae/collectors/veshv/utils/logging/reactive_logging.kt [moved from hv-collector-utils/src/main/kotlin/org/onap/dcae/collectors/veshv/utils/logging/reactive_logging.kt with 100% similarity]
sources/hv-collector-utils/src/main/kotlin/org/onap/dcae/collectors/veshv/utils/server_handle.kt [moved from hv-collector-utils/src/main/kotlin/org/onap/dcae/collectors/veshv/utils/server_handle.kt with 100% similarity]
sources/hv-collector-utils/src/test/kotlin/org/onap/dcae/collectors/veshv/utils/arrow/CoreKtTest.kt [moved from hv-collector-utils/src/test/kotlin/org/onap/dcae/collectors/veshv/utils/arrow/CoreKtTest.kt with 100% similarity]
sources/hv-collector-utils/src/test/kotlin/org/onap/dcae/collectors/veshv/utils/commandline/CommandLineOptionTest.kt [moved from hv-collector-utils/src/test/kotlin/org/onap/dcae/collectors/veshv/utils/commandline/CommandLineOptionTest.kt with 100% similarity]
sources/hv-collector-utils/src/test/kotlin/org/onap/dcae/collectors/veshv/utils/commandline/WrongArgumentErrorTest.kt [moved from hv-collector-utils/src/test/kotlin/org/onap/dcae/collectors/veshv/utils/commandline/WrongArgumentErrorTest.kt with 100% similarity]
sources/hv-collector-utils/src/test/kotlin/org/onap/dcae/collectors/veshv/utils/http/ResponsesTest.kt [moved from hv-collector-utils/src/test/kotlin/org/onap/dcae/collectors/veshv/utils/http/ResponsesTest.kt with 100% similarity]
sources/hv-collector-utils/src/test/kotlin/org/onap/dcae/collectors/veshv/utils/logging/LoggerTest.kt [moved from hv-collector-utils/src/test/kotlin/org/onap/dcae/collectors/veshv/utils/logging/LoggerTest.kt with 100% similarity]
sources/hv-collector-ves-message-generator/pom.xml [moved from hv-collector-ves-message-generator/pom.xml with 98% similarity]
sources/hv-collector-ves-message-generator/src/main/kotlin/org/onap/dcae/collectors/veshv/ves/message/generator/api/MessageGenerator.kt [moved from hv-collector-ves-message-generator/src/main/kotlin/org/onap/dcae/collectors/veshv/ves/message/generator/api/MessageGenerator.kt with 100% similarity]
sources/hv-collector-ves-message-generator/src/main/kotlin/org/onap/dcae/collectors/veshv/ves/message/generator/api/MessageParameters.kt [moved from hv-collector-ves-message-generator/src/main/kotlin/org/onap/dcae/collectors/veshv/ves/message/generator/api/MessageParameters.kt with 100% similarity]
sources/hv-collector-ves-message-generator/src/main/kotlin/org/onap/dcae/collectors/veshv/ves/message/generator/api/MessageParametersParser.kt [moved from hv-collector-ves-message-generator/src/main/kotlin/org/onap/dcae/collectors/veshv/ves/message/generator/api/MessageParametersParser.kt with 100% similarity]
sources/hv-collector-ves-message-generator/src/main/kotlin/org/onap/dcae/collectors/veshv/ves/message/generator/api/MessageType.kt [moved from hv-collector-ves-message-generator/src/main/kotlin/org/onap/dcae/collectors/veshv/ves/message/generator/api/MessageType.kt with 100% similarity]
sources/hv-collector-ves-message-generator/src/main/kotlin/org/onap/dcae/collectors/veshv/ves/message/generator/factory/MessageGeneratorFactory.kt [moved from hv-collector-ves-message-generator/src/main/kotlin/org/onap/dcae/collectors/veshv/ves/message/generator/factory/MessageGeneratorFactory.kt with 100% similarity]
sources/hv-collector-ves-message-generator/src/main/kotlin/org/onap/dcae/collectors/veshv/ves/message/generator/impl/CommonEventHeaderParser.kt [moved from hv-collector-ves-message-generator/src/main/kotlin/org/onap/dcae/collectors/veshv/ves/message/generator/impl/CommonEventHeaderParser.kt with 100% similarity]
sources/hv-collector-ves-message-generator/src/main/kotlin/org/onap/dcae/collectors/veshv/ves/message/generator/impl/MessageGeneratorImpl.kt [moved from hv-collector-ves-message-generator/src/main/kotlin/org/onap/dcae/collectors/veshv/ves/message/generator/impl/MessageGeneratorImpl.kt with 100% similarity]
sources/hv-collector-ves-message-generator/src/main/kotlin/org/onap/dcae/collectors/veshv/ves/message/generator/impl/MessageParametersParserImpl.kt [moved from hv-collector-ves-message-generator/src/main/kotlin/org/onap/dcae/collectors/veshv/ves/message/generator/impl/MessageParametersParserImpl.kt with 100% similarity]
sources/hv-collector-ves-message-generator/src/main/kotlin/org/onap/dcae/collectors/veshv/ves/message/generator/impl/PayloadGenerator.kt [moved from hv-collector-ves-message-generator/src/main/kotlin/org/onap/dcae/collectors/veshv/ves/message/generator/impl/PayloadGenerator.kt with 100% similarity]
sources/hv-collector-ves-message-generator/src/test/kotlin/org/onap/dcae/collectors/veshv/ves/message/generator/impl/CommonEventHeaderParserTest.kt [moved from hv-collector-ves-message-generator/src/test/kotlin/org/onap/dcae/collectors/veshv/ves/message/generator/impl/CommonEventHeaderParserTest.kt with 100% similarity]
sources/hv-collector-ves-message-generator/src/test/kotlin/org/onap/dcae/collectors/veshv/ves/message/generator/impl/MessageGeneratorImplTest.kt [moved from hv-collector-ves-message-generator/src/test/kotlin/org/onap/dcae/collectors/veshv/ves/message/generator/impl/MessageGeneratorImplTest.kt with 100% similarity]
sources/hv-collector-ves-message-generator/src/test/kotlin/org/onap/dcae/collectors/veshv/ves/message/generator/impl/MessageParametersParserTest.kt [moved from hv-collector-ves-message-generator/src/test/kotlin/org/onap/dcae/collectors/veshv/ves/message/generator/impl/MessageParametersParserTest.kt with 100% similarity]
sources/hv-collector-ves-message-generator/src/test/kotlin/org/onap/dcae/collectors/veshv/ves/message/generator/impl/PayloadGeneratorTest.kt [moved from hv-collector-ves-message-generator/src/test/kotlin/org/onap/dcae/collectors/veshv/ves/message/generator/impl/PayloadGeneratorTest.kt with 100% similarity]
sources/hv-collector-ves-message-generator/src/test/kotlin/org/onap/dcae/collectors/veshv/ves/message/generator/impl/parameters.kt [moved from hv-collector-ves-message-generator/src/test/kotlin/org/onap/dcae/collectors/veshv/ves/message/generator/impl/parameters.kt with 100% similarity]
sources/hv-collector-xnf-simulator/Dockerfile [moved from hv-collector-xnf-simulator/Dockerfile with 100% similarity]
sources/hv-collector-xnf-simulator/pom.xml [moved from hv-collector-xnf-simulator/pom.xml with 98% similarity]
sources/hv-collector-xnf-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/impl/XnfSimulator.kt [moved from hv-collector-xnf-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/impl/XnfSimulator.kt with 100% similarity]
sources/hv-collector-xnf-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/impl/adapters/VesHvClient.kt [moved from hv-collector-xnf-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/impl/adapters/VesHvClient.kt with 100% similarity]
sources/hv-collector-xnf-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/impl/adapters/XnfApiServer.kt [moved from hv-collector-xnf-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/impl/adapters/XnfApiServer.kt with 100% similarity]
sources/hv-collector-xnf-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/impl/config/ArgXnfSimulatorConfiguration.kt [moved from hv-collector-xnf-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/impl/config/ArgXnfSimulatorConfiguration.kt with 100% similarity]
sources/hv-collector-xnf-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/impl/config/SimulatorConfiguration.kt [moved from hv-collector-xnf-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/impl/config/SimulatorConfiguration.kt with 100% similarity]
sources/hv-collector-xnf-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/impl/simulations.kt [moved from hv-collector-xnf-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/impl/simulations.kt with 100% similarity]
sources/hv-collector-xnf-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/main.kt [moved from hv-collector-xnf-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/main.kt with 100% similarity]
sources/hv-collector-xnf-simulator/src/main/resources/logback.xml [moved from hv-collector-xnf-simulator/src/main/resources/logback.xml with 100% similarity]
sources/hv-collector-xnf-simulator/src/test/kotlin/org/onap/dcae/collectors/veshv/main/OngoingSimulationsTest.kt [moved from hv-collector-xnf-simulator/src/test/kotlin/org/onap/dcae/collectors/veshv/main/OngoingSimulationsTest.kt with 100% similarity]
sources/hv-collector-xnf-simulator/src/test/kotlin/org/onap/dcae/collectors/veshv/main/XnfSimulatorTest.kt [moved from hv-collector-xnf-simulator/src/test/kotlin/org/onap/dcae/collectors/veshv/main/XnfSimulatorTest.kt with 100% similarity]
sources/pom.xml [new file with mode: 0644]

diff --git a/build/hv-collector-analysis/pom.xml b/build/hv-collector-analysis/pom.xml
new file mode 100644 (file)
index 0000000..7a553b4
--- /dev/null
@@ -0,0 +1,150 @@
+<?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.dcaegen2.collectors.hv-ves</groupId>
+        <artifactId>hv-collector-build</artifactId>
+        <version>1.1.0-SNAPSHOT</version>
+        <relativePath>..</relativePath>
+    </parent>
+
+    <artifactId>hv-collector-analysis</artifactId>
+    <version>1.1.0-SNAPSHOT</version>
+    <description>VES HighVolume Collector :: Code analysis configuration</description>
+
+    <dependencies>
+        <dependency>
+            <groupId>io.gitlab.arturbosch.detekt</groupId>
+            <artifactId>detekt-api</artifactId>
+            <version>${detekt.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.jetbrains.kotlin</groupId>
+            <artifactId>kotlin-stdlib-jdk8</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.jetbrains.kotlin</groupId>
+            <artifactId>kotlin-reflect</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.jetbrains.kotlin</groupId>
+            <artifactId>kotlin-compiler-embeddable</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.jetbrains.kotlin</groupId>
+            <artifactId>kotlin-script-runtime</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.jetbrains.kotlin</groupId>
+            <artifactId>kotlin-script-util</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>io.gitlab.arturbosch.detekt</groupId>
+            <artifactId>detekt-test</artifactId>
+            <version>${detekt.version}</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.jetbrains.spek</groupId>
+            <artifactId>spek-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.jetbrains.spek</groupId>
+            <artifactId>spek-junit-platform-engine</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.jetbrains.kotlin</groupId>
+            <artifactId>kotlin-test</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.assertj</groupId>
+            <artifactId>assertj-core</artifactId>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <sourceDirectory>${project.basedir}/src/main/kotlin</sourceDirectory>
+        <testSourceDirectory>${project.basedir}/src/test/kotlin</testSourceDirectory>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-deploy-plugin</artifactId>
+                <configuration>
+                    <skip>true</skip>
+                </configuration>
+            </plugin>
+
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-resources-plugin</artifactId>
+                <configuration>
+                    <encoding>UTF-8</encoding>
+                </configuration>
+            </plugin>
+
+            <plugin>
+                <artifactId>kotlin-maven-plugin</artifactId>
+                <groupId>org.jetbrains.kotlin</groupId>
+                <version>${kotlin.version}</version>
+                <configuration>
+                    <jvmTarget>1.8</jvmTarget>
+                </configuration>
+                <executions>
+                    <execution>
+                        <id>compile</id>
+                        <goals>
+                            <goal>compile</goal>
+                        </goals>
+                        <configuration>
+                            <sourceDirs>
+                                <source>${project.build.sourceDirectory}</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>
+        </plugins>
+    </build>
+</project>
diff --git a/build/hv-collector-analysis/src/main/kotlin/org/onap/dcae/collectors/veshv/analysis/SuboptimalLoggerUsage.kt b/build/hv-collector-analysis/src/main/kotlin/org/onap/dcae/collectors/veshv/analysis/SuboptimalLoggerUsage.kt
new file mode 100644 (file)
index 0000000..a070584
--- /dev/null
@@ -0,0 +1,92 @@
+/*
+ * ============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=========================================================
+ */
+package org.onap.dcae.collectors.veshv.analysis
+
+import io.gitlab.arturbosch.detekt.api.CodeSmell
+import io.gitlab.arturbosch.detekt.api.Config
+import io.gitlab.arturbosch.detekt.api.Debt
+import io.gitlab.arturbosch.detekt.api.Entity
+import io.gitlab.arturbosch.detekt.api.Issue
+import io.gitlab.arturbosch.detekt.api.Rule
+import io.gitlab.arturbosch.detekt.api.Severity
+import org.jetbrains.kotlin.com.intellij.psi.PsiElement
+import org.jetbrains.kotlin.psi.KtCallExpression
+import org.jetbrains.kotlin.psi.KtOperationExpression
+import org.jetbrains.kotlin.psi.KtStringTemplateExpression
+import org.jetbrains.kotlin.psi.KtValueArgumentList
+import org.jetbrains.kotlin.psi.psiUtil.anyDescendantOfType
+
+/**
+ * @author Piotr Jaszczyk <piotr.jaszczyk@nokia.com>
+ * @since November 2018
+ */
+class SuboptimalLoggerUsage(config: Config) : Rule(config) {
+
+    override val issue = Issue(javaClass.simpleName,
+            Severity.Performance,
+            """
+                Reports usage of unoptimized logger calls.
+                In Kotlin every method call (including logger calls) is eagerly evaluated by default. That means that
+                each argument will be evaluated even if loglevel is higher than in current call. The most common way of
+                mitigating this issue is to use lazy loading by means of lambda expressions, so instead of
+                log.debug("a=${'$'}a") we can write log.debug{ "a=${'$'}a" }. Logging string literals is fine - no
+                additional computation will be performed.""".trimIndent(),
+            Debt(mins = 10))
+
+    private val loggerNames = config.valueOrDefault("loggerNames", DEFAULT_LOGGER_NAMES).split(",")
+
+    private val loggingMethods = config.valueOrDefault("loggingMethodNames", DEFAULT_LOGGING_METHOD_NAMES).split(",")
+
+    override fun visitCallExpression(expression: KtCallExpression) {
+        val targetObject = expression.parent.firstChild
+        val methodName = expression.firstChild
+
+        logExpressionArguments(targetObject, methodName)
+                ?.let(this::checkGettingWarningMessage)
+                ?.let { reportCodeSmell(expression, it) }
+    }
+
+    private fun logExpressionArguments(targetObject: PsiElement, methodName: PsiElement) =
+            if (isLogExpression(targetObject, methodName))
+                methodName.nextSibling as? KtValueArgumentList
+            else null
+
+    private fun isLogExpression(targetObject: PsiElement, methodName: PsiElement) =
+            loggerNames.any(targetObject::textMatches) && loggingMethods.any(methodName::textMatches)
+
+    private fun checkGettingWarningMessage(args: KtValueArgumentList) = when {
+        args.anyDescendantOfType<KtOperationExpression> { true } ->
+            "should not use any operators in logging expression"
+        args.anyDescendantOfType<KtCallExpression> { true } ->
+            "should not call anything in logging expression"
+        args.anyDescendantOfType<KtStringTemplateExpression> { it.hasInterpolation() } ->
+            "should not use string interpolation in logging expression"
+        else -> null
+    }
+
+    private fun reportCodeSmell(expression: KtCallExpression, message: String) {
+        report(CodeSmell(issue, Entity.from(expression), message))
+    }
+
+    companion object {
+        const val DEFAULT_LOGGER_NAMES = "logger,LOGGER,log,LOG"
+        const val DEFAULT_LOGGING_METHOD_NAMES = "trace,debug,info,warn,error,severe"
+    }
+}
diff --git a/build/hv-collector-analysis/src/main/kotlin/org/onap/dcae/collectors/veshv/analysis/VesHvRuleSetProvider.kt b/build/hv-collector-analysis/src/main/kotlin/org/onap/dcae/collectors/veshv/analysis/VesHvRuleSetProvider.kt
new file mode 100644 (file)
index 0000000..eec933d
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+ * ============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=========================================================
+ */
+package org.onap.dcae.collectors.veshv.analysis
+
+import io.gitlab.arturbosch.detekt.api.Config
+import io.gitlab.arturbosch.detekt.api.RuleSet
+import io.gitlab.arturbosch.detekt.api.RuleSetProvider
+
+/**
+ * @author Piotr Jaszczyk <piotr.jaszczyk@nokia.com>
+ * @since November 2018
+ */
+class VesHvRuleSetProvider : RuleSetProvider {
+    override val ruleSetId: String
+        get() = "HvVesCustomRules"
+
+    override fun instance(config: Config) = RuleSet(ruleSetId, listOf(SuboptimalLoggerUsage(config)))
+
+}
diff --git a/build/hv-collector-analysis/src/main/resources/META-INF/services/io.gitlab.arturbosch.detekt.api.RuleSetProvider b/build/hv-collector-analysis/src/main/resources/META-INF/services/io.gitlab.arturbosch.detekt.api.RuleSetProvider
new file mode 100644 (file)
index 0000000..2b26f32
--- /dev/null
@@ -0,0 +1 @@
+org.onap.dcae.collectors.veshv.analysis.VesHvRuleSetProvider
\ No newline at end of file
@@ -473,3 +473,8 @@ style:
   WildcardImport:
     active: true
     excludeImports: 'java.util.*,kotlinx.android.synthetic.*'
+
+HvVesCustomRules:
+  active: true
+  SuboptimalLoggerUsage:
+    active: true
diff --git a/build/hv-collector-analysis/src/test/kotlin/org/onap/dcae/collectors/veshv/analysis/SuboptimalLoggerUsageTest.kt b/build/hv-collector-analysis/src/test/kotlin/org/onap/dcae/collectors/veshv/analysis/SuboptimalLoggerUsageTest.kt
new file mode 100644 (file)
index 0000000..0a1d658
--- /dev/null
@@ -0,0 +1,126 @@
+/*
+ * ============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=========================================================
+ */
+package org.onap.dcae.collectors.veshv.analysis
+
+import io.gitlab.arturbosch.detekt.api.Config
+import io.gitlab.arturbosch.detekt.test.TestConfig
+import io.gitlab.arturbosch.detekt.test.assertThat
+import io.gitlab.arturbosch.detekt.test.compileAndLint
+import org.jetbrains.spek.api.Spek
+import org.jetbrains.spek.api.dsl.describe
+import org.jetbrains.spek.api.dsl.it
+import org.jetbrains.spek.api.dsl.xdescribe
+
+/**
+ * @author Piotr Jaszczyk <piotr.jaszczyk></piotr.jaszczyk>@nokia.com>
+ * @since November 2018
+ */
+internal class SuboptimalLoggerUsageTest : Spek({
+
+    fun checkPassingCase(code: String, cut: SuboptimalLoggerUsage = SuboptimalLoggerUsage(Config.empty)) {
+        describe(code) {
+            val findings = cut.compileAndLint(CodeSamples.code(code))
+
+            it("should pass") {
+                assertThat(findings).isEmpty()
+            }
+        }
+    }
+
+    fun checkFailingCase(code: String, cut: SuboptimalLoggerUsage = SuboptimalLoggerUsage(Config.empty)) {
+        describe(code) {
+            val findings = cut.compileAndLint(CodeSamples.code(code))
+
+            it("should fail") {
+                assertThat(findings).isNotEmpty()
+            }
+        }
+    }
+
+    describe("passing cases") {
+        checkPassingCase(CodeSamples.noConcatCall)
+        checkPassingCase(CodeSamples.exceptionCall)
+        checkPassingCase(CodeSamples.lambdaCall)
+        checkPassingCase(CodeSamples.lambdaFunctionCall)
+        checkPassingCase(CodeSamples.lambdaExceptionCall)
+    }
+
+
+    describe("failing cases") {
+        checkFailingCase(CodeSamples.plainConcatCall)
+        checkFailingCase(CodeSamples.expansionCall)
+        checkFailingCase(CodeSamples.plainConcatExceptionCall)
+        checkFailingCase(CodeSamples.expansionExceptionCall)
+    }
+
+    describe("custom configuration") {
+        val cut = SuboptimalLoggerUsage(TestConfig(mapOf("loggerNames" to "l,lo", "loggingMethodNames" to "print")))
+        val strangeLogger = """
+            val l = object {
+                fun print(m: String) { }
+            }
+            val lo = l
+        """.trimIndent()
+
+        checkPassingCase(CodeSamples.plainConcatCall, cut)
+
+        checkPassingCase("""
+            $strangeLogger
+            l.print("n")""".trimIndent(), cut)
+
+        checkFailingCase("""
+            $strangeLogger
+            l.print("n=" + n)""".trimIndent(), cut)
+
+        checkFailingCase("""
+            $strangeLogger
+            lo.print("n=${'$'}n")""".trimIndent(), cut)
+    }
+})
+
+object CodeSamples {
+    private val codeBefore = """
+        object logger {
+            fun debug(msg: String) { println(msg) }
+            fun debug(msg: String, ex: Throwable) { println(msg + ". Cause: " + ex) }
+            fun debug(msg: () -> String) { println(msg()) }
+            fun debug(ex: Throwable, msg: () -> String) { println(msg() + ". Cause: " + ex) }
+        }
+
+        fun execute(n: Integer) {
+            val ex = Exception()
+
+    """.trimIndent()
+    private const val codeAfter = """}"""
+
+    const val noConcatCall = """logger.debug("Executing...")"""
+    const val exceptionCall = """logger.debug("Fail", ex)"""
+    const val lambdaCall = """logger.debug{ "n=${'$'}n" }"""
+    const val lambdaFunctionCall = """logger.debug { n.toString() }"""
+    const val lambdaExceptionCall = """logger.debug(ex) { "epic fail on n=" + n }"""
+
+    const val plainConcatCall = """logger.debug("n=" + n)"""
+    const val expansionCall = """logger.debug("n=${'$'}n")"""
+    const val plainConcatExceptionCall = """logger.debug("Fail. n=" + n, ex)"""
+    const val expansionExceptionCall = """logger.debug("Fail. n=${'$'}n", ex)"""
+
+
+    fun code(core: String) = codeBefore + core + codeAfter
+}
\ No newline at end of file
diff --git a/build/hv-collector-analysis/src/test/resources/META-INF/services/javax.script.ScriptEngineFactory b/build/hv-collector-analysis/src/test/resources/META-INF/services/javax.script.ScriptEngineFactory
new file mode 100644 (file)
index 0000000..f8f5900
--- /dev/null
@@ -0,0 +1 @@
+org.jetbrains.kotlin.script.jsr223.KotlinJsr223JvmLocalScriptEngineFactory
\ No newline at end of file
similarity index 98%
rename from hv-collector-coverage/pom.xml
rename to build/hv-collector-coverage/pom.xml
index f1e5c74..9b3f257 100644 (file)
@@ -32,7 +32,7 @@
 
     <parent>
         <groupId>org.onap.dcaegen2.collectors.hv-ves</groupId>
-        <artifactId>ves-hv-collector</artifactId>
+        <artifactId>hv-collector-build</artifactId>
         <version>1.1.0-SNAPSHOT</version>
         <relativePath>..</relativePath>
     </parent>
similarity index 54%
rename from hv-collector-analysis/pom.xml
rename to build/pom.xml
index 9ace275..fb1b8fb 100644 (file)
@@ -18,9 +18,8 @@
   ~ 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">
+<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>
     </licenses>
 
-    <groupId>org.onap.dcaegen2.collectors.hv-ves</groupId>
-    <artifactId>hv-collector-analysis</artifactId>
-    <version>1.1.0-SNAPSHOT</version>
-    <description>VES HighVolume Collector :: Code analysis configuration</description>
-
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-deploy-plugin</artifactId>
-                <configuration>
-                    <skip>true</skip>
-                </configuration>
-            </plugin>
+    <parent>
+        <groupId>org.onap.dcaegen2.collectors.hv-ves</groupId>
+        <artifactId>ves-hv-collector</artifactId>
+        <version>1.1.0-SNAPSHOT</version>
+        <relativePath>..</relativePath>
+    </parent>
 
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-resources-plugin</artifactId>
-                <version>3.1.0</version>
-                <configuration>
-                    <encoding>UTF-8</encoding>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
+    <artifactId>hv-collector-build</artifactId>
+    <version>1.1.0-SNAPSHOT</version>
+    <description>VES HighVolume Collector :: Build-time modules</description>
+    <packaging>pom</packaging>
 
-</project>
\ No newline at end of file
+    <modules>
+        <module>hv-collector-analysis</module>
+        <module>hv-collector-coverage</module>
+    </modules>
+</project>
diff --git a/pom.xml b/pom.xml
index 2381a60..5a83fc8 100644 (file)
--- a/pom.xml
+++ b/pom.xml
     <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-ssl</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>
+        <module>build</module>
+        <module>sources</module>
     </modules>
 
     <properties>
@@ -65,7 +54,7 @@
         <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>
-        <jacoco.minimum.coverage>60</jacoco.minimum.coverage>
+        <detekt.version>1.0.0-RC11</detekt.version>
 
         <!-- Protocol buffers -->
         <protobuf.version>3.6.1</protobuf.version>
@@ -81,6 +70,7 @@
         <failIfMissingUnitTests>false</failIfMissingUnitTests>
         <failIfMissingComponentTests>false</failIfMissingComponentTests>
         <skipAnalysis>true</skipAnalysis>
+        <jacoco.minimum.coverage>60</jacoco.minimum.coverage>
 
         <!-- Docker -->
         <skipDocker>false</skipDocker>
                     <version>${kotlin.version}</version>
                     <configuration>
                         <jvmTarget>1.8</jvmTarget>
-                        <experimentalCoroutines>enable</experimentalCoroutines>
                     </configuration>
                     <executions>
                         <execution>
                 </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="--report"/>
-                                    <arg value="detekt-report:${basedir}/target/reports"/>
-                                    <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-RC11</version>
-                    </dependency>
-                    <dependency>
-                        <groupId>${project.groupId}</groupId>
-                        <artifactId>hv-collector-analysis</artifactId>
-                        <version>1.1.0-SNAPSHOT</version>
-                    </dependency>
-                </dependencies>
-            </plugin>
-        </plugins>
         <extensions>
             <extension>
                 <groupId>kr.motd.maven</groupId>
                 <artifactId>kotlin-reflect</artifactId>
                 <version>${kotlin.version}</version>
             </dependency>
+            <dependency>
+                <groupId>org.jetbrains.kotlin</groupId>
+                <artifactId>kotlin-compiler-embeddable</artifactId>
+                <version>${kotlin.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.jetbrains.kotlin</groupId>
+                <artifactId>kotlin-script-runtime</artifactId>
+                <version>${kotlin.version}</version>
+                <scope>runtime</scope>
+            </dependency>
+            <dependency>
+                <groupId>org.jetbrains.kotlin</groupId>
+                <artifactId>kotlin-script-util</artifactId>
+                <version>${kotlin.version}</version>
+                <scope>runtime</scope>
+            </dependency>
             <dependency>
                 <groupId>org.jetbrains.kotlinx</groupId>
                 <artifactId>kotlinx-coroutines-core</artifactId>
similarity index 98%
rename from hv-collector-core/pom.xml
rename to sources/hv-collector-core/pom.xml
index a813529..7f7922e 100644 (file)
@@ -32,7 +32,7 @@
 
     <parent>
         <groupId>org.onap.dcaegen2.collectors.hv-ves</groupId>
-        <artifactId>ves-hv-collector</artifactId>
+        <artifactId>hv-collector-sources</artifactId>
         <version>1.1.0-SNAPSHOT</version>
         <relativePath>..</relativePath>
     </parent>
@@ -77,7 +77,9 @@ internal class VesHvCollector(
     private fun findRoute(msg: VesMessage): Mono<RoutedMessage> = omitWhenNone((router::findDestination)(msg))
 
     private fun <V> omitWhenNone(it: Option<V>): Mono<V> = it.fold(
-            { Mono.empty() },
+            {
+                logger.info("ommiting the message" + 5)
+                Mono.empty() },
             { Mono.just(it) })
 
     private fun releaseBuffersMemory(wireChunkDecoder: WireChunkDecoder) = wireChunkDecoder.release()
similarity index 98%
rename from hv-collector-ct/pom.xml
rename to sources/hv-collector-ct/pom.xml
index 07da24b..61ac426 100644 (file)
@@ -32,7 +32,7 @@
 
     <parent>
         <groupId>org.onap.dcaegen2.collectors.hv-ves</groupId>
-        <artifactId>ves-hv-collector</artifactId>
+        <artifactId>hv-collector-sources</artifactId>
         <version>1.1.0-SNAPSHOT</version>
         <relativePath>..</relativePath>
     </parent>
similarity index 98%
rename from hv-collector-dcae-app-simulator/pom.xml
rename to sources/hv-collector-dcae-app-simulator/pom.xml
index 82e99f9..c34e885 100644 (file)
@@ -32,7 +32,7 @@
 
     <parent>
         <groupId>org.onap.dcaegen2.collectors.hv-ves</groupId>
-        <artifactId>ves-hv-collector</artifactId>
+        <artifactId>hv-collector-sources</artifactId>
         <version>1.1.0-SNAPSHOT</version>
         <relativePath>..</relativePath>
     </parent>
similarity index 98%
rename from hv-collector-domain/pom.xml
rename to sources/hv-collector-domain/pom.xml
index e03de3c..f60cb60 100644 (file)
@@ -32,7 +32,7 @@
 
     <parent>
         <groupId>org.onap.dcaegen2.collectors.hv-ves</groupId>
-        <artifactId>ves-hv-collector</artifactId>
+        <artifactId>hv-collector-sources</artifactId>
         <version>1.1.0-SNAPSHOT</version>
         <relativePath>..</relativePath>
     </parent>
similarity index 97%
rename from hv-collector-health-check/pom.xml
rename to sources/hv-collector-health-check/pom.xml
index 6ecdc95..3e5c6aa 100644 (file)
@@ -18,7 +18,7 @@
 
     <parent>
         <groupId>org.onap.dcaegen2.collectors.hv-ves</groupId>
-        <artifactId>ves-hv-collector</artifactId>
+        <artifactId>hv-collector-sources</artifactId>
         <version>1.1.0-SNAPSHOT</version>
         <relativePath>..</relativePath>
     </parent>
similarity index 98%
rename from hv-collector-main/pom.xml
rename to sources/hv-collector-main/pom.xml
index 9e7101b..a94d634 100644 (file)
@@ -32,7 +32,7 @@
 
     <parent>
         <groupId>org.onap.dcaegen2.collectors.hv-ves</groupId>
-        <artifactId>ves-hv-collector</artifactId>
+        <artifactId>hv-collector-sources</artifactId>
         <version>1.1.0-SNAPSHOT</version>
         <relativePath>..</relativePath>
     </parent>
similarity index 98%
rename from hv-collector-ssl/pom.xml
rename to sources/hv-collector-ssl/pom.xml
index e9cbdc2..6001ba9 100644 (file)
@@ -32,7 +32,7 @@
 
     <parent>
         <groupId>org.onap.dcaegen2.collectors.hv-ves</groupId>
-        <artifactId>ves-hv-collector</artifactId>
+        <artifactId>hv-collector-sources</artifactId>
         <version>1.1.0-SNAPSHOT</version>
         <relativePath>..</relativePath>
     </parent>
similarity index 97%
rename from hv-collector-test-utils/pom.xml
rename to sources/hv-collector-test-utils/pom.xml
index 9dad2ac..aebdd65 100644 (file)
@@ -13,7 +13,7 @@
 
     <parent>
         <groupId>org.onap.dcaegen2.collectors.hv-ves</groupId>
-        <artifactId>ves-hv-collector</artifactId>
+        <artifactId>hv-collector-sources</artifactId>
         <version>1.1.0-SNAPSHOT</version>
         <relativePath>..</relativePath>
     </parent>
similarity index 98%
rename from hv-collector-utils/pom.xml
rename to sources/hv-collector-utils/pom.xml
index d38ccb9..66879ff 100644 (file)
@@ -36,7 +36,7 @@
 
     <parent>
         <groupId>org.onap.dcaegen2.collectors.hv-ves</groupId>
-        <artifactId>ves-hv-collector</artifactId>
+        <artifactId>hv-collector-sources</artifactId>
         <version>1.1.0-SNAPSHOT</version>
         <relativePath>..</relativePath>
     </parent>
@@ -22,7 +22,7 @@ package org.onap.dcae.collectors.veshv.utils.logging
 import kotlin.reflect.KClass
 import org.slf4j.LoggerFactory
 
-@Suppress("TooManyFunctions")
+@Suppress("TooManyFunctions", "SuboptimalLoggerUsage")
 class Logger(val logger: org.slf4j.Logger) {
     constructor(clazz: KClass<out Any>) : this(LoggerFactory.getLogger(clazz.java))
     constructor(name: String) : this(LoggerFactory.getLogger(name))
@@ -32,7 +32,7 @@
 
     <parent>
         <groupId>org.onap.dcaegen2.collectors.hv-ves</groupId>
-        <artifactId>ves-hv-collector</artifactId>
+        <artifactId>hv-collector-sources</artifactId>
         <version>1.1.0-SNAPSHOT</version>
         <relativePath>..</relativePath>
     </parent>
similarity index 98%
rename from hv-collector-xnf-simulator/pom.xml
rename to sources/hv-collector-xnf-simulator/pom.xml
index 6526915..de26256 100644 (file)
@@ -32,7 +32,7 @@
 
     <parent>
         <groupId>org.onap.dcaegen2.collectors.hv-ves</groupId>
-        <artifactId>ves-hv-collector</artifactId>
+        <artifactId>hv-collector-sources</artifactId>
         <version>1.1.0-SNAPSHOT</version>
         <relativePath>..</relativePath>
     </parent>
diff --git a/sources/pom.xml b/sources/pom.xml
new file mode 100644 (file)
index 0000000..06726bb
--- /dev/null
@@ -0,0 +1,135 @@
+<?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.dcaegen2.collectors.hv-ves</groupId>
+        <artifactId>ves-hv-collector</artifactId>
+        <version>1.1.0-SNAPSHOT</version>
+        <relativePath>..</relativePath>
+    </parent>
+
+    <artifactId>hv-collector-sources</artifactId>
+    <version>1.1.0-SNAPSHOT</version>
+    <description>VES HighVolume Collector :: Sources</description>
+    <packaging>pom</packaging>
+
+    <build>
+        <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="--report"/>
+                                    <arg value="html:${basedir}/target/detekt-report.html"/>
+                                </java>
+                            </target>
+                        </configuration>
+                    </execution>
+                </executions>
+                <dependencies>
+                    <dependency>
+                        <groupId>io.gitlab.arturbosch.detekt</groupId>
+                        <artifactId>detekt-cli</artifactId>
+                        <version>${detekt.version}</version>
+                    </dependency>
+                    <dependency>
+                        <groupId>${project.groupId}</groupId>
+                        <artifactId>hv-collector-analysis</artifactId>
+                        <version>1.1.0-SNAPSHOT</version>
+                    </dependency>
+                </dependencies>
+            </plugin>
+        </plugins>
+    </build>
+
+    <modules>
+        <module>hv-collector-core</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-ssl</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>
+</project>