Andrew Gauld | b34cbd0 | 2017-08-24 16:46:17 -0400 | [diff] [blame^] | 1 | <?xml version="1.0"?> |
| 2 | <!-- |
| 3 | ============LICENSE_START======================================================= |
| 4 | org.onap.dcae |
| 5 | ================================================================================ |
| 6 | Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. |
| 7 | ================================================================================ |
| 8 | Licensed under the Apache License, Version 2.0 (the "License"); |
| 9 | you may not use this file except in compliance with the License. |
| 10 | You may obtain a copy of the License at |
| 11 | |
| 12 | http://www.apache.org/licenses/LICENSE-2.0 |
| 13 | |
| 14 | Unless required by applicable law or agreed to in writing, software |
| 15 | distributed under the License is distributed on an "AS IS" BASIS, |
| 16 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 17 | See the License for the specific language governing permissions and |
| 18 | limitations under the License. |
| 19 | ============LICENSE_END========================================================= |
| 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</groupId> |
| 31 | <artifactId>deployments</artifactId> |
| 32 | <name>deployments</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 | <plugin> |
| 59 | <groupId>org.codehaus.mojo</groupId> |
| 60 | <artifactId>sonar-maven-plugin</artifactId> |
| 61 | <version>2.7.1</version> |
| 62 | </plugin> |
| 63 | |
| 64 | <!-- nexus-staging-maven-plugin is called during deploy phase by default behavior. |
| 65 | we do not need it --> |
| 66 | <plugin> |
| 67 | <groupId>org.sonatype.plugins</groupId> |
| 68 | <artifactId>nexus-staging-maven-plugin</artifactId> |
| 69 | <version>1.6.7</version> |
| 70 | <configuration> |
| 71 | <skipNexusStagingDeployMojo>true</skipNexusStagingDeployMojo> |
| 72 | </configuration> |
| 73 | </plugin> |
| 74 | </plugins> |
| 75 | </pluginManagement> |
| 76 | |
| 77 | <plugins> |
| 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 | <!-- now we configure custom action (calling a script) at various lifecycle phases --> |
| 137 | <plugin> |
| 138 | <groupId>org.codehaus.mojo</groupId> |
| 139 | <artifactId>exec-maven-plugin</artifactId> |
| 140 | <version>1.2.1</version> |
| 141 | <executions> |
| 142 | <execution> |
| 143 | <id>clean phase script</id> |
| 144 | <phase>clean</phase> |
| 145 | <goals><goal>exec</goal></goals> |
| 146 | <configuration> |
| 147 | <executable>${session.executionRootDirectory}/mvn-phase-script.sh</executable> |
| 148 | <arguments> |
| 149 | <argument>${project.artifactId}</argument> |
| 150 | <argument>clean</argument> |
| 151 | </arguments> |
| 152 | <environmentVariables> |
| 153 | <!-- make mvn properties as env for our script --> |
| 154 | <MVN_PROJECT_GROUPID>${project.groupId}</MVN_PROJECT_GROUPID> |
| 155 | <MVN_PROJECT_ARTIFACTID>${project.artifactId}</MVN_PROJECT_ARTIFACTID> |
| 156 | <MVN_PROJECT_VERSION>${project.version}</MVN_PROJECT_VERSION> |
| 157 | <MVN_NEXUSPROXY>${onap.nexus.url}</MVN_NEXUSPROXY> |
| 158 | </environmentVariables> |
| 159 | </configuration> |
| 160 | </execution> |
| 161 | |
| 162 | <execution> |
| 163 | <id>generate-sources script</id> |
| 164 | <phase>generate-sources</phase> |
| 165 | <goals><goal>exec</goal></goals> |
| 166 | <configuration> |
| 167 | <executable>mvn-phase-script.sh</executable> |
| 168 | <arguments> |
| 169 | <argument>${project.artifactId}</argument> |
| 170 | <argument>generate-sources</argument> |
| 171 | </arguments> |
| 172 | <environmentVariables> |
| 173 | <!-- make mvn properties as env for our script --> |
| 174 | <MVN_PROJECT_GROUPID>${project.groupId}</MVN_PROJECT_GROUPID> |
| 175 | <MVN_PROJECT_ARTIFACTID>${project.artifactId}</MVN_PROJECT_ARTIFACTID> |
| 176 | <MVN_PROJECT_VERSION>${project.version}</MVN_PROJECT_VERSION> |
| 177 | <MVN_NEXUSPROXY>${onap.nexus.url}</MVN_NEXUSPROXY> |
| 178 | </environmentVariables> |
| 179 | </configuration> |
| 180 | </execution> |
| 181 | |
| 182 | <execution> |
| 183 | <id>compile script</id> |
| 184 | <phase>compile</phase> |
| 185 | <goals><goal>exec</goal></goals> |
| 186 | <configuration> |
| 187 | <executable>mvn-phase-script.sh</executable> |
| 188 | <arguments> |
| 189 | <argument>${project.artifactId}</argument> |
| 190 | <argument>compile</argument> |
| 191 | </arguments> |
| 192 | <environmentVariables> |
| 193 | <!-- make mvn properties as env for our script --> |
| 194 | <MVN_PROJECT_GROUPID>${project.groupId}</MVN_PROJECT_GROUPID> |
| 195 | <MVN_PROJECT_ARTIFACTID>${project.artifactId}</MVN_PROJECT_ARTIFACTID> |
| 196 | <MVN_PROJECT_VERSION>${project.version}</MVN_PROJECT_VERSION> |
| 197 | <MVN_NEXUSPROXY>${onap.nexus.url}</MVN_NEXUSPROXY> |
| 198 | </environmentVariables> |
| 199 | </configuration> |
| 200 | </execution> |
| 201 | |
| 202 | <execution> |
| 203 | <id>package script</id> |
| 204 | <phase>package</phase> |
| 205 | <goals><goal>exec</goal></goals> |
| 206 | <configuration> |
| 207 | <executable>mvn-phase-script.sh</executable> |
| 208 | <arguments> |
| 209 | <argument>${project.artifactId}</argument> |
| 210 | <argument>package</argument> |
| 211 | </arguments> |
| 212 | <environmentVariables> |
| 213 | <!-- make mvn properties as env for our script --> |
| 214 | <MVN_PROJECT_GROUPID>${project.groupId}</MVN_PROJECT_GROUPID> |
| 215 | <MVN_PROJECT_ARTIFACTID>${project.artifactId}</MVN_PROJECT_ARTIFACTID> |
| 216 | <MVN_PROJECT_VERSION>${project.version}</MVN_PROJECT_VERSION> |
| 217 | <MVN_NEXUSPROXY>${onap.nexus.url}</MVN_NEXUSPROXY> |
| 218 | </environmentVariables> |
| 219 | </configuration> |
| 220 | </execution> |
| 221 | |
| 222 | <execution> |
| 223 | <id>test script</id> |
| 224 | <phase>test</phase> |
| 225 | <goals><goal>exec</goal></goals> |
| 226 | <configuration> |
| 227 | <executable>mvn-phase-script.sh</executable> |
| 228 | <arguments> |
| 229 | <argument>${project.artifactId}</argument> |
| 230 | <argument>test</argument> |
| 231 | </arguments> |
| 232 | <environmentVariables> |
| 233 | <!-- make mvn properties as env for our script --> |
| 234 | <MVN_PROJECT_GROUPID>${project.groupId}</MVN_PROJECT_GROUPID> |
| 235 | <MVN_PROJECT_ARTIFACTID>${project.artifactId}</MVN_PROJECT_ARTIFACTID> |
| 236 | <MVN_PROJECT_VERSION>${project.version}</MVN_PROJECT_VERSION> |
| 237 | <MVN_NEXUSPROXY>${onap.nexus.url}</MVN_NEXUSPROXY> |
| 238 | </environmentVariables> |
| 239 | </configuration> |
| 240 | </execution> |
| 241 | |
| 242 | <execution> |
| 243 | <id>install script</id> |
| 244 | <phase>install</phase> |
| 245 | <goals><goal>exec</goal></goals> |
| 246 | <configuration> |
| 247 | <executable>mvn-phase-script.sh</executable> |
| 248 | <arguments> |
| 249 | <argument>${project.artifactId}</argument> |
| 250 | <argument>install</argument> |
| 251 | </arguments> |
| 252 | <environmentVariables> |
| 253 | <!-- make mvn properties as env for our script --> |
| 254 | <MVN_PROJECT_GROUPID>${project.groupId}</MVN_PROJECT_GROUPID> |
| 255 | <MVN_PROJECT_ARTIFACTID>${project.artifactId}</MVN_PROJECT_ARTIFACTID> |
| 256 | <MVN_PROJECT_VERSION>${project.version}</MVN_PROJECT_VERSION> |
| 257 | <MVN_NEXUSPROXY>${onap.nexus.url}</MVN_NEXUSPROXY> |
| 258 | </environmentVariables> |
| 259 | </configuration> |
| 260 | </execution> |
| 261 | |
| 262 | <execution> |
| 263 | <id>deploy script</id> |
| 264 | <phase>deploy</phase> |
| 265 | <goals><goal>exec</goal></goals> |
| 266 | <configuration> |
| 267 | <executable>mvn-phase-script.sh</executable> |
| 268 | <arguments> |
| 269 | <argument>${project.artifactId}</argument> |
| 270 | <argument>deploy</argument> |
| 271 | </arguments> |
| 272 | <environmentVariables> |
| 273 | <!-- make mvn properties as env for our script --> |
| 274 | <MVN_PROJECT_GROUPID>${project.groupId}</MVN_PROJECT_GROUPID> |
| 275 | <MVN_PROJECT_ARTIFACTID>${project.artifactId}</MVN_PROJECT_ARTIFACTID> |
| 276 | <MVN_PROJECT_VERSION>${project.version}</MVN_PROJECT_VERSION> |
| 277 | <MVN_NEXUSPROXY>${onap.nexus.url}</MVN_NEXUSPROXY> |
| 278 | </environmentVariables> |
| 279 | </configuration> |
| 280 | </execution> |
| 281 | </executions> |
| 282 | </plugin> |
| 283 | </plugins> |
| 284 | </build> |
| 285 | </project> |