Merge "bug fix for health check"
[sdc.git] / utils / webseal-simulator / pom.xml
1 <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>
12                 <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>
16         </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>
114         
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>logback.xml</include>
167                                                                                         </includes>
168                                                                                 </resource>
169                                                                         </resources>
170                                                                 </configuration>
171                                                         </execution>
172                                                 </executions>
173                                         </plugin>
174
175
176
177                                         <plugin>
178                                                 <groupId>io.fabric8</groupId>
179                                                 <artifactId>docker-maven-plugin</artifactId>
180                                                 <version>0.19.1</version>
181
182                                                 <configuration>
183                                                         <verbose>true</verbose>
184                                                         <apiVersion>1.23</apiVersion>
185
186                                                         <images>
187
188                                                                 <!-- Build simulator image -->
189                                                                 <image>
190                                                                         <name>openecomp/sdc-simulator</name>
191                                                                         <alias>sdc-simulator</alias>
192                                                                         <build>
193                                                                                 <cleanup>try</cleanup>
194                                                                                 <dockerFileDir>${basedir}\sdc-simulator</dockerFileDir>
195                                                                                 <tags>
196                                                                                         <tag>${docker.tag}</tag>
197                                                                                         <tag>${docker.latest.tag}</tag>
198                                                                                         <tag>1.1-STAGING-latest</tag>
199                                                                                 </tags>
200                                                                         </build>
201                                                                 </image>
202                                                         </images>
203                                                 </configuration>
204                                                 <executions>
205                                                         <execution>
206                                                                 <id>clean-images</id>
207                                                                 <phase>pre-clean</phase>
208                                                                 <goals>
209                                                                         <goal>remove</goal>
210                                                                 </goals>
211                                                                 <configuration>
212                                                                 <removeAll>true</removeAll>
213                                                                 <image>openecomp/sdc-simulator</image>
214                                                                 </configuration>
215                                                         </execution>
216
217                                                         <execution>
218                                                                 <id>generate-images</id>
219                                                                 <phase>package</phase>
220                                                                 <goals>
221                                                                         <goal>build</goal>
222                                                                 </goals>
223                                                         </execution>
224
225                                                         <execution>
226                                 <id>push-images</id>
227                                 <phase>deploy</phase>
228                                 <goals>
229                                                                         <goal>build</goal>
230                                                                         <goal>push</goal>
231                                 </goals>
232                                 <configuration>
233                                 <image>openecomp/sdc-simulator</image>
234                                 </configuration>
235                                                         </execution>
236                                                 </executions>
237                                         </plugin>
238                                 </plugins>
239                         </build>
240                 </profile>
241         </profiles>
242 </project>