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