Merge "Increment OSDF release version"
[optf/osdf.git] / pom.xml
1 <?xml version="1.0"?>
2 <!--
3     Copyright (c) 2018 Intel Corporation. All rights reserved.
4
5     Licensed under the Apache License, Version 2.0 (the "License"); you may
6     not use this file except in compliance with the License. You may obtain
7     a copy of the License at
8
9         http://www.apache.org/licenses/LICENSE-2.0
10
11     Unless required by applicable law or agreed to in writing, software
12     distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13     WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14     License for the specific language governing permissions and limitations
15     under the License.
16 -->
17 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
18                  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd
19 http://maven.apache.org/POM/4.0.0 ">
20         <modelVersion>4.0.0</modelVersion>
21         <packaging>pom</packaging>
22
23         <parent>
24                 <groupId>org.onap.oparent</groupId>
25                 <artifactId>oparent-python</artifactId>
26                 <version>3.0.0</version>
27         </parent>
28
29         <groupId>org.onap.optf.osdf</groupId>
30         <artifactId>optf-osdf</artifactId>
31         <name>optf-osdf</name>
32         <version>2.0.0-SNAPSHOT</version>
33         <description>Optimization Service Design Framework</description>
34
35         <properties>
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.language>py</sonar.language>
41                 <sonar.pluginname>python</sonar.pluginname>
42                 <sonar.inclusions>**/**.py,osdfapp.py</sonar.inclusions>
43                 <sonar.exclusions>test/**.py,docs/**.py</sonar.exclusions>
44                 <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
45                 <osdf.build.timestamp>${maven.build.timestamp}</osdf.build.timestamp>
46                 <osdf.project.version>${project.version}</osdf.project.version>
47                 <osdf.docker.repository>nexus3.onap.org:10003</osdf.docker.repository>
48                 <image.namespace>${osdf.docker.repository}/onap/optf-osdf</image.namespace>
49                 <opteng.namespace>${osdf.docker.repository}/onap/optf-opteng</opteng.namespace>
50         </properties>
51
52         <build>
53                 <plugins>
54                         <!-- triggers tox test for sonar -->
55                         <plugin>
56                                 <artifactId>exec-maven-plugin</artifactId>
57                                 <groupId>org.codehaus.mojo</groupId>
58                         </plugin>
59                         <plugin>
60                                 <artifactId>maven-assembly-plugin</artifactId>
61                                 <configuration>
62                                         <appendAssemblyId>false</appendAssemblyId>
63                                         <descriptors>
64                                                 <descriptor>assembly.xml</descriptor>
65                                         </descriptors>
66                                 </configuration>
67                                 <executions>
68                                         <execution>
69                                                 <id>make-assembly</id>
70                                                 <phase>package</phase>
71                                                 <goals>
72                                                         <goal>single</goal>
73                                                 </goals>
74                                         </execution>
75                                 </executions>
76                         </plugin>
77
78                         <plugin>
79                                 <groupId>org.apache.maven.plugins</groupId>
80                                 <artifactId>maven-release-plugin</artifactId>
81                         </plugin>
82                         <plugin>
83                                 <groupId>org.apache.maven.plugins</groupId>
84                                 <artifactId>maven-deploy-plugin</artifactId>
85                                 <version>2.8</version>
86                                 <configuration>
87                                         <retryFailedDeploymentCount>2</retryFailedDeploymentCount>
88                                 </configuration>
89                         </plugin>
90                         <plugin>
91                                 <groupId>org.codehaus.groovy.maven</groupId>
92                                 <artifactId>gmaven-plugin</artifactId>
93                                 <version>1.0</version>
94                                 <executions>
95                                         <execution>
96                                                 <phase>validate</phase>
97                                                 <goals>
98                                                         <goal>execute</goal>
99                                                 </goals>
100                                                 <configuration>
101                                                         <source>${project.basedir}/script/TagVersion.groovy</source>
102                                                 </configuration>
103                                         </execution>
104                                 </executions>
105                         </plugin>
106                         <plugin>
107                                 <groupId>io.fabric8</groupId>
108                                 <artifactId>docker-maven-plugin</artifactId>
109                                 <version>0.26.0</version>
110                                 <configuration>
111                                         <verbose>true</verbose>
112                                         <apiVersion>1.23</apiVersion>
113                                         <images>
114                                                 <image>
115                                                         <name>${image.namespace}</name>
116                                                         <alias>optf-osdf</alias>
117                                                         <build>
118                                                                 <cleanup>true</cleanup>
119                                                                 <tags>
120                                                                         <tag>latest</tag>
121                                                                         <tag>${project.docker.latesttagtimestamp.version}</tag>
122                                                                         <tag>${project.docker.latesttag.version}</tag>
123                                                                 </tags>
124
125                                                                 <dockerFile>${project.basedir}/docker/osdf/Dockerfile</dockerFile>
126                                                                 <assembly>
127                                                                         <descriptor>${project.basedir}/docker/osdf/assembly/osdf-files.xml</descriptor>
128                                                                         <name>onap-osdf-tm</name>
129                                                                 </assembly>
130                                                                 <args>
131                                                                         <MVN_ARTIFACT_VERSION>${project.version}</MVN_ARTIFACT_VERSION>
132                                                                         <REPO>${project.repo}</REPO>
133
134                                                                         <!-- plugin cannot handle empty (no proxy) arguments
135                                                                         <http_proxy_arg>${docker.http_proxy}</http_proxy_arg>
136                                                                         <https_proxy_arg>${docker.https_proxy}</https_proxy_arg>
137                                                                         -->
138                                                                 </args>
139                                                         </build>
140                                                 </image>
141                                                 <image>
142                                                         <name>${opteng.namespace}</name>
143                                                         <alias>optf-opteng</alias>
144                                                         <build>
145                                                                 <cleanup>true</cleanup>
146                                                                 <tags>
147                                                                         <tag>latest</tag>
148                                                                         <tag>${project.docker.latesttagtimestamp.version}</tag>
149                                                                         <tag>${project.docker.latesttag.version}</tag>
150                                                                 </tags>
151
152                                                                 <dockerFile>${project.basedir}/docker/opteng/Dockerfile</dockerFile>
153                                                                 <assembly>
154                                                                         <descriptor>${project.basedir}/docker/opteng/assembly/osdf-files.xml</descriptor>
155                                                                         <name>onap-osdf-tm</name>
156                                                                 </assembly>
157                                                                 <args>
158                                                                         <MVN_ARTIFACT_VERSION>${project.version}</MVN_ARTIFACT_VERSION>
159                                                                         <REPO>${project.repo}</REPO>
160
161                                                                         <!-- plugin cannot handle empty (no proxy) arguments
162                                     <http_proxy_arg>${docker.http_proxy}</http_proxy_arg>
163                                     <https_proxy_arg>${docker.https_proxy}</https_proxy_arg>
164                                     -->
165                                                                 </args>
166                                                         </build>
167                                                 </image>
168                                         </images>
169                                 </configuration>
170                                 <executions>
171                                         <execution>
172                                                 <id>generate-images</id>
173                                                 <phase>install</phase>
174                                                 <goals>
175                                                         <goal>build</goal>
176                                                 </goals>
177                                         </execution>
178                                         <execution>
179                                                 <id>push-images</id>
180                                                 <phase>deploy</phase>
181                                                 <goals>
182                                                         <goal>build</goal>
183                                                         <goal>push</goal>
184                                                 </goals>
185                                                 <configuration>
186                                                         <image>${image.namespace}:%l</image>
187                                                 </configuration>
188                                         </execution>
189                                 </executions>
190                         </plugin>
191                 </plugins>
192         </build>
193 </project>