blob: dba38f8ed00b1fc8559c7ca3d9825e7b2b4992e4 [file] [log] [blame]
Lusheng Jif487f062017-08-29 14:18:43 +00001<?xml version="1.0"?>
2<!--
3================================================================================
4Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
5================================================================================
6Licensed under the Apache License, Version 2.0 (the "License");
7you may not use this file except in compliance with the License.
8You may obtain a copy of the License at
9
10 http://www.apache.org/licenses/LICENSE-2.0
11
12Unless required by applicable law or agreed to in writing, software
13distributed under the License is distributed on an "AS IS" BASIS,
14WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15See the License for the specific language governing permissions and
16limitations under the License.
17============LICENSE_END=========================================================
18
19ECOMP is a trademark and service mark of AT&T Intellectual Property.
20-->
21<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">
22 <modelVersion>4.0.0</modelVersion>
23 <parent>
24 <groupId>org.onap.oparent</groupId>
25 <artifactId>oparent</artifactId>
26 <version>1.0.0-SNAPSHOT</version>
27 </parent>
28
29 <!--- CHANGE THE FOLLOWING 3 OBJECTS for your own repo -->
30 <groupId>org.onap.dcaegen2.platform</groupId>
31 <artifactId>policy-handler</artifactId>
32 <name>policy-handler</name>
33
34 <version>1.0.0-SNAPSHOT</version>
35 <url>http://maven.apache.org</url>
36 <properties>
37 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
38 <sonar.sources>.</sonar.sources>
39 <!-- customize the SONARQUBE URL -->
40 <!-- sonar.host.url>http://localhost:9000</sonar.host.url -->
41 <!-- below are language dependent -->
42 <!-- for Python -->
43 <sonar.language>py</sonar.language>
44 <sonar.pluginName>Python</sonar.pluginName>
45 <sonar.inclusions>**/*.py</sonar.inclusions>
46 <!-- for JavaScaript -->
47 <!--
48 <sonar.language>js</sonar.language>
49 <sonar.pluginName>JS</sonar.pluginName>
50 <sonar.inclusions>**/*.js</sonar.inclusions>
51 -->
52 </properties>
53
54 <build>
55 <finalName>${project.artifactId}-${project.version}</finalName>
56 <pluginManagement>
57 <plugins>
58 <!-- the following plugins are invoked from oparent, we do not need them -->
59
60
61 <plugin>
62 <groupId>org.sonatype.plugins</groupId>
63 <artifactId>nexus-staging-maven-plugin</artifactId>
64 <version>1.6.7</version>
65 <configuration>
66 <skipNexusStagingDeployMojo>true</skipNexusStagingDeployMojo>
67 </configuration>
68 </plugin>
69 <plugin>
70 <groupId>org.apache.maven.plugins</groupId>
71 <artifactId>maven-deploy-plugin</artifactId>
72 <!-- This version supports the "deployAtEnd" parameter -->
73 <version>2.8</version>
74 <configuration>
75 <skip>true</skip>
76 </configuration>
77 </plugin>
78
79 <!-- first disable the default Java plugins at various stages -->
80 <!-- maven-resources-plugin is called during "*resource" phases by default behavior. it prepares the resources
81 dir. we do not need it -->
82 <plugin>
83 <groupId>org.apache.maven.plugins</groupId>
84 <artifactId>maven-resources-plugin</artifactId>
85 <version>2.6</version>
86 <configuration>
87 <skip>true</skip>
88 </configuration>
89 </plugin>
90
91 <!-- maven-compiler-plugin is called during "compile" phases by default behavior. we do not need it -->
92 <plugin>
93 <groupId>org.apache.maven.plugins</groupId>
94 <artifactId>maven-compiler-plugin</artifactId>
95 <version>3.1</version>
96 <configuration>
97 <skip>true</skip>
98 </configuration>
99 </plugin>
100
101 <!-- maven-jar-plugin is called during "compile" phase by default behavior. we do not need it -->
102 <plugin>
103 <groupId>org.apache.maven.plugins</groupId>
104 <artifactId>maven-jar-plugin</artifactId>
105 <version>2.4</version>
106 <executions>
107 <execution>
108 <id>default-jar</id>
109 <phase/>
110 </execution>
111 </executions>
112 </plugin>
113
114 <!-- maven-install-plugin is called during "install" phase by default behavior. it tries to copy stuff under
115 target dir to ~/.m2. we do not need it -->
116 <plugin>
117 <groupId>org.apache.maven.plugins</groupId>
118 <artifactId>maven-install-plugin</artifactId>
119 <version>2.4</version>
120 <configuration>
121 <skip>true</skip>
122 </configuration>
123 </plugin>
124
125 <!-- maven-surefire-plugin is called during "test" phase by default behavior. it triggers junit test.
126 we do not need it -->
127 <plugin>
128 <groupId>org.apache.maven.plugins</groupId>
129 <artifactId>maven-surefire-plugin</artifactId>
130 <version>2.12.4</version>
131 <configuration>
132 <skipTests>true</skipTests>
133 </configuration>
134 </plugin>
135
136
137 </plugins>
138 </pluginManagement>
139
140 <plugins>
141 <!-- plugin>
142 <artifactId>maven-assembly-plugin</artifactId>
143 <version>2.4.1</version>
144 <configuration>
145 <descriptors>
146 <descriptor>assembly/dep.xml</descriptor>
147 </descriptors>
148 </configuration>
149 <executions>
150 <execution>
151 <id>make-assembly</id>
152 <phase>package</phase>
153 <goals>
154 <goal>single</goal>
155 </goals>
156 </execution>
157 </executions>
158 </plugin -->
159
160
161 <!-- now we configure custom action (calling a script) at various lifecycle phases -->
162 <plugin>
163 <groupId>org.codehaus.mojo</groupId>
164 <artifactId>exec-maven-plugin</artifactId>
165 <version>1.2.1</version>
166 <executions>
167 <execution>
168 <id>clean phase script</id>
169 <phase>clean</phase>
170 <goals><goal>exec</goal></goals>
171 <configuration>
172 <executable>${session.executionRootDirectory}/mvn-phase-script.sh</executable>
173 <arguments>
174 <argument>${project.artifactId}</argument>
175 <argument>clean</argument>
176 </arguments>
177 <environmentVariables>
178 <!-- make mvn properties as env for our script -->
179 <MVN_PROJECT_GROUPID>${project.groupId}</MVN_PROJECT_GROUPID>
180 <MVN_PROJECT_ARTIFACTID>${project.artifactId}</MVN_PROJECT_ARTIFACTID>
181 <MVN_PROJECT_VERSION>${project.version}</MVN_PROJECT_VERSION>
182 <MVN_NEXUSPROXY>${onap.nexus.url}</MVN_NEXUSPROXY>
183 <!--MVN_DOCKERREG_URL>${docker.push.registry}</MVN_DOCKERREG_URL-->
184 </environmentVariables>
185 </configuration>
186 </execution>
187
188 <execution>
189 <id>generate-sources script</id>
190 <phase>generate-sources</phase>
191 <goals><goal>exec</goal></goals>
192 <configuration>
193 <executable>mvn-phase-script.sh</executable>
194 <arguments>
195 <argument>${project.artifactId}</argument>
196 <argument>generate-sources</argument>
197 </arguments>
198 <environmentVariables>
199 <!-- make mvn properties as env for our script -->
200 <MVN_PROJECT_GROUPID>${project.groupId}</MVN_PROJECT_GROUPID>
201 <MVN_PROJECT_ARTIFACTID>${project.artifactId}</MVN_PROJECT_ARTIFACTID>
202 <MVN_PROJECT_VERSION>${project.version}</MVN_PROJECT_VERSION>
203 <MVN_NEXUSPROXY>${onap.nexus.url}</MVN_NEXUSPROXY>
204 <!--MVN_DOCKERREG_URL>${docker.push.registry}</MVN_DOCKERREG_URL-->
205 </environmentVariables>
206 </configuration>
207 </execution>
208
209 <execution>
210 <id>compile script</id>
211 <phase>compile</phase>
212 <goals><goal>exec</goal></goals>
213 <configuration>
214 <executable>mvn-phase-script.sh</executable>
215 <arguments>
216 <argument>${project.artifactId}</argument>
217 <argument>compile</argument>
218 </arguments>
219 <environmentVariables>
220 <!-- make mvn properties as env for our script -->
221 <MVN_PROJECT_GROUPID>${project.groupId}</MVN_PROJECT_GROUPID>
222 <MVN_PROJECT_ARTIFACTID>${project.artifactId}</MVN_PROJECT_ARTIFACTID>
223 <MVN_PROJECT_VERSION>${project.version}</MVN_PROJECT_VERSION>
224 <MVN_NEXUSPROXY>${onap.nexus.url}</MVN_NEXUSPROXY>
225 <!--MVN_DOCKERREG_URL>${docker.push.registry}</MVN_DOCKERREG_URL-->
226 </environmentVariables>
227 </configuration>
228 </execution>
229
230 <execution>
231 <id>package script</id>
232 <phase>package</phase>
233 <goals><goal>exec</goal></goals>
234 <configuration>
235 <executable>mvn-phase-script.sh</executable>
236 <arguments>
237 <argument>${project.artifactId}</argument>
238 <argument>package</argument>
239 </arguments>
240 <environmentVariables>
241 <!-- make mvn properties as env for our script -->
242 <MVN_PROJECT_GROUPID>${project.groupId}</MVN_PROJECT_GROUPID>
243 <MVN_PROJECT_ARTIFACTID>${project.artifactId}</MVN_PROJECT_ARTIFACTID>
244 <MVN_PROJECT_VERSION>${project.version}</MVN_PROJECT_VERSION>
245 <MVN_NEXUSPROXY>${onap.nexus.url}</MVN_NEXUSPROXY>
246 <!--MVN_DOCKERREG_URL>${docker.push.registry}</MVN_DOCKERREG_URL-->
247 </environmentVariables>
248 </configuration>
249 </execution>
250
251 <execution>
252 <id>test script</id>
253 <phase>test</phase>
254 <goals><goal>exec</goal></goals>
255 <configuration>
256 <executable>mvn-phase-script.sh</executable>
257 <arguments>
258 <argument>${project.artifactId}</argument>
259 <argument>test</argument>
260 </arguments>
261 <environmentVariables>
262 <!-- make mvn properties as env for our script -->
263 <MVN_PROJECT_GROUPID>${project.groupId}</MVN_PROJECT_GROUPID>
264 <MVN_PROJECT_ARTIFACTID>${project.artifactId}</MVN_PROJECT_ARTIFACTID>
265 <MVN_PROJECT_VERSION>${project.version}</MVN_PROJECT_VERSION>
266 <MVN_NEXUSPROXY>${onap.nexus.url}</MVN_NEXUSPROXY>
267 <!--MVN_DOCKERREG_URL>${docker.push.registry}</MVN_DOCKERREG_URL-->
268 </environmentVariables>
269 </configuration>
270 </execution>
271
272 <execution>
273 <id>install script</id>
274 <phase>install</phase>
275 <goals><goal>exec</goal></goals>
276 <configuration>
277 <executable>mvn-phase-script.sh</executable>
278 <arguments>
279 <argument>${project.artifactId}</argument>
280 <argument>install</argument>
281 </arguments>
282 <environmentVariables>
283 <!-- make mvn properties as env for our script -->
284 <MVN_PROJECT_GROUPID>${project.groupId}</MVN_PROJECT_GROUPID>
285 <MVN_PROJECT_ARTIFACTID>${project.artifactId}</MVN_PROJECT_ARTIFACTID>
286 <MVN_PROJECT_VERSION>${project.version}</MVN_PROJECT_VERSION>
287 <MVN_NEXUSPROXY>${onap.nexus.url}</MVN_NEXUSPROXY>
288 <!--MVN_DOCKERREG_URL>${docker.push.registry}</MVN_DOCKERREG_URL-->
289 </environmentVariables>
290 </configuration>
291 </execution>
292
293 <execution>
294 <id>deploy script</id>
295 <phase>deploy</phase>
296 <goals><goal>exec</goal></goals>
297 <configuration>
298 <executable>mvn-phase-script.sh</executable>
299 <arguments>
300 <argument>${project.artifactId}</argument>
301 <argument>deploy</argument>
302 </arguments>
303 <environmentVariables>
304 <!-- make mvn properties as env for our script -->
305 <MVN_PROJECT_GROUPID>${project.groupId}</MVN_PROJECT_GROUPID>
306 <MVN_PROJECT_ARTIFACTID>${project.artifactId}</MVN_PROJECT_ARTIFACTID>
307 <MVN_PROJECT_VERSION>${project.version}</MVN_PROJECT_VERSION>
308 <MVN_NEXUSPROXY>${onap.nexus.url}</MVN_NEXUSPROXY>
309 <!--MVN_DOCKERREG_URL>${docker.push.registry}</MVN_DOCKERREG_URL-->
310 </environmentVariables>
311 </configuration>
312 </execution>
313 </executions>
314 </plugin>
315 </plugins>
316 </build>
317</project>