10a3b25d145dbbf7dcc38e7e450e9d41547a98f4
[sdc.git] / utils / webseal-simulator / pom.xml
1 <project xmlns="http://maven.apache.org/POM/4.0.0"
2     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3     xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
4
5
6     <modelVersion>4.0.0</modelVersion>
7     <artifactId>webseal-simulator</artifactId>
8     <packaging>war</packaging>
9
10     <parent>
11         <groupId>org.openecomp.sdc</groupId>
12         <artifactId>sdc-main</artifactId>
13         <version>1.12.0-SNAPSHOT</version>
14         <relativePath>../../</relativePath>
15     </parent>
16
17     <properties>
18         <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
19         <nexus.proxy>https://nexus.onap.org</nexus.proxy>
20         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
21         <sonar.skip>true</sonar.skip>
22     </properties>
23
24     <dependencies>
25         <dependency>
26             <groupId>org.hibernate.validator</groupId>
27             <artifactId>hibernate-validator</artifactId>
28             <version>${hibernate.validator.version}</version>
29         </dependency>
30         <dependency>
31             <groupId>org.eclipse.jetty</groupId>
32             <artifactId>jetty-server</artifactId>
33             <version>${jetty.version}</version>
34             <scope>compile</scope>
35             <exclusions>
36                 <exclusion>
37                     <groupId>org.eclipse.jetty</groupId>
38                     <artifactId>jetty-http</artifactId>
39                 </exclusion>
40             </exclusions>
41         </dependency>
42         <dependency>
43             <groupId>org.eclipse.jetty</groupId>
44             <artifactId>jetty-servlet</artifactId>
45             <version>${jetty.version}</version>
46             <scope>compile</scope>
47             <exclusions>
48                 <exclusion>
49                     <groupId>org.eclipse.jetty</groupId>
50                     <artifactId>jetty-security</artifactId>
51                 </exclusion>
52             </exclusions>
53         </dependency>
54         <dependency>
55             <groupId>org.openecomp.sdc</groupId>
56             <artifactId>common-app-api</artifactId>
57             <version>${project.version}</version>
58             <scope>compile</scope>
59             <exclusions>
60                 <exclusion>
61                     <groupId>org.apache.httpcomponents</groupId>
62                     <artifactId>httpcore</artifactId>
63                 </exclusion>
64             </exclusions>
65         </dependency>
66         <dependency>
67             <groupId>javax.servlet</groupId>
68             <artifactId>javax.servlet-api</artifactId>
69             <version>${javax.servlet.version}</version>
70         </dependency>
71
72         <dependency>
73             <groupId>org.apache.httpcomponents</groupId>
74             <artifactId>httpclient</artifactId>
75             <version>${httpclient.version}</version>
76             <exclusions>
77                 <exclusion>
78                     <groupId>org.apache.httpcomponents</groupId>
79                     <artifactId>httpcore</artifactId>
80                 </exclusion>
81             </exclusions>
82         </dependency>
83         <dependency>
84             <groupId>org.apache.httpcomponents</groupId>
85             <artifactId>httpcore</artifactId>
86             <version>${httpcore.version}</version>
87         </dependency>
88
89         <dependency>
90             <groupId>org.apache.commons</groupId>
91             <artifactId>commons-lang3</artifactId>
92         </dependency>
93
94         <dependency>
95             <groupId>commons-logging</groupId>
96             <artifactId>commons-logging-api</artifactId>
97             <version>1.0.4</version>
98         </dependency>
99
100         <dependency>
101             <groupId>commons-io</groupId>
102             <artifactId>commons-io</artifactId>
103             <version>${commons.io.version}</version>
104         </dependency>
105
106         <dependency>
107             <groupId>commons-codec</groupId>
108             <artifactId>commons-codec</artifactId>
109             <version>${commons-codec}</version>
110             <scope>compile</scope>
111         </dependency>
112
113         <dependency>
114             <groupId>org.eclipse.jetty</groupId>
115             <artifactId>jetty-proxy</artifactId>
116             <version>${jetty.version}</version>
117             <scope>compile</scope>
118             <exclusions>
119                 <exclusion>
120                     <groupId>org.eclipse.jetty</groupId>
121                     <artifactId>jetty-http</artifactId>
122                 </exclusion>
123             </exclusions>
124         </dependency>
125
126         <dependency>
127             <groupId>org.eclipse.jetty</groupId>
128             <artifactId>jetty-servlets</artifactId>
129             <version>${jetty.version}</version>
130             <scope>compile</scope>
131             <exclusions>
132                 <exclusion>
133                     <groupId>org.eclipse.jetty</groupId>
134                     <artifactId>jetty-http</artifactId>
135                 </exclusion>
136             </exclusions>
137         </dependency>
138
139         <!-- Proxy servlet -->
140         <dependency>
141             <groupId>com.typesafe</groupId>
142             <artifactId>config</artifactId>
143             <version>1.0.2</version>
144             <scope>compile</scope>
145         </dependency>
146         <dependency>
147             <groupId>org.openecomp.sdc</groupId>
148             <artifactId>openecomp-sdc-logging-api</artifactId>
149             <version>${project.version}</version>
150             <exclusions>
151                 <exclusion>
152                     <groupId>org.powermock</groupId>
153                     <artifactId>powermock-module-junit4</artifactId>
154                 </exclusion>
155             </exclusions>
156         </dependency>
157     </dependencies>
158
159     <build>
160         <finalName>WSSimulator-${project.version}</finalName>
161         <plugins>
162             <plugin>
163                 <groupId>com.github.sylvainlaurent.maven</groupId>
164                 <artifactId>yaml-json-validator-maven-plugin</artifactId>
165                 <executions>
166                     <execution>
167                         <id>validate</id>
168                         <phase>validate</phase>
169                         <goals>
170                             <goal>validate</goal>
171                         </goals>
172                         <configuration>
173                             <validationSets>
174                                 <validationSet>
175                                     <includes>
176                                         <include>src/main/resources/**/*.y*ml</include>
177                                         <include>src/test/resources/**/*.y*ml</include>
178                                     </includes>
179                                 </validationSet>
180                                 <validationSet>
181                                     <includes>
182                                         <include>src/main/resources/**/*.json</include>
183                                         <include>src/test/resources/**/*.json</include>
184                                     </includes>
185                                 </validationSet>
186                             </validationSets>
187                             <skip>${skipYamlJsonValidator}</skip>
188                         </configuration>
189                     </execution>
190                 </executions>
191             </plugin>
192         </plugins>
193     </build>
194
195     <repositories>
196         <!-- LF repositories -->
197         <repository>
198             <id>ecomp-releases</id>
199             <name>Release Repository</name>
200             <url>${nexus.proxy}/content/repositories/releases/</url>
201         </repository>
202         <repository>
203             <id>ecomp-snapshots</id>
204             <name>Snapshots Repository</name>
205             <url>${nexus.proxy}/content/repositories/snapshots/</url>
206         </repository>
207         <repository>
208             <id>ecomp-public</id>
209             <name>Public Repository</name>
210             <url>${nexus.proxy}/content/repositories/public/</url>
211         </repository>
212         <!-- LF repositories END-->
213     </repositories>
214
215     <profiles>
216         <profile>
217             <id>docker</id>
218             <activation>
219                 <activeByDefault>false</activeByDefault>
220             </activation>
221             <build>
222                 <plugins>
223
224                     <plugin>
225                         <artifactId>maven-clean-plugin</artifactId>
226                         <version>3.0.0</version>
227                         <executions>
228                             <execution>
229                                 <id>clean-static-files</id>
230                                 <phase>clean</phase>
231                                 <goals>
232                                     <goal>clean</goal>
233                                 </goals>
234                                 <configuration>
235                                     <filesets>
236                                         <fileset>
237                                             <directory>${project.basedir}/sdc-simulator</directory>
238                                             <includes>
239                                                 <include>*.war</include>
240                                             </includes>
241                                             <followSymlinks>false</followSymlinks>
242                                         </fileset>
243                                     </filesets>
244                                 </configuration>
245                             </execution>
246                         </executions>
247                     </plugin>
248
249                     <plugin>
250                         <artifactId>maven-resources-plugin</artifactId>
251                         <executions>
252                             <execution>
253                                 <id>copy-resources-simulator</id>
254                                 <phase>verify</phase>
255                                 <goals>
256                                     <goal>copy-resources</goal>
257                                 </goals>
258                                 <configuration>
259                                     <outputDirectory>${project.basedir}/sdc-simulator
260                                     </outputDirectory>
261                                     <resources>
262                                         <resource>
263                                             <directory>${project.basedir}/target</directory>
264                                             <includes>
265                                                 <include>WSSimulator*.war</include>
266                                             </includes>
267                                         </resource>
268                                     </resources>
269                                 </configuration>
270                             </execution>
271                         </executions>
272                     </plugin>
273
274
275                     <plugin>
276                         <groupId>io.fabric8</groupId>
277                         <artifactId>docker-maven-plugin</artifactId>
278                         <configuration>
279                             <verbose>${verbose}</verbose>
280                             <apiVersion>${docker.api.version}</apiVersion>
281                             <registry>${docker.registry}</registry>
282                             <authConfig>
283                                 <pull>
284                                     <username>${docker.username}</username>
285                                     <password>${docker.password}</password>
286                                 </pull>
287                             </authConfig>
288                             <images>
289                                 <!-- Build simulator image -->
290                                 <image>
291                                     <name>${docker.namespace}/sdc-simulator</name>
292                                     <alias>sdc-simulator</alias>
293                                     <build>
294                                         <cleanup>try</cleanup>
295                                         <dockerFileDir>${basedir}${file.separator}sdc-simulator
296                                         </dockerFileDir>
297                                         <tags>
298                                             <tag>latest</tag>
299                                             <tag>
300                                                 ${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-latest
301                                             </tag>
302                                             <tag>
303                                                 ${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-${maven.build.timestamp}
304                                             </tag>
305                                         </tags>
306                                     </build>
307                                 </image>
308                             </images>
309                         </configuration>
310                         <executions>
311                             <execution>
312                                 <id>clean-images</id>
313                                 <phase>pre-clean</phase>
314                                 <goals>
315                                     <goal>remove</goal>
316                                 </goals>
317                             </execution>
318                             <execution>
319                                 <id>generate-images</id>
320                                 <phase>install</phase>
321                                 <goals>
322                                     <goal>build</goal>
323                                 </goals>
324                             </execution>
325                             <execution>
326                                 <id>push-images</id>
327                                 <phase>deploy</phase>
328                                 <goals>
329                                     <goal>push</goal>
330                                 </goals>
331                             </execution>
332                         </executions>
333                     </plugin>
334                 </plugins>
335             </build>
336         </profile>
337     </profiles>
338 </project>