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