3 # ============LICENSE_START=======================================================
4 # Copyright (C) 2019 Nordix Foundation.
5 # ================================================================================
6 # Licensed under the Apache License, Version 2.0 (the "License");
7 # you may not use this file except in compliance with the License.
8 # You may obtain a copy of the License at
10 # http://www.apache.org/licenses/LICENSE-2.0
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS,
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 # See the License for the specific language governing permissions and
16 # limitations under the License.
18 # SPDX-License-Identifier: Apache-2.0
19 # ============LICENSE_END=========================================================
21 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
22 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
23 <modelVersion>4.0.0</modelVersion>
26 <groupId>org.onap.oparent</groupId>
27 <artifactId>oparent</artifactId>
28 <version>3.0.0</version>
30 <!--- CHANGE THE FOLLOWING 3 OBJECTS for your own repo -->
31 <groupId>org.onap.dcaegen2.services</groupId>
32 <artifactId>pmsh</artifactId>
33 <name>dcaegen2-services-pm-subscription-handler</name>
34 <version>1.0.0-SNAPSHOT</version>
36 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
37 <sonar.sources>.</sonar.sources>
38 <sonar.junit.reportsPath>xunit-results.xml</sonar.junit.reportsPath>
39 <sonar.python.coverage.reportPaths>coverage.xml</sonar.python.coverage.reportPaths>
40 <sonar.python.xunit.reportPath>xunit-results.xml</sonar.python.xunit.reportPath>
41 <sonar.language>py</sonar.language>
42 <sonar.pluginname>python</sonar.pluginname>
43 <sonar.inclusions>**/*.py</sonar.inclusions>
44 <sonar.exclusions>target/**,tests/**,setup.py,**/__init__.py</sonar.exclusions>
45 <exec-mvn-plugin-version>1.2.1</exec-mvn-plugin-version>
48 <finalName>${project.artifactId}-${project.version}</finalName>
51 <!-- the following plugins are invoked from oparent, we do not need them -->
53 <groupId>org.sonatype.plugins</groupId>
54 <artifactId>nexus-staging-maven-plugin</artifactId>
56 <skipNexusStagingDeployMojo>true</skipNexusStagingDeployMojo>
60 <groupId>org.apache.maven.plugins</groupId>
61 <artifactId>maven-deploy-plugin</artifactId>
62 <!-- This version supports the "deployAtEnd" parameter -->
68 <groupId>org.apache.maven.plugins</groupId>
69 <artifactId>maven-enforcer-plugin</artifactId>
74 <!-- first disable the default Java plugins at various stages -->
75 <!-- maven-resources-plugin is called during "*resource" phases by default behavior. it prepares the resources
76 dir. we do not need it -->
78 <groupId>org.apache.maven.plugins</groupId>
79 <artifactId>maven-resources-plugin</artifactId>
84 <!-- maven-compiler-plugin is called during "compile" phases by default behavior. we do not need it -->
86 <groupId>org.apache.maven.plugins</groupId>
87 <artifactId>maven-compiler-plugin</artifactId>
92 <!-- maven-jar-plugin is called during "compile" phase by default behavior. we do not need it -->
94 <groupId>org.apache.maven.plugins</groupId>
95 <artifactId>maven-jar-plugin</artifactId>
102 <!-- maven-install-plugin is called during "install" phase by default behavior. it tries to copy stuff under
103 target dir to ~/.m2. we do not need it -->
105 <groupId>org.apache.maven.plugins</groupId>
106 <artifactId>maven-install-plugin</artifactId>
111 <!-- maven-surefire-plugin is called during "test" phase by default behavior. it triggers junit test.
112 we do not need it -->
114 <groupId>org.apache.maven.plugins</groupId>
115 <artifactId>maven-surefire-plugin</artifactId>
117 <skipTests>true</skipTests>
121 <groupId>org.codehaus.mojo</groupId>
122 <artifactId>exec-maven-plugin</artifactId>
123 <version>${exec-mvn-plugin-version}</version>
125 <executable>${project.basedir}/mvn-phase-script.sh</executable>
126 <environmentVariables>
127 <!-- make mvn properties as env for our script -->
128 <MVN_PROJECT_GROUPID>${project.groupId}</MVN_PROJECT_GROUPID>
129 <MVN_PROJECT_ARTIFACTID>${project.artifactId}</MVN_PROJECT_ARTIFACTID>
130 <MVN_PROJECT_VERSION>${project.version}</MVN_PROJECT_VERSION>
131 <MVN_NEXUSPROXY>${onap.nexus.url}</MVN_NEXUSPROXY>
132 <MVN_RAWREPO_BASEURL_UPLOAD>${onap.nexus.rawrepo.baseurl.upload}</MVN_RAWREPO_BASEURL_UPLOAD>
133 <MVN_RAWREPO_BASEURL_DOWNLOAD>${onap.nexus.rawrepo.baseurl.download}</MVN_RAWREPO_BASEURL_DOWNLOAD>
134 <MVN_RAWREPO_SERVERID>${onap.nexus.rawrepo.serverid}</MVN_RAWREPO_SERVERID>
135 <MVN_DOCKERREGISTRY_DAILY>${onap.nexus.dockerregistry.daily}</MVN_DOCKERREGISTRY_DAILY>
136 <MVN_DOCKERREGISTRY_SNAPSHOT>${onap.nexus.dockerregistry.daily}</MVN_DOCKERREGISTRY_SNAPSHOT>
137 <MVN_DOCKERREGISTRY_RELEASE>${onap.nexus.dockerregistry.release}</MVN_DOCKERREGISTRY_RELEASE>
138 </environmentVariables>
144 <!-- now we configure custom action (calling a script) at various lifecycle phases -->
146 <groupId>org.codehaus.mojo</groupId>
147 <artifactId>exec-maven-plugin</artifactId>
148 <version>${exec-mvn-plugin-version}</version>
151 <id>clean phase script</id>
158 <argument>__</argument>
159 <argument>clean</argument>
164 <id>generate-sources script</id>
165 <phase>generate-sources</phase>
171 <argument>__</argument>
172 <argument>generate-sources</argument>
177 <id>compile script</id>
178 <phase>compile</phase>
184 <argument>__</argument>
185 <argument>compile</argument>
190 <id>package script</id>
191 <phase>package</phase>
197 <argument>__</argument>
198 <argument>package</argument>
210 <argument>__</argument>
211 <argument>test</argument>
216 <id>install script</id>
217 <phase>install</phase>
223 <argument>__</argument>
224 <argument>install</argument>
229 <id>deploy script</id>
230 <phase>deploy</phase>
236 <argument>__</argument>
237 <argument>deploy</argument>