blob: 18e5b32bb904a569163f62bb0a5e81be2bec95f8 [file] [log] [blame]
Michael Landoed64b5e2017-06-09 03:19:04 +03001<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
3
4 <modelVersion>4.0.0</modelVersion>
5 <groupId>org.openecomp.sdc</groupId>
6 <artifactId>webseal-simulator</artifactId>
7 <packaging>war</packaging>
8 <version>0.0.1-SNAPSHOT</version>
9
10 <properties>
11 <jetty-version>9.2.10.v20150310</jetty-version>
Tal Gitelmanfa222902017-08-16 13:44:31 +030012 <docker.tag>${project.version}-${maven.build.timestamp}</docker.tag>
13 <docker.latest.tag>${project.version}-latest</docker.latest.tag>
14 <!--maven-->
15 <maven.build.timestamp.format>yyyyMMdd'T'HHmm</maven.build.timestamp.format>
Idan Amitc7f57ec2017-08-31 14:26:21 +030016 <nexus.proxy>https://nexus.onap.org</nexus.proxy>
Tal Gitelman51d50f02017-12-10 18:55:03 +020017 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Tal Gitelman62ae83d2018-01-25 15:28:44 +020018 <docker.tag>${project.version}-${maven.build.timestamp}</docker.tag>
19 <docker.latest.tag>${project.version}-latest</docker.latest.tag>
Michael Landoed64b5e2017-06-09 03:19:04 +030020 </properties>
21
22 <dependencies>
23 <dependency>
24 <groupId>junit</groupId>
25 <artifactId>junit</artifactId>
26 <version>4.12</version>
27 <scope>test</scope>
28 </dependency>
29
30 <dependency>
31 <groupId>javax.servlet</groupId>
32 <artifactId>servlet-api</artifactId>
33 <version>2.5</version>
34 <scope>compile</scope>
35 </dependency>
36
37 <dependency>
38 <groupId>commons-httpclient</groupId>
39 <artifactId>commons-httpclient</artifactId>
40 <version>3.1</version>
41 </dependency>
42
43 <dependency>
44 <groupId>commons-logging</groupId>
45 <artifactId>commons-logging-api</artifactId>
46 <version>1.0.4</version>
47 </dependency>
48
49 <dependency>
50 <groupId>commons-io</groupId>
51 <artifactId>commons-io</artifactId>
52 <version>2.4</version>
53 </dependency>
54
55 <dependency>
56 <groupId>commons-codec</groupId>
57 <artifactId>commons-codec</artifactId>
Idan Amitc7f57ec2017-08-31 14:26:21 +030058 <version>1.9</version>
Michael Landoed64b5e2017-06-09 03:19:04 +030059 <scope>compile</scope>
60 </dependency>
61
62 <dependency>
63 <groupId>org.eclipse.jetty</groupId>
64 <artifactId>jetty-proxy</artifactId>
65 <version>9.2.10.v20150310</version>
66 <scope>compile</scope>
67 </dependency>
68
69 <dependency>
70 <groupId>org.eclipse.jetty</groupId>
71 <artifactId>jetty-servlets</artifactId>
72 <version>${jetty-version}</version>
73 <scope>compile</scope>
74 </dependency>
75
76 <!-- Proxy servlet -->
77 <dependency>
78 <groupId>com.typesafe</groupId>
79 <artifactId>config</artifactId>
80 <version>1.0.2</version>
81 <scope>compile</scope>
82 </dependency>
83
84 </dependencies>
85 <build>
86 <finalName>WSSimulator</finalName>
87 <plugins>
88 <!-- ================================================== -->
89 <!-- Set the JDK compiler version. -->
90 <!-- ================================================== -->
91 <plugin>
92 <groupId>org.apache.maven.plugins</groupId>
93 <artifactId>maven-compiler-plugin</artifactId>
94 <version>2.5.1</version>
95 <inherited>true</inherited>
96 <configuration>
97 <source>1.8</source>
98 <target>1.8</target>
99 </configuration>
100 </plugin>
101
102 <plugin>
103 <groupId>org.eclipse.jetty</groupId>
104 <artifactId>jetty-maven-plugin</artifactId>
105 <version>${jetty-version}</version>
106 <configuration>
107 <contextPath>/</contextPath>
108 <webApp>
109 <contextPath>/</contextPath>
110 <webInfIncludeJarPattern>.*/.*jersey-[^/]\.jar$</webInfIncludeJarPattern>
111 </webApp>
112 <war>WSSimulator.war</war>
113 </configuration>
114 </plugin>
115
116 </plugins>
117 </build>
Tal Gitelmanfa222902017-08-16 13:44:31 +0300118
Idan Amitc7f57ec2017-08-31 14:26:21 +0300119 <repositories>
120 <!-- LF repositories -->
121 <repository>
122 <id>ecomp-releases</id>
123 <name>Release Repository</name>
124 <url>${nexus.proxy}/content/repositories/releases/</url>
125 </repository>
126 <repository>
127 <id>ecomp-staging</id>
128 <name>Staging Repository</name>
129 <url>${nexus.proxy}/content/repositories/staging/</url>
130 </repository>
131 <repository>
132 <id>ecomp-snapshots</id>
133 <name>Snapshots Repository</name>
134 <url>${nexus.proxy}/content/repositories/snapshots/</url>
135 </repository>
136 <repository>
137 <id>ecomp-public</id>
138 <name>Public Repository</name>
139 <url>${nexus.proxy}/content/repositories/public/</url>
140 </repository>
141 <!-- LF repositories END-->
142 </repositories>
143
Tal Gitelmanfa222902017-08-16 13:44:31 +0300144 <profiles>
145 <profile>
146 <id>docker-staging</id>
147 <properties>
148 <docker.tag>${project.version}-STAGING-${maven.build.timestamp}</docker.tag>
149 <docker.latest.tag>${project.version}-STAGING-latest</docker.latest.tag>
150 </properties>
151 </profile>
152
153 <profile>
154 <id>docker</id>
155 <activation>
156 <activeByDefault>false</activeByDefault>
157 </activation>
158 <build>
159 <plugins>
160
161 <plugin>
Tal Gitelman62ae83d2018-01-25 15:28:44 +0200162 <artifactId>maven-clean-plugin</artifactId>
163 <version>3.0.0</version>
164 <executions>
165 <execution>
166 <id>clean-static-files</id>
167 <phase>clean</phase>
168 <goals>
169 <goal>clean</goal>
170 </goals>
171 <configuration>
172 <filesets>
173 <fileset>
174 <directory>${project.basedir}/sdc-simulator</directory>
175 <includes>
176 <include>*.war</include>
177 </includes>
178 <followSymlinks>false</followSymlinks>
179 </fileset>
180 <fileset>
181 <directory>${project.basedir}/sdc-simulator/chef-repo/cookbooks/sdc-simulator/files/default</directory>
182 <includes>logback.xml</includes>
183 <followSymlinks>false</followSymlinks>
184 </fileset>
185 </filesets>
186 </configuration>
187 </execution>
188 </executions>
189 </plugin>
190
191 <plugin>
Tal Gitelmanfa222902017-08-16 13:44:31 +0300192 <artifactId>maven-resources-plugin</artifactId>
193 <version>3.0.2</version>
194 <executions>
195 <execution>
196 <id>copy-resources-simulator</id>
Tal Gitelman62ae83d2018-01-25 15:28:44 +0200197 <phase>verify</phase>
Tal Gitelmanfa222902017-08-16 13:44:31 +0300198 <goals>
199 <goal>copy-resources</goal>
200 </goals>
201 <configuration>
Tal Gitelman62ae83d2018-01-25 15:28:44 +0200202 <outputDirectory>${project.basedir}/sdc-simulator</outputDirectory>
Tal Gitelmanfa222902017-08-16 13:44:31 +0300203 <resources>
204 <resource>
Tal Gitelman62ae83d2018-01-25 15:28:44 +0200205 <directory>${project.basedir}/target</directory>
Tal Gitelmanfa222902017-08-16 13:44:31 +0300206 <includes>
207 <include>WSSimulator.war</include>
208 </includes>
209 </resource>
210 </resources>
211 </configuration>
212 </execution>
213 <execution>
214 <id>copy-configurations-simulator</id>
Tal Gitelman62ae83d2018-01-25 15:28:44 +0200215 <phase>verify</phase>
Tal Gitelmanfa222902017-08-16 13:44:31 +0300216 <goals>
217 <goal>copy-resources</goal>
218 </goals>
219 <configuration>
220 <outputDirectory>${basedir}/sdc-simulator/chef-repo/cookbooks/sdc-simulator/files/default</outputDirectory>
221 <resources>
222 <resource>
223 <directory>${basedir}/src/main/resources</directory>
224 <includes>
Tal Gitelmanfa222902017-08-16 13:44:31 +0300225 <include>logback.xml</include>
226 </includes>
227 </resource>
228 </resources>
229 </configuration>
230 </execution>
231 </executions>
232 </plugin>
233
234
235
236 <plugin>
237 <groupId>io.fabric8</groupId>
238 <artifactId>docker-maven-plugin</artifactId>
Idan Amita63a1aa2017-11-08 11:25:03 +0200239 <version>0.23.0</version>
Tal Gitelmanfa222902017-08-16 13:44:31 +0300240
241 <configuration>
242 <verbose>true</verbose>
243 <apiVersion>1.23</apiVersion>
Yuli Shlosberg44144952017-11-09 13:34:49 +0200244 <registry>nexus3.onap.org:10001</registry>
Idan Amitbc293712017-11-05 13:07:22 +0200245 <authConfig>
246 <pull>
247 <username>docker</username>
248 <password>docker</password>
249 </pull>
250 </authConfig>
Tal Gitelmanfa222902017-08-16 13:44:31 +0300251 <images>
252
253 <!-- Build simulator image -->
254 <image>
255 <name>openecomp/sdc-simulator</name>
256 <alias>sdc-simulator</alias>
257 <build>
258 <cleanup>try</cleanup>
Tal Gitelman62ae83d2018-01-25 15:28:44 +0200259 <dockerFileDir>${basedir}\sdc-simulator</dockerFileDir>
Tal Gitelmanfa222902017-08-16 13:44:31 +0300260 <tags>
261 <tag>${docker.tag}</tag>
262 <tag>${docker.latest.tag}</tag>
263 <tag>1.1-STAGING-latest</tag>
264 </tags>
265 </build>
266 </image>
267 </images>
268 </configuration>
269 <executions>
270 <execution>
271 <id>clean-images</id>
272 <phase>pre-clean</phase>
273 <goals>
274 <goal>remove</goal>
275 </goals>
276 <configuration>
277 <removeAll>true</removeAll>
278 <image>openecomp/sdc-simulator</image>
279 </configuration>
280 </execution>
281
282 <execution>
283 <id>generate-images</id>
Tal Gitelman62ae83d2018-01-25 15:28:44 +0200284 <phase>install</phase>
Tal Gitelmanfa222902017-08-16 13:44:31 +0300285 <goals>
286 <goal>build</goal>
287 </goals>
288 </execution>
289
290 <execution>
291 <id>push-images</id>
292 <phase>deploy</phase>
293 <goals>
294 <goal>build</goal>
295 <goal>push</goal>
296 </goals>
297 <configuration>
298 <image>openecomp/sdc-simulator</image>
299 </configuration>
300 </execution>
301 </executions>
302 </plugin>
303 </plugins>
304 </build>
305 </profile>
306 </profiles>
Michael Landoed64b5e2017-06-09 03:19:04 +0300307</project>