spring-cloud-config: Refresh crashes :Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletContainerFactory bean

Debugging I see that on startup bean EmbeddedServletContainerFactory exists (jetty) and works

but on refresh , via HTTP, post the included snippet from EmbeddedWebApplicationContext cannot find de the factory

See attached sources. Can somebody help me?

I’ am willing to refresh to reload propertysourcess .regafrs

	protected EmbeddedServletContainerFactory getEmbeddedServletContainerFactory() {
		// Use bean names so that we don't consider the hierarchy
		String[] beanNames = getBeanFactory()
				.getBeanNamesForType(EmbeddedServletContainerFactory.class);
		if (beanNames.length == 0) {
			throw new ApplicationContextException(
					"Unable to start EmbeddedWebApplicationContext due to missing "
							+ "EmbeddedServletContainerFactory bean.");
		}
		if (beanNames.length > 1) {
			throw new ApplicationContextException(
					"Unable to start EmbeddedWebApplicationContext due to multiple "
							+ "EmbeddedServletContainerFactory beans : "
							+ StringUtils.arrayToCommaDelimitedString(beanNames));
		}
		return getBeanFactory().getBean(beanNames[0],
				EmbeddedServletContainerFactory.class);
	}

org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is org.springframework.context.ApplicationContextException: Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletContainerFactory bean.
        at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:137) ~[spring-boot-1.4.4.RELEASE.jar:1.4.4.RELEASE]
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:536) ~[spring-context-4.3.6.RELEASE.jar:4.3.6.RELEASE]
        at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122) ~[spring-boot-1.4.4.RELEASE.jar:1.4.4.RELEASE]
        at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:762) [spring-boot-1.4.4.RELEASE.jar:1.4.4.RELEASE]
        at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:372) [spring-boot-1.4.4.RELEASE.jar:1.4.4.RELEASE]
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:316) [spring-boot-1.4.4.RELEASE.jar:1.4.4.RELEASE]
        at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:134) [spring-boot-1.4.4.RELEASE.jar:1.4.4.RELEASE]
        at org.springframework.cloud.bootstrap.BootstrapApplicationListener.bootstrapServiceContext(BootstrapApplicationListener.java:138) [spring-cloud-context-1.1.7.RELEASE.jar:1.1.7.RELEASE]
        at org.springframework.cloud.bootstrap.BootstrapApplicationListener.onApplicationEvent(BootstrapApplicationListener.java:84) [spring-cloud-context-1.1.7.RELEASE.jar:1.1.7.RELEASE]
        at org.springframework.cloud.bootstrap.BootstrapApplicationListener.onApplicationEvent(BootstrapApplicationListener.java:62) [spring-cloud-context-1.1.SE.jar:1.1.7.RELEASE]
        at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:167) [spring-context-4.3.6.RELEASE.jar:4.3.6.RELEASE]
        at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139) [spring-context-4.3.6.RELEASE.jar:4.3.6.RELEASE]
        at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:122) [spring-context-4.3.6.RELEASE.jar:4.3.6.RELEASE]
        at org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListener.java:72) [spring-boot-1.4.4.RELEASE.jar:1.4.4.RELEASE]
        at org.springframework.boot.SpringApplicationRunListeners.environmentPrepared(SpringApplicationRunListeners.java:54) [spring-boot-1.4.4.RELEASE.jar:1.4.4.RELEASE]
        at org.springframework.boot.SpringApplication.prepareEnvironment(SpringApplication.java:338) [spring-boot-1.4.4.RELEASE.jar:1.4.4.RELEASE]
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:309) [spring-boot-1.4.4.RELEASE.jar:1.4.4.RELEASE]
        at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:134) [spring-boot-1.4.4.RELEASE.jar:1.4.4.RELEASE]
        at org.springframework.cloud.context.refresh.ContextRefresher.addConfigFilesToEnvironment(ContextRefresher.java:74) [spring-cloud-context-1.1.7.RELEASE.jar:1.1.7.RELEASE]
        at org.springframework.cloud.context.refresh.ContextRefresher.refresh(ContextRefresher.java:54) [spring-cloud-context-1.1.7.RELEASE.jar:1.1.7.RELEASE]
        at org.springframework.cloud.endpoint.RefreshEndpoint.refresh(RefreshEndpoint.java:46) [spring-cloud-context-1.1.7.RELEASE.jar:1.1.7.RELEASE]
        at org.springframework.cloud.endpoint.RefreshEndpoint.invoke(RefreshEndpoint.java:52) [spring-cloud-context-1.1.7.RELEASE.jar:1.1.7.RELEASE]
        at org.springframework.cloud.endpoint.RefreshEndpoint.invoke(RefreshEndpoint.java:33) [spring-cloud-context-1.1.7.RELEASE1.7.RELEASE]
        at org.springframework.boot.actuate.endpoint.mvc.AbstractEndpointMvcAdapter.invoke(AbstractEndpointMvcAdapter.java:56) [spring-boot-actuator-1.4.4.RELEASE.jar:1.4.4.RELEASE]
        at org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke(EndpointMvcAdapter.java:44) [spring-boot-actuator-1.4.4.RELEASE.jar:1.4.4.RELEASE]
        at org.springframework.cloud.endpoint.GenericPostableMvcEndpoint.invoke(GenericPostableMvcEndpoint.java:49) [spring-cloud-context-1.1.7.RELEASE.jar:1.1.7.RELEASE]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_77]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_77]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_77]
        at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_77]
        at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205) [spring-web-4.3.6.RELEASE.jar:4.3.6.RELEASE]
        at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:133) [spring-web-4.3.6.RELEASE.jar:4.3.6.RELEASE]
        at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:116) [spring-webmvc-4.3.6.RELEASE.jar:4.3.6.RELEASE]
        at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:827) [spring-webmvc-4.3.6.RELEASE.jar:4.3.6.RELEASE]
        at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:738) [spring-webmvc-4.3.6.RELEASE.jar:4.3.6.RELEASE]
        at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85) [spring-webmvc-4.3.6.RELEASE.jar:4.3.6.RELEASE]
        at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:963) [spring-webmvc-4.3.6.RELEASE.j6.RELEASE]
        at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:897) [spring-webmvc-4.3.6.RELEASE.jar:4.3.6.RELEASE]
        at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970) [spring-webmvc-4.3.6.RELEASE.jar:4.3.6.RELEASE]
        at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:872) [spring-webmvc-4.3.6.RELEASE.jar:4.3.6.RELEASE]
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:707) [javax.servlet-api-3.1.0.jar:3.1.0]
        at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846) [spring-webmvc-4.3.6.RELEASE.jar:4.3.6.RELEASE]
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) [javax.servlet-api-3.1.0.jar:3.1.0]
        at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:848) [jetty-servlet-9.3.16.v20170120.jar:9.3.16.v20170120]
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1772) [jetty-servlet-9.3.16.v20170120.jar:9.3.16.v20170120]
        at org.eclipse.jetty.websocket.server.WebSocketUpgradeFilter.doFilter(WebSocketUpgradeFilter.java:205) [websocket-server-9.3.16.v20170120.jar:9.3.16.v20170120]
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1759) [jetty-servlet-9.3.16.v20170120.jar:9.3.16.v20170120]
        at org.springframework.boot.web.filter.ApplicationContextHeaderFilter.doFilterInternal(ApplicationContextHeaderFilter.java:55) [spring-boot-1.4.4.RELEASE.jar:1.4.4.RELEASE]
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.3.6.RELEASE.jar:4.3.6.RELEASE]
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1759) [jetty-servlet-9.3.16.v20170120.jar:9.3.16.v20170120]
        at org.springframework.boot.actuate.trace.WebRequestTraceFilter.doFilterInternal(WebRequestTraceFilter.java:105) [spring-boot-actuator-1.4.4.RELEASE.jar:1.4.4.RELEASE]
        at org.springframework.web.filter.OncePerRequestFilter.doFiltPerRequestFilter.java:107) [spring-web-4.3.6.RELEASE.jar:4.3.6.RELEASE]
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1759) [jetty-servlet-9.3.16.v20170120.jar:9.3.16.v20170120]
        at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99) [spring-web-4.3.6.RELEASE.jar:4.3.6.RELEASE]
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.3.6.RELEASE.jar:4.3.6.RELEASE]
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1759) [jetty-servlet-9.3.16.v20170120.jar:9.3.16.v20170120]
        at org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:105) [spring-web-4.3.6.RELEASE.jar:4.3.6.RELEASE]
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.3.6.RELEASE.jar:4.3.6.RELEASE]
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1759) [jetty-servlet-9.3.16.v20170120.jar:9.3.16.v20170120]
        at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:81) [spring-web-4.3.6.RELEASE.jar:4.3.6.RELEASE]
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.3.6.RELEASE.jar:4.3.6.RELEASE]
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1759) [jetty-servlet-9.3.16.v20170120.jar:9.3.16.v20170120]
        at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197) [spring-web-4.3.6.RELEASE.jar:4.3.6.RELEASE]
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.3.6.RELEASE.jar:4.3.6.RELEASE]
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1759) [jetty-servlet-9.3.16.v20170120.jar:9.3.16.v20170120]
        at org.springframework.boot.actuate.autoconfigure.MetricsFilteterInternal(MetricsFilter.java:106) [spring-boot-actuator-1.4.4.RELEASE.jar:1.4.4.RELEASE]
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.3.6.RELEASE.jar:4.3.6.RELEASE]
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1759) [jetty-servlet-9.3.16.v20170120.jar:9.3.16.v20170120]
        at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:582) [jetty-servlet-9.3.16.v20170120.jar:9.3.16.v20170120]
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) [jetty-server-9.3.16.v20170120.jar:9.3.16.v20170120]
        at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548) [jetty-security-9.3.16.v20170120.jar:9.3.16.v20170120]
        at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226) [jetty-server-9.3.16.v20170120.jar:9.3.16.v20170120]
        at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1180) [jetty-server-9.3.16.v20170120.jar:9.3.16.v20170120]
        at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:512) [jetty-servlet-9.3.16.v20170120.jar:9.3.16.v20170120]
        at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) [jetty-server-9.3.16.v20170120.jar:9.3.16.v20170120]
        at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1112) [jetty-server-9.3.16.v20170120.jar:9.3.16.v20170120]
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.3.16.v20170120.jar:9.3.16.v20170120]
        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134) [jetty-server-9.3.16.v20170120.jar:9.3.16.v20170120]
        at org.eclipse.jetty.server.Server.handle(Server.java:534) [jetty-server-9.3.16.v20170120.jar:9.3.16.v20170120]
        at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:320) [jetty-server-9.3.16.v20170120.jar:9.3.16.v20170120]
        at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConneava:251) [jetty-server-9.3.16.v20170120.jar:9.3.16.v20170120]
        at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:283) [jetty-io-9.3.16.v20170120.jar:9.3.16.v20170120]
        at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:110) [jetty-io-9.3.16.v20170120.jar:9.3.16.v20170120]
        at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93) [jetty-io-9.3.16.v20170120.jar:9.3.16.v20170120]
        at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303) [jetty-util-9.3.16.v20170120.jar:9.3.16.v20170120]
        at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148) [jetty-util-9.3.16.v20170120.jar:9.3.16.v20170120]
        at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136) [jetty-util-9.3.16.v20170120.jar:9.3.16.v20170120]
        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671) [jetty-util-9.3.16.v20170120.jar:9.3.16.v20170120]
        at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589) [jetty-util-9.3.16.v20170120.jar:9.3.16.v20170120]
        at java.lang.Thread.run(Thread.java:745) [na:1.8.0_77]
Caused by: org.springframework.context.ApplicationContextException: Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletContainerFactory bean.
        at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.getEmbeddedServletContainerFactory(EmbeddedWebApplicationContext.java:189) ~[spring-boot-1.4.4.RELEASE.jar:1.4.4.RELEASE]
        at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.createEmbeddedServletContainer(EmbeddedWebApplicationContext.java:162) ~[spring-boot-1.4.4.RELEASE.jar:1.4.4.RELEASE]
        at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:134) ~[spring-boot-1.4.4.RELEASE.jar:1.4.4.RELEASE]
        ... 89 common frames omitted

application.yml

security:
  basic:
    enabled: false
info:
  component: Config Server

management:
  context_path: /admin
endpoints:
  refresh:
    enabled: true

  main:
    web-environment: true
  rabbitmq:
    host: rabbitmq
    port: 5672
    username: guest
    password: guest
    listener:
      max-concurrency: 500
      concurrency: 50
      default-requeue-rejected: false
      acknowledge-mode: auto

bootstrap.yml

spring:
  application:
    name: configserver
  cloud:
    config:
      uri: http://localhost:8888

PricingApp

package es.osoco.ulyseo.pricing

import es.osoco.ulyseo.pricing.application.packagegenerated.ApplyPriceToGeneratedPackageUseCase
import es.osoco.ulyseo.pricing.port.adapter.packagegenerated.PackageGeneratedAdapter
import es.osoco.ulyseo.pricing.port.adapter.packagegenerated.PackageGeneratedPort
import es.osoco.ulyseo.pricing.port.adapter.packagepricing.PackagePricingAdapter
import es.osoco.ulyseo.pricing.port.adapter.packagepricing.PackagePricingPort
import groovy.util.logging.Slf4j
import org.dozer.DozerBeanMapper
import org.springframework.amqp.rabbit.config.SimpleRabbitListenerContainerFactory
import org.springframework.amqp.rabbit.connection.ConnectionFactory
import org.springframework.amqp.support.converter.Jackson2JsonMessageConverter
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.SpringApplication
import org.springframework.boot.autoconfigure.SpringBootApplication
import org.springframework.boot.autoconfigure.amqp.RabbitProperties
import org.springframework.cloud.aws.autoconfigure.context.ContextStackAutoConfiguration
import org.springframework.context.annotation.Bean

@Slf4j
@SpringBootApplication(exclude = [ContextStackAutoConfiguration])
class PricingApp  {

    @Autowired
    private RabbitProperties props
    @Autowired
    private ConnectionFactory cachingConnectionFactory

    // Setting the annotation listeners to use the jackson2JsonMessageConverter
    @Bean
    SimpleRabbitListenerContainerFactory rabbitListenerContainerFactory() {
        SimpleRabbitListenerContainerFactory factory = new SimpleRabbitListenerContainerFactory()
        factory.setConnectionFactory(cachingConnectionFactory)
        factory.setMessageConverter(jackson2JsonMessageConverter())
        //Set properties from file
        props.listener.with {
            factory.setMaxConcurrentConsumers(maxConcurrency)
            factory.setConcurrentConsumers(concurrency)
            factory.setAcknowledgeMode(acknowledgeMode)
            factory.setDefaultRequeueRejected(defaultRequeueRejected)
        }

        return factory
    }

    // Standardize on a single objectMapper for all message queue items
    @Bean
    Jackson2JsonMessageConverter jackson2JsonMessageConverter() {
        return new Jackson2JsonMessageConverter()
    }

    @Bean
    ApplyPriceToGeneratedPackageUseCase applyPriceToPackageGeneratedUseCase() {
        new ApplyPriceToGeneratedPackageUseCase()
    }

    @Bean
    PackageGeneratedPort packageGeneratedPort() {
        new PackageGeneratedAdapter()
    }

    @Bean
    PackagePricingPort packagePricingPort() {
        new PackagePricingAdapter()
    }

    static void main(String[] args) throws Exception {
        SpringApplication.run(PricingApp, args)
    }


    @Bean(name = 'org.dozer.Mapper')
    DozerBeanMapper dozerBeanMapper() {
        List<String> mappingFiles = ['dozer-application-mappings.xml']
        DozerBeanMapper dozerBean = new DozerBeanMapper()
        dozerBean.setMappingFiles(mappingFiles)

        return dozerBean
    }


}

build.gradle

buildscript {
    repositories {
        mavenCentral()
        jcenter()
        maven { url 'http://repo.spring.io/plugins-release' }
    }
    dependencies {
        classpath 'org.springframework.build.gradle:propdeps-plugin:0.0.7'
        classpath "org.springframework.boot:spring-boot-gradle-plugin:1.4.4.RELEASE"
        classpath 'ru.vyarus:gradle-quality-plugin:2.0.0'
        classpath "io.spring.gradle:dependency-management-plugin:0.5.3.RELEASE"
    }
}

apply plugin: 'groovy'
apply plugin: 'org.springframework.boot'
apply plugin: 'java'
apply plugin: "idea"
apply plugin: 'ru.vyarus.quality'
apply plugin: "io.spring.dependency-management"
apply plugin: 'propdeps'

apply from: 'docker.gradle'
apply from: 'quality.gradle'

dependencyManagement {
    imports {
        mavenBom 'org.springframework.cloud:spring-cloud-dependencies:Camden.SR5'
    }
}

jar {
    baseName = 'ulyseo-pricing'
    version = '0.0.1-SNAPSHOT'
}

repositories {
    mavenLocal()
    mavenCentral()
    jcenter()
}

configurations {
    integrationTestCompile.extendsFrom testCompile
    integrationTestRuntime.extendsFrom testRuntime
    compile.exclude module: "spring-boot-starter-tomcat"
}

idea.module {
    sourceDirs += jsonschema2pojoOutputForIdea
}

sourceSets {
    jsonschema2pojo {
        java {
            compileClasspath += main.compileClasspath
            runtimeClasspath += main.runtimeClasspath
            srcDir jsonschema2pojoOutputForIdea
            output.classesDir = file("${buildDir}/classes/main")
        }
    }
    integrationTest {
        groovy {
            compileClasspath += main.output + test.output
            runtimeClasspath += main.output + test.output
            srcDir file('src/integration-test/groovy')
        }
        resources.srcDir file('src/integration-test/resources')
    }
}

void retainAllSystemProperties(Test test) {
    System.properties.each { k, v ->
        test.systemProperty k, v
    }
}

task integrationTest(type: Test) {
    testClassesDir = sourceSets.integrationTest.output.classesDir
    classpath = sourceSets.integrationTest.runtimeClasspath
    outputs.upToDateWhen { false }
    systemProperty 'spring.profiles.active', 'integration'
    retainAllSystemProperties(delegate)
}

tasks.withType(Test) {
    reports.html.destination = file("${reporting.baseDir}/${name}")
}

dependencies {
    compile "org.codehaus.groovy:groovy-all:2.4.0"
    compile "org.springframework.boot:spring-boot-starter"
    compile "org.springframework.boot:spring-boot-starter-amqp"
    compile "org.springframework.boot:spring-boot-starter-web"

    compile 'org.springframework.cloud:spring-cloud-starter-config'
    compile 'org.springframework.boot:spring-boot-starter-actuator'
    compile 'org.springframework.cloud:spring-cloud-starter-aws'
    compile 'org.springframework.boot:spring-boot-starter-jetty'

    compile group: 'com.amazonaws', name: 'aws-java-sdk-s3', version: '1.11.91'
    compile group: 'com.amazonaws', name: 'aws-java-sdk-core', version: '1.11.91'

    ///// <Required for jsonschema2pojo plugin>
    compile 'commons-lang:commons-lang:2.6'
    // Required if generating JSR-303 annotations
    compile 'javax.validation:validation-api:1.1.0.CR2'
    // Required if generating JodaTime data types
    compile 'joda-time:joda-time:2.2'
    compile 'org.hibernate:hibernate-validator:5.2.4.Final'
    compile 'net.sf.dozer:dozer:5.5.1'

    compile group: 'cglib', name: 'cglib-nodep', version: '2.2'

    //Easy Rules

    compile group: 'org.easyrules', name: 'easyrules-core', version: '2.3.0'
    compile group: 'org.easyrules', name: 'easyrules-spring', version: '2.3.0'

    testCompile "org.springframework.boot:spring-boot-starter-test"
    testCompile 'org.spockframework:spock-spring:1.0-groovy-2.4'
}
repositories {
    maven {
        url 'https://repo.spring.io/libs-milestone'
    }
}

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 23 (8 by maintainers)

Most upvoted comments

We faced the same issue. Comment the web-environment property (let the framework decide) is a possible workaround.

Regards,