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