{"action":"created","issue":{"url":"https://api.github.com/repos/spring-projects/spring-boot/issues/6595","repository_url":"https://api.github.com/repos/spring-projects/spring-boot","labels_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/6595/labels{/name}","comments_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/6595/comments","events_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/6595/events","html_url":"https://github.com/spring-projects/spring-boot/issues/6595","id":170144323,"number":6595,"title":"Spring Boot profiles not active when set with maven plugin","user":{"login":"Siflei","id":20500472,"avatar_url":"https://avatars.githubusercontent.com/u/20500472?v=3","gravatar_id":"","url":"https://api.github.com/users/Siflei","html_url":"https://github.com/Siflei","followers_url":"https://api.github.com/users/Siflei/followers","following_url":"https://api.github.com/users/Siflei/following{/other_user}","gists_url":"https://api.github.com/users/Siflei/gists{/gist_id}","starred_url":"https://api.github.com/users/Siflei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Siflei/subscriptions","organizations_url":"https://api.github.com/users/Siflei/orgs","repos_url":"https://api.github.com/users/Siflei/repos","events_url":"https://api.github.com/users/Siflei/events{/privacy}","received_events_url":"https://api.github.com/users/Siflei/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/spring-projects/spring-boot/labels/feedback-provided","name":"feedback-provided","color":"ededed"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2016-08-09T11:34:30Z","updated_at":"2016-08-09T14:22:50Z","closed_at":null,"body":"Hi,\r\nI'm trying to set spring profiles when starting Tomcat for integration tests in maven like this:\r\n\r\n    ...\r\n    <plugin>\r\n      <groupId>org.springframework.boot</groupId>\r\n      <artifactId>spring-boot-maven-plugin</artifactId>\r\n      <executions>\r\n        <execution>\r\n          <id>pre-integration-test</id>\r\n            <goals>\r\n              <goal>start</goal>\r\n            </goals>\r\n            <configuration>\r\n              <profiles>\r\n                <profile>testProfile</profile>\r\n              </profiles>\r\n            </configuration>\r\n    ...\r\n\r\nThe profile is definitely not active.\r\n\r\nOn the other hand the following does work and the requested profile is active:\r\n    `<jvmArguments>-Dspring.profiles.active=testProfile</jvmArguments>`\r\nThe problem here is that we can't stop the server, which is a problem when running automated integration tests.\r\n\r\nI'm using spring boot \"1.4.0.RELEASE\".\r\n\r\nDid we find a bug here?"},"comment":{"url":"https://api.github.com/repos/spring-projects/spring-boot/issues/comments/238568782","html_url":"https://github.com/spring-projects/spring-boot/issues/6595#issuecomment-238568782","issue_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/6595","id":238568782,"user":{"login":"wilkinsona","id":914682,"avatar_url":"https://avatars.githubusercontent.com/u/914682?v=3","gravatar_id":"","url":"https://api.github.com/users/wilkinsona","html_url":"https://github.com/wilkinsona","followers_url":"https://api.github.com/users/wilkinsona/followers","following_url":"https://api.github.com/users/wilkinsona/following{/other_user}","gists_url":"https://api.github.com/users/wilkinsona/gists{/gist_id}","starred_url":"https://api.github.com/users/wilkinsona/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wilkinsona/subscriptions","organizations_url":"https://api.github.com/users/wilkinsona/orgs","repos_url":"https://api.github.com/users/wilkinsona/repos","events_url":"https://api.github.com/users/wilkinsona/events{/privacy}","received_events_url":"https://api.github.com/users/wilkinsona/received_events","type":"User","site_admin":false},"created_at":"2016-08-09T14:22:50Z","updated_at":"2016-08-09T14:22:50Z","body":" Your main method is ignoring the arguments that are passed into the app so it's ignoring the active profile. You need to pass the args into the call to `SpringApplication.run`:\r\n\r\n```java\r\npublic static void main(String[] args) throws Exception {\r\n    SpringApplication.run(RunServer.class, args);\r\n}\r\n```"}}
{"actor":{"display_login":"wilkinsona"}}