blob: 443b9679f7e456b974540ffdd67054186212795f [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>
Michael Landoed64b5e2017-06-09 03:19:04 +030016 </properties>
17
18 <dependencies>
19 <dependency>
20 <groupId>junit</groupId>
21 <artifactId>junit</artifactId>
22 <version>4.12</version>
23 <scope>test</scope>
24 </dependency>
25
26 <dependency>
27 <groupId>javax.servlet</groupId>
28 <artifactId>servlet-api</artifactId>
29 <version>2.5</version>
30 <scope>compile</scope>
31 </dependency>
32
33 <dependency>
34 <groupId>commons-httpclient</groupId>
35 <artifactId>commons-httpclient</artifactId>
36 <version>3.1</version>
37 </dependency>
38
39 <dependency>
40 <groupId>commons-logging</groupId>
41 <artifactId>commons-logging-api</artifactId>
42 <version>1.0.4</version>
43 </dependency>
44
45 <dependency>
46 <groupId>commons-io</groupId>
47 <artifactId>commons-io</artifactId>
48 <version>2.4</version>
49 </dependency>
50
51 <dependency>
52 <groupId>commons-codec</groupId>
53 <artifactId>commons-codec</artifactId>
54 <version>2.0-SNAPSHOT</version>
55 <scope>compile</scope>
56 </dependency>
57
58 <dependency>
59 <groupId>org.eclipse.jetty</groupId>
60 <artifactId>jetty-proxy</artifactId>
61 <version>9.2.10.v20150310</version>
62 <scope>compile</scope>
63 </dependency>
64
65 <dependency>
66 <groupId>org.eclipse.jetty</groupId>
67 <artifactId>jetty-servlets</artifactId>
68 <version>${jetty-version}</version>
69 <scope>compile</scope>
70 </dependency>
71
72 <!-- Proxy servlet -->
73 <dependency>
74 <groupId>com.typesafe</groupId>
75 <artifactId>config</artifactId>
76 <version>1.0.2</version>
77 <scope>compile</scope>
78 </dependency>
79
80 </dependencies>
81 <build>
82 <finalName>WSSimulator</finalName>
83 <plugins>
84 <!-- ================================================== -->
85 <!-- Set the JDK compiler version. -->
86 <!-- ================================================== -->
87 <plugin>
88 <groupId>org.apache.maven.plugins</groupId>
89 <artifactId>maven-compiler-plugin</artifactId>
90 <version>2.5.1</version>
91 <inherited>true</inherited>
92 <configuration>
93 <source>1.8</source>
94 <target>1.8</target>
95 </configuration>
96 </plugin>
97
98 <plugin>
99 <groupId>org.eclipse.jetty</groupId>
100 <artifactId>jetty-maven-plugin</artifactId>
101 <version>${jetty-version}</version>
102 <configuration>
103 <contextPath>/</contextPath>
104 <webApp>
105 <contextPath>/</contextPath>
106 <webInfIncludeJarPattern>.*/.*jersey-[^/]\.jar$</webInfIncludeJarPattern>
107 </webApp>
108 <war>WSSimulator.war</war>
109 </configuration>
110 </plugin>
111
112 </plugins>
113 </build>
Tal Gitelmanfa222902017-08-16 13:44:31 +0300114
115 <profiles>
116 <profile>
117 <id>docker-staging</id>
118 <properties>
119 <docker.tag>${project.version}-STAGING-${maven.build.timestamp}</docker.tag>
120 <docker.latest.tag>${project.version}-STAGING-latest</docker.latest.tag>
121 </properties>
122 </profile>
123
124 <profile>
125 <id>docker</id>
126 <activation>
127 <activeByDefault>false</activeByDefault>
128 </activation>
129 <build>
130 <plugins>
131
132 <plugin>
133 <artifactId>maven-resources-plugin</artifactId>
134 <version>3.0.2</version>
135 <executions>
136 <execution>
137 <id>copy-resources-simulator</id>
138 <phase>validate</phase>
139 <goals>
140 <goal>copy-resources</goal>
141 </goals>
142 <configuration>
143 <outputDirectory>${basedir}/sdc-simulator</outputDirectory>
144 <resources>
145 <resource>
146 <directory>${basedir}/target</directory>
147 <includes>
148 <include>WSSimulator.war</include>
149 </includes>
150 </resource>
151 </resources>
152 </configuration>
153 </execution>
154 <execution>
155 <id>copy-configurations-simulator</id>
156 <phase>validate</phase>
157 <goals>
158 <goal>copy-resources</goal>
159 </goals>
160 <configuration>
161 <outputDirectory>${basedir}/sdc-simulator/chef-repo/cookbooks/sdc-simulator/files/default</outputDirectory>
162 <resources>
163 <resource>
164 <directory>${basedir}/src/main/resources</directory>
165 <includes>
166 <include>webseal.conf</include>
167 <include>logback.xml</include>
168 </includes>
169 </resource>
170 </resources>
171 </configuration>
172 </execution>
173 </executions>
174 </plugin>
175
176
177
178 <plugin>
179 <groupId>io.fabric8</groupId>
180 <artifactId>docker-maven-plugin</artifactId>
181 <version>0.19.1</version>
182
183 <configuration>
184 <verbose>true</verbose>
185 <apiVersion>1.23</apiVersion>
186
187 <images>
188
189 <!-- Build simulator image -->
190 <image>
191 <name>openecomp/sdc-simulator</name>
192 <alias>sdc-simulator</alias>
193 <build>
194 <cleanup>try</cleanup>
195 <dockerFileDir>${basedir}\sdc-simulator</dockerFileDir>
196 <tags>
197 <tag>${docker.tag}</tag>
198 <tag>${docker.latest.tag}</tag>
199 <tag>1.1-STAGING-latest</tag>
200 </tags>
201 </build>
202 </image>
203 </images>
204 </configuration>
205 <executions>
206 <execution>
207 <id>clean-images</id>
208 <phase>pre-clean</phase>
209 <goals>
210 <goal>remove</goal>
211 </goals>
212 <configuration>
213 <removeAll>true</removeAll>
214 <image>openecomp/sdc-simulator</image>
215 </configuration>
216 </execution>
217
218 <execution>
219 <id>generate-images</id>
220 <phase>package</phase>
221 <goals>
222 <goal>build</goal>
223 </goals>
224 </execution>
225
226 <execution>
227 <id>push-images</id>
228 <phase>deploy</phase>
229 <goals>
230 <goal>build</goal>
231 <goal>push</goal>
232 </goals>
233 <configuration>
234 <image>openecomp/sdc-simulator</image>
235 </configuration>
236 </execution>
237 </executions>
238 </plugin>
239 </plugins>
240 </build>
241 </profile>
242 </profiles>
Michael Landoed64b5e2017-06-09 03:19:04 +0300243</project>