File tree Expand file tree Collapse file tree
src/test/java/org/baeldung/web/test Expand file tree Collapse file tree Original file line number Diff line number Diff line change 182182 <plugin >
183183 <groupId >org.apache.maven.plugins</groupId >
184184 <artifactId >maven-compiler-plugin</artifactId >
185- <version >${maven-compiler-plugin.version} </version >
186185 <configuration >
187186 <source >1.8</source >
188187 <target >1.8</target >
192191 <plugin >
193192 <groupId >org.apache.maven.plugins</groupId >
194193 <artifactId >maven-war-plugin</artifactId >
195- <version >${maven-war-plugin.version} </version >
196194 </plugin >
197195
198196 <plugin >
199197 <groupId >org.apache.maven.plugins</groupId >
200198 <artifactId >maven-surefire-plugin</artifactId >
201- <version >${maven-surefire-plugin.version} </version >
202199 <configuration >
203200 <excludes >
204201 <!-- <exclude>**/*ProductionTest.java</exclude> -->
234231
235232 </build >
236233
234+ <profiles >
235+ <profile >
236+ <id >live</id >
237+ <build >
238+ <plugins >
239+ <plugin >
240+ <groupId >org.codehaus.cargo</groupId >
241+ <artifactId >cargo-maven2-plugin</artifactId >
242+ <executions >
243+ <execution >
244+ <id >start-server</id >
245+ <phase >pre-integration-test</phase >
246+ <goals >
247+ <goal >start</goal >
248+ </goals >
249+ </execution >
250+ <execution >
251+ <id >stop-server</id >
252+ <phase >post-integration-test</phase >
253+ <goals >
254+ <goal >stop</goal >
255+ </goals >
256+ </execution >
257+ </executions >
258+ </plugin >
259+
260+ <plugin >
261+ <groupId >org.apache.maven.plugins</groupId >
262+ <artifactId >maven-surefire-plugin</artifactId >
263+ <executions >
264+ <execution >
265+ <phase >integration-test</phase >
266+ <goals >
267+ <goal >test</goal >
268+ </goals >
269+ <configuration >
270+ <excludes >
271+ <exclude >none</exclude >
272+ </excludes >
273+ <includes >
274+ <include >**/*LiveTest.java</include >
275+ </includes >
276+ <systemPropertyVariables >
277+ <webTarget >cargo</webTarget >
278+ </systemPropertyVariables >
279+ </configuration >
280+ </execution >
281+ </executions >
282+ </plugin >
283+
284+ </plugins >
285+ </build >
286+ </profile >
287+ </profiles >
288+
237289 <properties >
238290 <!-- Spring -->
239291
Original file line number Diff line number Diff line change 77import com .jayway .restassured .RestAssured ;
88
99public class RequestMappingLiveTest {
10- private static String BASE_URI = "http://localhost:8080 /spring-rest/ex/" ;
10+ private static String BASE_URI = "http://localhost:8082 /spring-rest/ex/" ;
1111
1212 @ Test
1313 public void givenSimplePath_whenGetFoos_thenOk () {
Original file line number Diff line number Diff line change 2121/**
2222 * Integration Test class. Tests methods hits the server's rest services.
2323 */
24- public class SpringHttpMessageConvertersIntegrationTestsCase {
24+ public class SpringHttpMessageConvertersLiveTest {
2525
26- private static String BASE_URI = "http://localhost:8080 /spring-rest/" ;
26+ private static String BASE_URI = "http://localhost:8082 /spring-rest/" ;
2727
2828 /**
2929 * Without specifying Accept Header, uses the default response from the
You can’t perform that action at this time.
0 commit comments