{"action":"created","issue":{"url":"https://api.github.com/repos/spring-projects/spring-boot/issues/2525","labels_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/2525/labels{/name}","comments_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/2525/comments","events_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/2525/events","html_url":"https://github.com/spring-projects/spring-boot/issues/2525","id":58190151,"number":2525,"title":"Add \"start-stop\" goals for the spring-boot-maven-plugin","user":{"login":"danpersa","id":579158,"avatar_url":"https://avatars.githubusercontent.com/u/579158?v=3","gravatar_id":"","url":"https://api.github.com/users/danpersa","html_url":"https://github.com/danpersa","followers_url":"https://api.github.com/users/danpersa/followers","following_url":"https://api.github.com/users/danpersa/following{/other_user}","gists_url":"https://api.github.com/users/danpersa/gists{/gist_id}","starred_url":"https://api.github.com/users/danpersa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danpersa/subscriptions","organizations_url":"https://api.github.com/users/danpersa/orgs","repos_url":"https://api.github.com/users/danpersa/repos","events_url":"https://api.github.com/users/danpersa/events{/privacy}","received_events_url":"https://api.github.com/users/danpersa/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/spring-projects/spring-boot/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/spring-projects/spring-boot/labels/in%20progress","name":"in progress","color":"eac04b"}],"state":"open","locked":false,"assignee":{"login":"snicoll","id":490484,"avatar_url":"https://avatars.githubusercontent.com/u/490484?v=3","gravatar_id":"","url":"https://api.github.com/users/snicoll","html_url":"https://github.com/snicoll","followers_url":"https://api.github.com/users/snicoll/followers","following_url":"https://api.github.com/users/snicoll/following{/other_user}","gists_url":"https://api.github.com/users/snicoll/gists{/gist_id}","starred_url":"https://api.github.com/users/snicoll/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snicoll/subscriptions","organizations_url":"https://api.github.com/users/snicoll/orgs","repos_url":"https://api.github.com/users/snicoll/repos","events_url":"https://api.github.com/users/snicoll/events{/privacy}","received_events_url":"https://api.github.com/users/snicoll/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/spring-projects/spring-boot/milestones/28","html_url":"https://github.com/spring-projects/spring-boot/milestones/1.3.0.RC1","labels_url":"https://api.github.com/repos/spring-projects/spring-boot/milestones/28/labels","id":818466,"number":28,"title":"1.3.0.RC1","description":"","creator":{"login":"philwebb","id":519772,"avatar_url":"https://avatars.githubusercontent.com/u/519772?v=3","gravatar_id":"","url":"https://api.github.com/users/philwebb","html_url":"https://github.com/philwebb","followers_url":"https://api.github.com/users/philwebb/followers","following_url":"https://api.github.com/users/philwebb/following{/other_user}","gists_url":"https://api.github.com/users/philwebb/gists{/gist_id}","starred_url":"https://api.github.com/users/philwebb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/philwebb/subscriptions","organizations_url":"https://api.github.com/users/philwebb/orgs","repos_url":"https://api.github.com/users/philwebb/repos","events_url":"https://api.github.com/users/philwebb/events{/privacy}","received_events_url":"https://api.github.com/users/philwebb/received_events","type":"User","site_admin":false},"open_issues":143,"closed_issues":0,"state":"open","created_at":"2014-10-08T15:00:46Z","updated_at":"2015-05-16T05:51:50Z","due_on":null,"closed_at":null},"comments":14,"created_at":"2015-02-19T10:25:39Z","updated_at":"2015-05-18T20:32:22Z","closed_at":null,"body":"In order to run integration tests for a spring boot app, you can use the workaround described in #667.\r\n\r\nThere is a more detailed article [here](http://www.jayway.com/2014/07/04/integration-testing-a-spring-boot-application/).\r\n\r\nBut in some cases, this approach can't be used. One example would be running Cucumber tests.\r\n\r\nI have two use cases: The first one uses maven. I want to start my spring-boot app, run some Cucumber tests, then stop the spring-boot app, everything within Maven. \r\n\r\nAnother use case would be: Having the spring-boot running in my IDE and then run the Cucumber tests also from the IDE, by connecting to the already running app.\r\n\r\nI wouldn't like to have the deployment phase hardcoded into the test class as in the example article. This is because (as described in the second use case) if I already have an instance of the application running, I should be able to run my cucumber test directly from my IDE, without starting another instance. I'd like to decouple the deployment step and testing step, as they don't really belong together.\r\n\r\nAnother reason for having the start-stop approach in the maven plugin is that the method of running the tests described in the article doesn't help me, because Cucumber has to be run using a `@RunWith(@Cucumber.class)` junit annotation, and the spring boot need the `@RunWith(SpringJUnit4ClassRunner.class)` annotation. And we can't use two `@RunWith` annotations on one test class.\r\n\r\nI managed to start my spring boot app using maven, like this:\r\n\r\n        <plugin>\r\n            <groupId>org.springframework.boot</groupId>\r\n            <artifactId>spring-boot-maven-plugin</artifactId>\r\n            <configuration>\r\n                <mainClass>boot.Main</mainClass>\r\n                <layout>ZIP</layout>\r\n            </configuration>\r\n            <executions>\r\n                <execution>\r\n                    <id>boot-run</id>\r\n                    <goals>\r\n                        <goal>run</goal>\r\n                    </goals>\r\n                    <phase>pre-integration-test</phase>\r\n                    <configuration>\r\n                        <fork>true</fork>\r\n                    </configuration>\r\n                </execution>\r\n            </executions>\r\n        </plugin>\r\n\r\nBut after the boot-app is started, the maven build is blocked... As soon as you press Ctrl+C, to stop the tomcat, the build resumes.\r\n"},"comment":{"url":"https://api.github.com/repos/spring-projects/spring-boot/issues/comments/103201093","html_url":"https://github.com/spring-projects/spring-boot/issues/2525#issuecomment-103201093","issue_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/2525","id":103201093,"user":{"login":"php-coder","id":87088,"avatar_url":"https://avatars.githubusercontent.com/u/87088?v=3","gravatar_id":"","url":"https://api.github.com/users/php-coder","html_url":"https://github.com/php-coder","followers_url":"https://api.github.com/users/php-coder/followers","following_url":"https://api.github.com/users/php-coder/following{/other_user}","gists_url":"https://api.github.com/users/php-coder/gists{/gist_id}","starred_url":"https://api.github.com/users/php-coder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/php-coder/subscriptions","organizations_url":"https://api.github.com/users/php-coder/orgs","repos_url":"https://api.github.com/users/php-coder/repos","events_url":"https://api.github.com/users/php-coder/events{/privacy}","received_events_url":"https://api.github.com/users/php-coder/received_events","type":"User","site_admin":false},"created_at":"2015-05-18T20:32:22Z","updated_at":"2015-05-18T20:32:22Z","body":"@snicoll Could I ask you to create a tag on gh-2525 branch? In this case I be able to build JAR via https://jitpack.io and test it."}}