Step version to 1.11.1-SNAPSHOT
[sdc/sdc-workflow-designer.git] / pom.xml
1 <!--
2   ~ Copyright © 2016-2018 European Support Limited
3   ~
4   ~ Licensed under the Apache License, Version 2.0 (the "License");
5   ~ you may not use this file except in compliance with the License.
6   ~ You may obtain a copy of the License at
7   ~
8   ~      http://www.apache.org/licenses/LICENSE-2.0
9   ~
10   ~ Unless required by applicable law or agreed to in writing, software
11   ~ distributed under the License is distributed on an "AS IS" BASIS,
12   ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   ~ See the License for the specific language governing permissions and
14   ~ limitations under the License.
15   -->
16
17 <project
18     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
19     xmlns="http://maven.apache.org/POM/4.0.0"
20     xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
21
22     <modelVersion>4.0.0</modelVersion>
23
24     <!--
25         The groupId violates Maven naming conventions
26         (https://maven.apache.org/guides/mini/guide-naming-conventions.html)
27         because of a limitation of ONAP CI/CD infrastructure.
28     -->
29     <groupId>org.onap.sdc.sdc-workflow-designer</groupId>
30     <artifactId>sdc-workflow-designer-parent</artifactId>
31     <name>sdc-sdc-workflow-designer</name>
32     <version>1.11.1-SNAPSHOT</version>
33     <packaging>pom</packaging>
34
35     <properties>
36         <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
37         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
38         <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
39         <sdc.project.version>${project.version}</sdc.project.version>
40         <sdc.build.timestamp>${maven.build.timestamp}</sdc.build.timestamp>
41         <onap.version>1.5.0</onap.version>
42         <docker.optimize>true</docker.optimize>
43         <docker.username>docker</docker.username>
44         <docker.password>docker</docker.password>
45         <nexus.registry>nexus3.onap.org:10001</nexus.registry>
46         <nexus.proxy>https://nexus.onap.org</nexus.proxy>
47         <sitePath>/content/sites/site/org/onap/sdc/workflow/${project.version}</sitePath>
48         <!-- Sonar properties -->
49         <sonar.coverage.jacoco.xmlReportPaths>
50             ${project.reporting.outputDirectory}/jacoco-ut/jacoco.xml
51         </sonar.coverage.jacoco.xmlReportPaths>
52         <docker.api.version>1.41</docker.api.version>
53     </properties>
54
55     <parent>
56         <groupId>org.onap.oparent</groupId>
57         <artifactId>oparent</artifactId>
58         <version>3.2.0</version>
59         <relativePath/>
60     </parent>
61
62     <modules>
63         <module>sdc-workflow-designer-init</module>
64         <module>sdc-workflow-designer-be</module>
65         <module>sdc-workflow-designer-ui</module>
66     </modules>
67
68     <build>
69         <pluginManagement>
70             <plugins>
71                 <plugin>
72                     <groupId>org.apache.maven.plugins</groupId>
73                     <artifactId>maven-compiler-plugin</artifactId>
74                     <version>3.10.1</version>
75                 </plugin>
76                 <plugin>
77                     <groupId>org.apache.maven.plugins</groupId>
78                     <artifactId>maven-surefire-plugin</artifactId>
79                     <version>2.22.2</version>
80                 </plugin>
81                 <plugin>
82                     <groupId>org.jacoco</groupId>
83                     <artifactId>jacoco-maven-plugin</artifactId>
84                     <version>0.8.8</version>
85                 </plugin>
86                 <plugin>
87                     <groupId>io.fabric8</groupId>
88                     <artifactId>docker-maven-plugin</artifactId>
89                     <version>0.38.0</version>
90                     <configuration>
91                         <verbose>false</verbose>
92                         <registry>${nexus.registry}</registry>
93                         <authConfig>
94                             <pull>
95                                 <username>${docker.username}</username>
96                                 <password>${docker.password}</password>
97                             </pull>
98                         </authConfig>
99                     </configuration>
100                     <executions>
101                         <execution>
102                             <id>docker-build</id>
103                             <phase>install</phase>
104                             <goals>
105                                 <goal>build</goal>
106                             </goals>
107                         </execution>
108                         <execution>
109                             <id>push-images</id>
110                             <phase>deploy</phase>
111                             <goals>
112                                 <goal>push</goal>
113                             </goals>
114                         </execution>
115                     </executions>
116                 </plugin>
117                 <plugin>
118                     <groupId>org.apache.maven.plugins</groupId>
119                     <artifactId>maven-checkstyle-plugin</artifactId>
120                     <version>3.1.2</version>
121                 </plugin>
122             </plugins>
123         </pluginManagement>
124         <plugins>
125             <plugin>
126                 <groupId>org.apache.maven.plugins</groupId>
127                 <artifactId>maven-compiler-plugin</artifactId>
128                 <configuration>
129                     <source>11</source>
130                     <target>11</target>
131                     <forceJavacCompilerUse>true</forceJavacCompilerUse>
132                 </configuration>
133             </plugin>
134             <plugin>
135                 <groupId>org.apache.maven.plugins</groupId>
136                 <artifactId>maven-checkstyle-plugin</artifactId>
137                 <configuration>
138                     <suppressionsLocation>checkstyle-suppressions.xml</suppressionsLocation>
139                     <suppressionsFileExpression>checkstyle.suppressions.file</suppressionsFileExpression>
140                 </configuration>
141             </plugin>
142             <plugin>
143                 <groupId>org.jacoco</groupId>
144                 <artifactId>jacoco-maven-plugin</artifactId>
145                 <executions>
146                     <execution>
147                         <id>default-prepare-agent</id>
148                         <goals>
149                             <goal>prepare-agent</goal>
150                         </goals>
151                     </execution>
152                     <execution>
153                         <id>report</id>
154                         <phase>prepare-package</phase>
155                         <goals>
156                             <goal>report</goal>
157                         </goals>
158                     </execution>
159                     <execution>
160                         <id>post-unit-test</id>
161                         <phase>test</phase>
162                         <goals>
163                             <goal>report</goal>
164                         </goals>
165                         <configuration>
166                             <destFile>${sonar.jacoco.reportPath}</destFile>
167                         </configuration>
168                     </execution>
169                 </executions>
170             </plugin>
171             <plugin>
172                 <groupId>org.codehaus.groovy.maven</groupId>
173                 <artifactId>gmaven-plugin</artifactId>
174                 <version>1.0</version>
175                 <inherited>true</inherited>
176                 <executions>
177                     <execution>
178                         <id>docker-tags</id>
179                         <phase>validate</phase>
180                         <goals>
181                             <goal>execute</goal>
182                         </goals>
183                         <configuration>
184                             <source>
185                                 println 'Docker Tagging Script:' + project.properties['sdc.project.version'] + '/' + project.properties['sdc.build.timestamp'];
186                                 def versionArray;
187                                 if (project.properties['sdc.project.version'] != null) {
188                                     versionArray = project.properties['sdc.project.version'].split('\\.');
189                                 }
190
191                                 if (project.properties['sdc.project.version'].endsWith("-SNAPSHOT")) {
192                                     project.properties.setProperty('project.docker.latesttag.version', versionArray[0] + '.' + versionArray[1] + "-SNAPSHOT-latest");
193                                     project.properties.setProperty('project.docker.latesttagtimestamp.version', versionArray[0] + '.' + versionArray[1] + "-SNAPSHOT-" + project.properties['sdc.build.timestamp']);
194                                 } else {
195                                     project.properties.setProperty('project.docker.latesttag.version', versionArray[0] + '.' + versionArray[1] + "-STAGING-latest");
196                                     project.properties.setProperty('project.docker.latesttagtimestamp.version', versionArray[0] + '.' + versionArray[1] + "-STAGING-" + project.properties['sdc.build.timestamp']);
197                                 }
198
199                                 println 'New Tags for docker:' + project.properties['project.docker.latesttag.version'] + '/' + project.properties['project.docker.latesttagtimestamp.version'];
200                             </source>
201                         </configuration>
202                     </execution>
203                 </executions>
204             </plugin>
205         </plugins>
206     </build>
207
208     <repositories>
209         <repository>
210             <id>ecomp-releases</id>
211             <name>Release Repository</name>
212             <url>${nexus.proxy}/content/repositories/releases/</url>
213         </repository>
214         <repository>
215             <id>ecomp-snapshots</id>
216             <name>Snapshots Repository</name>
217             <url>${nexus.proxy}/content/repositories/snapshots/</url>
218         </repository>
219         <repository>
220             <id>ecomp-public</id>
221             <name>Public Repository</name>
222             <url>${nexus.proxy}/content/repositories/public/</url>
223         </repository>
224     </repositories>
225     <distributionManagement>
226         <repository>
227             <id>ecomp-releases</id>
228             <name>Release Repository</name>
229             <url>${nexus.proxy}/content/repositories/releases/</url>
230         </repository>
231         <snapshotRepository>
232             <id>ecomp-snapshots</id>
233             <name>Snapshot Repository</name>
234             <url>${nexus.proxy}/content/repositories/snapshots/</url>
235         </snapshotRepository>
236         <site>
237             <id>ecomp-site</id>
238             <url>dav:${nexus.proxy}${sitePath}</url>
239         </site>
240     </distributionManagement>
241
242 </project>