New packages for Controllers: REST and WEB
[WebAppTest/.git] / 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     <modelVersion>4.0.0</modelVersion>
4     <groupId>com.prueba</groupId>
5     <artifactId>http-services</artifactId>
6     <version>1.0-SNAPSHOT</version>
7     <name>HTTP SERVICES</name>
8     <url>https://gumartinm.name/</url>
9     <description>HTTP SERVICES</description>
10     <organization>
11         <name>Gustavo Martin Morcuende</name>
12         <url>https://gumartinm.name/</url>
13     </organization>
14     <scm>
15         <developerConnection>scm:git:https://git.gumartinm.name/Prueba</developerConnection>
16         <url>https://git.gumartinm.name/Prueba</url>
17     </scm>
18
19     <properties>
20         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
21         <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
22         <maven.javadoc.version>2.10.4</maven.javadoc.version>
23         <maven.source.version>3.0.1</maven.source.version>
24
25         <!-- Be careful these two paths must match the ones configured in SONARQUBE JaCoCo plugin -->
26         <jacoco.it.execution.data.file>${project.basedir}/target/jacoco-it.exec</jacoco.it.execution.data.file>
27         <jacoco.ut.execution.data.file>${project.basedir}/target/jacoco.exec</jacoco.ut.execution.data.file>
28
29         <skip.unit.tests>false</skip.unit.tests>
30         <skip.integration.tests>true</skip.integration.tests>
31     </properties>
32
33     <profiles>
34         <profile>
35             <id>development</id>
36             <properties>
37                 <environment.profile>development</environment.profile>
38                 <environment.name>Desarrollo local</environment.name>
39             </properties>
40             <activation>
41                 <activeByDefault>true</activeByDefault>
42             </activation>
43         </profile>
44         <profile>
45             <id>integration</id>
46             <properties>
47                 <environment.profile>integration</environment.profile>
48                 <environment.name>Integration</environment.name>
49                 <skip.integration.tests>false</skip.integration.tests>
50             </properties>
51         </profile>
52         <profile>
53             <id>production</id>
54             <properties>
55                 <environment.profile>production</environment.profile>
56                 <environment.name>Production</environment.name>
57                 <skip.integration.tests>false</skip.integration.tests>
58             </properties>
59         </profile>
60     </profiles>
61
62     <dependencies>
63         <!--
64             1/3 Required dependency for log4j 2 with slf4j: binding between log4j 
65             2 and slf4j
66         -->
67         <dependency>
68             <groupId>org.apache.logging.log4j</groupId>
69             <artifactId>log4j-slf4j-impl</artifactId>
70             <version>2.6.1</version>
71         </dependency>
72         <!--
73             2/3 Required dependency for log4j 2 with slf4j: log4j 2 maven plugin 
74             (it is the log4j 2 implementation)
75         -->
76         <dependency>
77             <groupId>org.apache.logging.log4j</groupId>
78             <artifactId>log4j-core</artifactId>
79             <version>2.6.1</version>
80         </dependency>
81         <!--
82             3/3 Required dependency for getting rid of commons logging. This is 
83             the BRIDGE (no binding) between Jakarta Commons Logging (used by Spring) 
84             and whatever I am using for logging (in this case I am using log4j 2) See: 
85             http://www.slf4j.org/legacy.html We need exclusions in every dependency using 
86             Jakarta Commons Logging (see Spring dependencies below) 
87         -->
88         <dependency>
89             <groupId>org.slf4j</groupId>
90             <artifactId>jcl-over-slf4j</artifactId>
91             <version>1.7.21</version>
92         </dependency>
93
94
95         <!--
96             Jackson JSON Processor.
97         -->
98         <dependency>
99             <groupId>com.fasterxml.jackson.core</groupId>
100             <artifactId>jackson-databind</artifactId>
101             <version>2.8.3</version>
102         </dependency>
103         <!--
104             Jackson XML Processor.
105         -->
106         <dependency>
107             <groupId>com.fasterxml.jackson.dataformat</groupId>
108             <artifactId>jackson-dataformat-xml</artifactId>
109             <version>2.8.3</version>
110         </dependency>
111         <dependency>
112             <groupId>org.codehaus.woodstox</groupId>
113             <artifactId>woodstox-core-asl</artifactId>
114             <version>4.4.1</version>
115         </dependency>
116
117         <dependency>
118             <groupId>org.rendersnake</groupId>
119             <artifactId>rendersnake</artifactId>
120             <version>1.9.0</version>
121         </dependency>
122
123         <!-- Loading data base in run time -->
124         <dependency>
125             <groupId>org.liquibase</groupId>
126             <artifactId>liquibase-core</artifactId>
127             <version>3.5.2</version>
128         </dependency>
129         <dependency>
130             <groupId>com.h2database</groupId>
131             <artifactId>h2</artifactId>
132             <version>1.4.192</version>
133         </dependency>
134         
135         <!-- Database pool -->
136         <dependency>
137             <groupId>com.mchange</groupId>
138             <artifactId>c3p0</artifactId>
139             <version>0.9.5.2</version>
140         </dependency>
141
142         <!-- Unitary and integration tests -->
143         <dependency>
144             <groupId>junit</groupId>
145             <artifactId>junit</artifactId>
146             <version>4.12</version>
147             <scope>test</scope>
148         </dependency>
149         <dependency>
150             <groupId>org.mockito</groupId>
151             <artifactId>mockito-core</artifactId>
152             <version>2.0.43-beta</version>
153             <scope>test</scope>
154         </dependency>
155     </dependencies>
156
157     <build>
158         <plugins>
159             <plugin>
160                 <groupId>org.apache.maven.plugins</groupId>
161                 <artifactId>maven-compiler-plugin</artifactId>
162                 <version>3.5.1</version>
163                 <configuration>
164                     <source>1.8</source>
165                     <target>1.8</target>
166                     <encoding>${project.build.sourceEncoding}</encoding>
167                 </configuration>
168             </plugin>
169             <plugin>
170                 <groupId>org.apache.maven.plugins</groupId>
171                 <artifactId>maven-resources-plugin</artifactId>
172                 <version>3.0.1</version>
173                 <configuration>
174                     <encoding>${project.build.sourceEncoding}</encoding>
175                 </configuration>
176             </plugin>
177
178             <plugin>
179                 <groupId>org.jacoco</groupId>
180                 <artifactId>jacoco-maven-plugin</artifactId>
181                 <version>0.7.7.201606060606</version>
182                 <executions>
183                     <!-- Prepares the property pointing to the JaCoCo runtime agent which 
184                         is passed as VM argument when Maven the Surefire plugin is executed. -->
185                     <execution>
186                         <id>pre-unit-test</id>
187                         <goals>
188                             <goal>prepare-agent</goal>
189                         </goals>
190                         <configuration>
191                             <!-- Sets the path to the file which contains the execution data. -->
192                             <destFile>${jacoco.ut.execution.data.file}</destFile>
193                             <!-- Sets the name of the property containing the settings for JaCoCo 
194                                 runtime agent. -->
195                             <propertyName>surefireArgLine</propertyName>
196                         </configuration>
197                     </execution>
198                     <!-- Ensures that the code coverage report for unit tests is created 
199                         after unit tests have been run. -->
200                     <execution>
201                         <id>post-unit-test</id>
202                         <phase>test</phase>
203                         <goals>
204                             <goal>report</goal>
205                         </goals>
206                         <configuration>
207                             <!-- Sets the path to the file which contains the execution data. -->
208                             <dataFile>${jacoco.ut.execution.data.file}</dataFile>
209                             <!-- Sets the output directory for the code coverage report. -->
210                             <outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>
211                         </configuration>
212                     </execution>
213                     <!-- Prepares the property pointing to the JaCoCo runtime agent which 
214                         is passed as VM argument when Maven the Failsafe plugin is executed. -->
215                     <execution>
216                         <id>pre-integration-test</id>
217                         <phase>pre-integration-test</phase>
218                         <goals>
219                             <goal>prepare-agent</goal>
220                         </goals>
221                         <configuration>
222                             <!-- Sets the path to the file which contains the execution data. -->
223                             <destFile>${jacoco.it.execution.data.file}</destFile>
224                             <!-- Sets the name of the property containing the settings for JaCoCo 
225                                 runtime agent. -->
226                             <propertyName>failsafeArgLine</propertyName>
227                         </configuration>
228                     </execution>
229                     <!-- Ensures that the code coverage report for integration tests after 
230                         integration tests have been run. -->
231                     <execution>
232                         <id>post-integration-test</id>
233                         <phase>post-integration-test</phase>
234                         <goals>
235                             <goal>report</goal>
236                         </goals>
237                         <configuration>
238                             <!-- Sets the path to the file which contains the execution data. -->
239                             <dataFile>${jacoco.it.execution.data.file}</dataFile>
240                             <!-- Sets the output directory for the code coverage report. -->
241                             <outputDirectory>${project.reporting.outputDirectory}/jacoco-it</outputDirectory>
242                         </configuration>
243                     </execution>
244                 </executions>
245             </plugin>
246             <plugin>
247                 <groupId>org.eclipse.m2e</groupId>
248                 <artifactId>lifecycle-mapping</artifactId>
249                 <version>1.0.0</version>
250                 <configuration>
251                     <lifecycleMappingMetadata>
252                         <pluginExecutions>
253                             <pluginExecution>
254                                 <pluginExecutionFilter>
255                                     <groupId>org.jacoco</groupId>
256                                     <artifactId>jacoco-maven-plugin</artifactId>
257                                     <versionRange>[0.5,)
258                                     </versionRange>
259                                     <goals>
260                                         <goal>prepare-agent</goal>
261                                     </goals>
262                                 </pluginExecutionFilter>
263                                 <action>
264                                     <!-- m2e doesn't know what to do with jacoco, let's ignore it or 
265                                         annoying error markers appear see http://wiki.eclipse.org/M2E_plugin_execution_not_covered -->
266                                     <ignore />
267                                 </action>
268                             </pluginExecution>
269                         </pluginExecutions>
270                     </lifecycleMappingMetadata>
271                 </configuration>
272             </plugin>
273
274             <!-- Used for unit tests -->
275             <plugin>
276                 <groupId>org.apache.maven.plugins</groupId>
277                 <artifactId>maven-surefire-plugin</artifactId>
278                 <version>2.19.1</version>
279                 <dependencies>
280                     <dependency>
281                         <groupId>org.apache.maven.surefire</groupId>
282                         <artifactId>surefire-junit47</artifactId>
283                         <version>2.19.1</version>
284                     </dependency>
285                 </dependencies>
286                 <configuration>
287                     <!-- Sets the VM argument line used when unit tests are run. -->
288                     <argLine>-Dfile.encoding=${project.build.sourceEncoding}
289                         ${surefireArgLine}</argLine>
290                     <!-- Skips unit tests if the value of skip.unit.tests property is true -->
291                     <skipTests>${skip.unit.tests}</skipTests>
292                     <!-- Excludes integration tests when unit tests are run. -->
293                     <excludes>
294                         <exclude>**/*IT.java</exclude>
295                         <exclude>**/*IntegrationTest.java</exclude>
296                     </excludes>
297                 </configuration>
298             </plugin>
299             <!-- Used for integration tests -->
300             <plugin>
301                 <groupId>org.apache.maven.plugins</groupId>
302                 <artifactId>maven-failsafe-plugin</artifactId>
303                 <version>2.19.1</version>
304                 <executions>
305                     <execution>
306                         <goals>
307                             <goal>integration-test</goal>
308                             <goal>verify</goal>
309                         </goals>
310                         <configuration>
311                             <!-- Sets the VM argument line used when integration tests are run. -->
312                             <argLine>${failsafeArgLine}</argLine>
313
314                             <!-- Skips integration tests if the value of skip.integration.tests 
315                                 property is true -->
316                             <skipTests>${skip.integration.tests}</skipTests>
317                             <includes>
318                                 <include>**/*IT.java</include>
319                                 <include>**/*IntegrationTest.java</include>
320                             </includes>
321                         </configuration>
322                     </execution>
323                 </executions>
324             </plugin>
325         </plugins>
326
327     </build>
328
329 </project>