1+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2+ <project xmlns =" http://maven.apache.org/POM/4.0.0" xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
3+ xsi : schemaLocation =" http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" >
4+ <modelVersion >4.0.0</modelVersion >
5+
6+ <groupId >com.baeldung</groupId >
7+ <artifactId >jersey-api</artifactId >
8+ <version >0.1-SNAPSHOT</version >
9+ <packaging >war</packaging >
10+
11+ <properties >
12+ <jersey .version>2.25</jersey .version>
13+ <jcl .slf4j.version>1.7.22</jcl .slf4j.version>
14+ <logback .version>1.1.8</logback .version>
15+ <junit .version>4.12</junit .version>
16+ <maven-war-plugin .version>3.0.0</maven-war-plugin .version>
17+ <maven-surefire-plugin .version>2.19.1</maven-surefire-plugin .version>
18+ <cargo-maven2-plugin .version>1.6.1</cargo-maven2-plugin .version>
19+ <junit .version>4.12</junit .version>
20+ <httpcore .version>4.4.5</httpcore .version>
21+ <httpclient .version>4.5.2</httpclient .version>
22+ <servlet-api-version >3.1.0</servlet-api-version >
23+ </properties >
24+
25+ <build >
26+ <plugins >
27+ <plugin >
28+ <groupId >org.apache.maven.plugins</groupId >
29+ <artifactId >maven-compiler-plugin</artifactId >
30+ <configuration >
31+ <source >1.8</source >
32+ <target >1.8</target >
33+ </configuration >
34+ </plugin >
35+ <plugin >
36+ <artifactId >maven-war-plugin</artifactId >
37+ <version >${maven-war-plugin.version} </version >
38+ <configuration >
39+ <failOnMissingWebXml >false</failOnMissingWebXml >
40+ </configuration >
41+ </plugin >
42+ <plugin >
43+ <groupId >org.apache.maven.plugins</groupId >
44+ <artifactId >maven-surefire-plugin</artifactId >
45+ <version >${maven-surefire-plugin.version} </version >
46+ <configuration >
47+ <excludes >
48+ <exclude >**/*IntegrationTest.java</exclude >
49+ <exclude >**/*LiveTest.java</exclude >
50+ </excludes >
51+ </configuration >
52+ </plugin >
53+
54+ <plugin >
55+ <groupId >org.codehaus.cargo</groupId >
56+ <artifactId >cargo-maven2-plugin</artifactId >
57+ <version >${cargo-maven2-plugin.version} </version >
58+ <configuration >
59+ <wait >true</wait >
60+ <container >
61+ <containerId >jetty8x</containerId >
62+ <type >embedded</type >
63+ </container >
64+ <configuration >
65+ <properties >
66+ <cargo .servlet.port>8082</cargo .servlet.port>
67+ </properties >
68+ </configuration >
69+ </configuration >
70+ </plugin >
71+ </plugins >
72+ </build >
73+
74+ <dependencies >
75+
76+ <!-- core library -->
77+
78+ <dependency >
79+ <groupId >org.glassfish.jersey.core</groupId >
80+ <artifactId >jersey-server</artifactId >
81+ <version >${jersey.version} </version >
82+ </dependency >
83+ <dependency >
84+ <groupId >org.glassfish.jersey.containers</groupId >
85+ <artifactId >jersey-container-servlet</artifactId >
86+ <version >${jersey.version} </version >
87+ </dependency >
88+ <dependency >
89+ <groupId >org.glassfish.jersey.media</groupId >
90+ <artifactId >jersey-media-json-jackson</artifactId >
91+ <version >${jersey.version} </version >
92+ </dependency >
93+ <!-- servlet api -->
94+ <dependency >
95+ <groupId >javax.servlet</groupId >
96+ <artifactId >javax.servlet-api</artifactId >
97+ <version >${servlet-api-version} </version >
98+ <scope >provided</scope >
99+ </dependency >
100+ <!-- optional library -->
101+
102+ <dependency >
103+ <groupId >org.glassfish.jersey.ext</groupId >
104+ <artifactId >jersey-spring3</artifactId >
105+ <version >${jersey.version} </version >
106+ <exclusions >
107+ <exclusion >
108+ <groupId >commons-logging</groupId >
109+ <artifactId >commons-logging</artifactId >
110+ </exclusion >
111+ </exclusions >
112+ </dependency >
113+
114+ <dependency >
115+ <groupId >org.slf4j</groupId >
116+ <artifactId >jcl-over-slf4j</artifactId >
117+ <version >${jcl.slf4j.version} </version >
118+ </dependency >
119+
120+ <dependency >
121+ <groupId >ch.qos.logback</groupId >
122+ <artifactId >logback-classic</artifactId >
123+ <version >${logback.version} </version >
124+ </dependency >
125+
126+ <!-- http client -->
127+
128+ <dependency >
129+ <groupId >org.apache.httpcomponents</groupId >
130+ <artifactId >httpclient</artifactId >
131+ <version >${httpclient.version} </version >
132+ <scope >test</scope >
133+ </dependency >
134+
135+ <dependency >
136+ <groupId >org.apache.httpcomponents</groupId >
137+ <artifactId >httpcore</artifactId >
138+ <version >${httpcore.version} </version >
139+ <scope >test</scope >
140+ </dependency >
141+
142+ <!-- junit -->
143+
144+ <dependency >
145+ <groupId >junit</groupId >
146+ <artifactId >junit</artifactId >
147+ <version >${junit.version} </version >
148+ <scope >test</scope >
149+ </dependency >
150+ </dependencies >
151+
152+ <profiles >
153+ <profile >
154+ <id >live</id >
155+ <build >
156+ <plugins >
157+ <plugin >
158+ <groupId >org.apache.maven.plugins</groupId >
159+ <artifactId >maven-surefire-plugin</artifactId >
160+ <executions >
161+ <execution >
162+ <phase >integration-test</phase >
163+ <goals >
164+ <goal >test</goal >
165+ </goals >
166+ <configuration >
167+ <excludes >
168+ <exclude >**/*IntegrationTest.java</exclude >
169+ </excludes >
170+ <includes >
171+ <include >**/*LiveTest.java</include >
172+ </includes >
173+ </configuration >
174+ </execution >
175+ </executions >
176+ <configuration >
177+ <systemPropertyVariables >
178+ <test .mime>json</test .mime>
179+ </systemPropertyVariables >
180+ </configuration >
181+ </plugin >
182+ <plugin >
183+ <groupId >org.codehaus.cargo</groupId >
184+ <artifactId >cargo-maven2-plugin</artifactId >
185+ <version >${cargo-maven2-plugin.version} </version >
186+ <configuration >
187+ <wait >false</wait >
188+ </configuration >
189+ <executions >
190+ <execution >
191+ <id >start-server</id >
192+ <phase >pre-integration-test</phase >
193+ <goals >
194+ <goal >start</goal >
195+ </goals >
196+ </execution >
197+ <execution >
198+ <id >stop-server</id >
199+ <phase >post-integration-test</phase >
200+ <goals >
201+ <goal >stop</goal >
202+ </goals >
203+ </execution >
204+ </executions >
205+ </plugin >
206+ </plugins >
207+ </build >
208+ </profile >
209+ </profiles >
210+ </project >
0 commit comments