3 # ============LICENSE_START=======================================================
4 # Copyright (C) 2019 Nordix Foundation.
5 # Copyright 2020 Deutsche Telekom. All rights reserved.
6 # ================================================================================
7 # Licensed under the Apache License, Version 2.0 (the "License");
8 # you may not use this file except in compliance with the License.
9 # You may obtain a copy of the License at
11 # http://www.apache.org/licenses/LICENSE-2.0
13 # Unless required by applicable law or agreed to in writing, software
14 # distributed under the License is distributed on an "AS IS" BASIS,
15 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 # See the License for the specific language governing permissions and
17 # limitations under the License.
19 # SPDX-License-Identifier: Apache-2.0
20 # ============LICENSE_END=========================================================
22 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
23 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
24 <modelVersion>4.0.0</modelVersion>
27 <groupId>org.onap.oparent</groupId>
28 <artifactId>oparent</artifactId>
29 <version>3.0.0</version>
31 <!--- CHANGE THE FOLLOWING 3 OBJECTS for your own repo -->
32 <groupId>org.onap.dcaegen2.services</groupId>
33 <artifactId>pmsh</artifactId>
34 <name>dcaegen2-services-pm-subscription-handler</name>
35 <version>1.4.0-SNAPSHOT</version>
37 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
38 <sonar.sources>.</sonar.sources>
39 <sonar.junit.reportsPath>xunit-results.xml</sonar.junit.reportsPath>
40 <sonar.python.coverage.reportPaths>coverage.xml</sonar.python.coverage.reportPaths>
41 <sonar.python.xunit.reportPath>xunit-results.xml</sonar.python.xunit.reportPath>
42 <sonar.language>py</sonar.language>
43 <sonar.pluginname>python</sonar.pluginname>
44 <sonar.inclusions>**/*.py</sonar.inclusions>
45 <sonar.exclusions>target/**,tests/**,setup.py,**/__init__.py</sonar.exclusions>
46 <exec-mvn-plugin-version>1.2.1</exec-mvn-plugin-version>
49 <finalName>${project.artifactId}-${project.version}</finalName>
52 <!-- the following plugins are invoked from oparent, we do not need them -->
54 <groupId>org.sonatype.plugins</groupId>
55 <artifactId>nexus-staging-maven-plugin</artifactId>
57 <skipNexusStagingDeployMojo>true</skipNexusStagingDeployMojo>
61 <groupId>org.apache.maven.plugins</groupId>
62 <artifactId>maven-deploy-plugin</artifactId>
63 <!-- This version supports the "deployAtEnd" parameter -->
69 <groupId>org.apache.maven.plugins</groupId>
70 <artifactId>maven-enforcer-plugin</artifactId>
75 <!-- first disable the default Java plugins at various stages -->
76 <!-- maven-resources-plugin is called during "*resource" phases by default behavior. it prepares the resources
77 dir. we do not need it -->
79 <groupId>org.apache.maven.plugins</groupId>
80 <artifactId>maven-resources-plugin</artifactId>
85 <!-- maven-compiler-plugin is called during "compile" phases by default behavior. we do not need it -->
87 <groupId>org.apache.maven.plugins</groupId>
88 <artifactId>maven-compiler-plugin</artifactId>
93 <!-- maven-jar-plugin is called during "compile" phase by default behavior. we do not need it -->
95 <groupId>org.apache.maven.plugins</groupId>
96 <artifactId>maven-jar-plugin</artifactId>
103 <!-- maven-install-plugin is called during "install" phase by default behavior. it tries to copy stuff under
104 target dir to ~/.m2. we do not need it -->
106 <groupId>org.apache.maven.plugins</groupId>
107 <artifactId>maven-install-plugin</artifactId>
112 <!-- maven-surefire-plugin is called during "test" phase by default behavior. it triggers junit test.
113 we do not need it -->
115 <groupId>org.apache.maven.plugins</groupId>
116 <artifactId>maven-surefire-plugin</artifactId>
118 <skipTests>true</skipTests>
122 <groupId>org.codehaus.mojo</groupId>
123 <artifactId>exec-maven-plugin</artifactId>
124 <version>${exec-mvn-plugin-version}</version>
126 <executable>${project.basedir}/mvn-phase-script.sh</executable>
127 <environmentVariables>
128 <!-- make mvn properties as env for our script -->
129 <MVN_PROJECT_GROUPID>${project.groupId}</MVN_PROJECT_GROUPID>
130 <MVN_PROJECT_ARTIFACTID>${project.artifactId}</MVN_PROJECT_ARTIFACTID>
131 <MVN_PROJECT_VERSION>${project.version}</MVN_PROJECT_VERSION>
132 <MVN_NEXUSPROXY>${onap.nexus.url}</MVN_NEXUSPROXY>
133 <MVN_RAWREPO_BASEURL_UPLOAD>${onap.nexus.rawrepo.baseurl.upload}</MVN_RAWREPO_BASEURL_UPLOAD>
134 <MVN_RAWREPO_BASEURL_DOWNLOAD>${onap.nexus.rawrepo.baseurl.download}</MVN_RAWREPO_BASEURL_DOWNLOAD>
135 <MVN_RAWREPO_SERVERID>${onap.nexus.rawrepo.serverid}</MVN_RAWREPO_SERVERID>
136 <MVN_DOCKERREGISTRY_DAILY>${onap.nexus.dockerregistry.daily}</MVN_DOCKERREGISTRY_DAILY>
137 <MVN_DOCKERREGISTRY_SNAPSHOT>${onap.nexus.dockerregistry.daily}</MVN_DOCKERREGISTRY_SNAPSHOT>
138 <MVN_DOCKERREGISTRY_RELEASE>${onap.nexus.dockerregistry.release}</MVN_DOCKERREGISTRY_RELEASE>
139 </environmentVariables>
145 <!-- now we configure custom action (calling a script) at various lifecycle phases -->
147 <groupId>org.codehaus.mojo</groupId>
148 <artifactId>exec-maven-plugin</artifactId>
149 <version>${exec-mvn-plugin-version}</version>
152 <id>clean phase script</id>
159 <argument>__</argument>
160 <argument>clean</argument>
165 <id>generate-sources script</id>
166 <phase>generate-sources</phase>
172 <argument>__</argument>
173 <argument>generate-sources</argument>
178 <id>compile script</id>
179 <phase>compile</phase>
185 <argument>__</argument>
186 <argument>compile</argument>
191 <id>package script</id>
192 <phase>package</phase>
198 <argument>__</argument>
199 <argument>package</argument>
211 <argument>__</argument>
212 <argument>test</argument>
217 <id>install script</id>
218 <phase>install</phase>
224 <argument>__</argument>
225 <argument>install</argument>
230 <id>deploy script</id>
231 <phase>deploy</phase>
237 <argument>__</argument>
238 <argument>deploy</argument>