Final commit to master merge from
[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                 <nexus.proxy>https://nexus.onap.org</nexus.proxy>
17                 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
18         </properties>
19
20         <dependencies>
21                 <dependency>
22                         <groupId>junit</groupId>
23                         <artifactId>junit</artifactId>
24                         <version>4.12</version>
25                         <scope>test</scope>
26                 </dependency>
27
28                 <dependency>
29                         <groupId>javax.servlet</groupId>
30                         <artifactId>servlet-api</artifactId>
31                         <version>2.5</version>
32                         <scope>compile</scope>
33                 </dependency>
34
35                 <dependency>
36                         <groupId>commons-httpclient</groupId>
37                         <artifactId>commons-httpclient</artifactId>
38                         <version>3.1</version>
39                 </dependency>
40
41                 <dependency>
42                         <groupId>commons-logging</groupId>
43                         <artifactId>commons-logging-api</artifactId>
44                         <version>1.0.4</version>
45                 </dependency>
46
47                 <dependency>
48                         <groupId>commons-io</groupId>
49                         <artifactId>commons-io</artifactId>
50                         <version>2.4</version>
51                 </dependency>
52
53                 <dependency>
54                         <groupId>commons-codec</groupId>
55                         <artifactId>commons-codec</artifactId>
56                         <version>1.9</version>
57                         <scope>compile</scope>
58                 </dependency>
59
60                 <dependency>
61                         <groupId>org.eclipse.jetty</groupId>
62                         <artifactId>jetty-proxy</artifactId>
63                         <version>9.2.10.v20150310</version>
64                         <scope>compile</scope>
65                 </dependency>
66
67                 <dependency>
68                         <groupId>org.eclipse.jetty</groupId>
69                         <artifactId>jetty-servlets</artifactId>
70             <version>${jetty-version}</version>
71                         <scope>compile</scope>
72                 </dependency>
73
74                 <!-- Proxy servlet -->
75                 <dependency>
76                         <groupId>com.typesafe</groupId>
77                         <artifactId>config</artifactId>
78                         <version>1.0.2</version>
79                         <scope>compile</scope>
80                 </dependency>
81
82         </dependencies>
83         <build>
84                 <finalName>WSSimulator</finalName>
85                 <plugins>
86                         <!-- ================================================== -->
87                         <!-- Set the JDK compiler version. -->
88                         <!-- ================================================== -->
89                         <plugin>
90                                 <groupId>org.apache.maven.plugins</groupId>
91                                 <artifactId>maven-compiler-plugin</artifactId>
92                                 <version>2.5.1</version>
93                                 <inherited>true</inherited>
94                                 <configuration>
95                                         <source>1.8</source>
96                                         <target>1.8</target>
97                                 </configuration>
98                         </plugin>
99
100                         <plugin>
101                                 <groupId>org.eclipse.jetty</groupId>
102                                 <artifactId>jetty-maven-plugin</artifactId>
103                 <version>${jetty-version}</version>
104                                 <configuration>
105                                         <contextPath>/</contextPath>
106                                         <webApp>
107                                                 <contextPath>/</contextPath>
108                                                 <webInfIncludeJarPattern>.*/.*jersey-[^/]\.jar$</webInfIncludeJarPattern>
109                                         </webApp>
110                                         <war>WSSimulator.war</war>
111                                 </configuration>
112                         </plugin>
113
114                 </plugins>
115         </build>
116         
117         <repositories>
118                 <!-- LF repositories -->
119                 <repository>
120                         <id>ecomp-releases</id>
121                         <name>Release Repository</name>
122                         <url>${nexus.proxy}/content/repositories/releases/</url>
123                 </repository>
124                 <repository>
125                         <id>ecomp-staging</id>
126                         <name>Staging Repository</name>
127                         <url>${nexus.proxy}/content/repositories/staging/</url>
128                 </repository>
129                 <repository>
130                         <id>ecomp-snapshots</id>
131                         <name>Snapshots Repository</name>
132                         <url>${nexus.proxy}/content/repositories/snapshots/</url>
133                 </repository>
134                 <repository>
135                         <id>ecomp-public</id>
136                         <name>Public Repository</name>
137                         <url>${nexus.proxy}/content/repositories/public/</url>
138                 </repository>
139                 <!-- LF repositories END-->
140         </repositories>
141         
142         <profiles>
143                 <profile>
144                         <id>docker-staging</id>
145                         <properties>
146                                 <docker.tag>${project.version}-STAGING-${maven.build.timestamp}</docker.tag>
147                                 <docker.latest.tag>${project.version}-STAGING-latest</docker.latest.tag>
148                         </properties>
149                 </profile>
150
151                 <profile>
152                         <id>docker</id>
153                         <activation>
154                                 <activeByDefault>false</activeByDefault>
155                         </activation>
156                         <build>
157                                 <plugins>
158                                         
159                                         <plugin>
160                                                 <artifactId>maven-resources-plugin</artifactId>
161                                                 <version>3.0.2</version>
162                                                 <executions>
163                                                         <execution>
164                                                                 <id>copy-resources-simulator</id>
165                                                                 <phase>package</phase>
166                                                                 <goals>
167                                                                         <goal>copy-resources</goal>
168                                                                 </goals>
169                                                                 <configuration>
170                                                                         <outputDirectory>${basedir}/sdc-simulator</outputDirectory>
171                                                                         <resources>
172                                                                                 <resource>
173                                                                                         <directory>${basedir}/target</directory>
174                                                                                         <includes>
175                                                                                                 <include>WSSimulator.war</include>
176                                                                                         </includes>
177                                                                                 </resource>
178                                                                         </resources>
179                                                                 </configuration>
180                                                         </execution>
181                                                         <execution>
182                                                                 <id>copy-configurations-simulator</id>
183                                                                 <phase>validate</phase>
184                                                                 <goals>
185                                                                         <goal>copy-resources</goal>
186                                                                 </goals>
187                                                                 <configuration>
188                                                                         <outputDirectory>${basedir}/sdc-simulator/chef-repo/cookbooks/sdc-simulator/files/default</outputDirectory>
189                                                                         <resources>
190                                                                                 <resource>
191                                                                                         <directory>${basedir}/src/main/resources</directory>
192                                                                                         <includes>
193                                                                                                 <include>logback.xml</include>
194                                                                                         </includes>
195                                                                                 </resource>
196                                                                         </resources>
197                                                                 </configuration>
198                                                         </execution>
199                                                 </executions>
200                                         </plugin>
201
202
203
204                                         <plugin>
205                                                 <groupId>io.fabric8</groupId>
206                                                 <artifactId>docker-maven-plugin</artifactId>
207                                                 <version>0.23.0</version>
208
209                                                 <configuration>
210                                                         <verbose>true</verbose>
211                                                         <apiVersion>1.23</apiVersion>
212                                                         <registry>nexus3.onap.org:10001</registry>
213                             <authConfig>
214                                 <pull>
215                                                     <username>docker</username>
216                                                     <password>docker</password>
217                                             </pull>
218                                     </authConfig>
219                                                         <images>
220
221                                                                 <!-- Build simulator image -->
222                                                                 <image>
223                                                                         <name>openecomp/sdc-simulator</name>
224                                                                         <alias>sdc-simulator</alias>
225                                                                         <build>
226                                                                                 <cleanup>try</cleanup>
227                                                                                 <dockerFileDir>${basedir}/sdc-simulator</dockerFileDir>
228                                                                                 <tags>
229                                                                                         <tag>${docker.tag}</tag>
230                                                                                         <tag>${docker.latest.tag}</tag>
231                                                                                         <tag>1.1-STAGING-latest</tag>
232                                                                                 </tags>
233                                                                         </build>
234                                                                 </image>
235                                                         </images>
236                                                 </configuration>
237                                                 <executions>
238                                                         <execution>
239                                                                 <id>clean-images</id>
240                                                                 <phase>pre-clean</phase>
241                                                                 <goals>
242                                                                         <goal>remove</goal>
243                                                                 </goals>
244                                                                 <configuration>
245                                                                 <removeAll>true</removeAll>
246                                                                 <image>openecomp/sdc-simulator</image>
247                                                                 </configuration>
248                                                         </execution>
249
250                                                         <execution>
251                                                                 <id>generate-images</id>
252                                                                 <phase>package</phase>
253                                                                 <goals>
254                                                                         <goal>build</goal>
255                                                                 </goals>
256                                                         </execution>
257
258                                                         <execution>
259                                 <id>push-images</id>
260                                 <phase>deploy</phase>
261                                 <goals>
262                                                                         <goal>build</goal>
263                                                                         <goal>push</goal>
264                                 </goals>
265                                 <configuration>
266                                 <image>openecomp/sdc-simulator</image>
267                                 </configuration>
268                                                         </execution>
269                                                 </executions>
270                                         </plugin>
271                                 </plugins>
272                         </build>
273                 </profile>
274         </profiles>
275 </project>