title: ErrorPageFilter - Forwarding to error page from request [/mypath] due to exception [java.lang.NullPointerException]
body: <p>I am developing a SpringBoot REST API application built by maven, which I could run last week, but now something is wrong with it.</p>
  
  <p>I can build the application without issue, and start it also. But when I call an endpoint, I always get a nullpointer which points to some inner classes of glassfish and apache. </p>
  
  <p>This is the error I get:</p>
  
  <pre><code>Refunding-Auth: 2018-06-11 13:52:46,391 ERROR [http-nio-8080-exec-2] o.s.b.w.s.ErrorPageFilter:176 - Forwarding to error page from request [/mypath] due to exception [java.lang.NullPointerException]
  javax.servlet.ServletException: java.lang.NullPointerException
      at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:489) ~[jersey-container-servlet-core-2.25.1.jar:?]
      at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:427) ~[jersey-container-servlet-core-2.25.1.jar:?]
      at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:388) ~[jersey-container-servlet-core-2.25.1.jar:?]
      at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:341) ~[jersey-container-servlet-core-2.25.1.jar:?]
      at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:228) ~[jersey-container-servlet-core-2.25.1.jar:?]
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) ~[catalina.jar:8.5.24]
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[catalina.jar:8.5.24]
      at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) ~[tomcat-websocket.jar:8.5.24]
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[catalina.jar:8.5.24]
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[catalina.jar:8.5.24]
      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.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[catalina.jar:8.5.24]
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[catalina.jar:8.5.24]
      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.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[catalina.jar:8.5.24]
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[catalina.jar:8.5.24]
      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.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[catalina.jar:8.5.24]
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[catalina.jar:8.5.24]
      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.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[catalina.jar:8.5.24]
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[catalina.jar:8.5.24]
      at org.springframework.boot.web.support.ErrorPageFilter.doFilter(ErrorPageFilter.java:115) [spring-boot-1.5.1.RELEASE.jar:1.5.1.RELEASE]
      at org.springframework.boot.web.support.ErrorPageFilter.access$000(ErrorPageFilter.java:59) [spring-boot-1.5.1.RELEASE.jar:1.5.1.RELEASE]
      at org.springframework.boot.web.support.ErrorPageFilter$1.doFilterInternal(ErrorPageFilter.java:90) [spring-boot-1.5.1.RELEASE.jar:1.5.1.RELEASE]
      at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.3.6.RELEASE.jar:4.3.6.RELEASE]
      at org.springframework.boot.web.support.ErrorPageFilter.doFilter(ErrorPageFilter.java:108) [spring-boot-1.5.1.RELEASE.jar:1.5.1.RELEASE]
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [catalina.jar:8.5.24]
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina.jar:8.5.24]
      at org.apache.logging.log4j.web.Log4jServletFilter.doFilter(Log4jServletFilter.java:71) [log4j-web-2.10.0.jar:2.10.0]
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [catalina.jar:8.5.24]
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina.jar:8.5.24]
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198) [catalina.jar:8.5.24]
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) [catalina.jar:8.5.24]
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504) [catalina.jar:8.5.24]
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140) [catalina.jar:8.5.24]
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81) [catalina.jar:8.5.24]
      at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:650) [catalina.jar:8.5.24]
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) [catalina.jar:8.5.24]
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342) [catalina.jar:8.5.24]
      at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:803) [tomcat-coyote.jar:8.5.24]
      at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) [tomcat-coyote.jar:8.5.24]
      at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:790) [tomcat-coyote.jar:8.5.24]
      at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1459) [tomcat-coyote.jar:8.5.24]
      at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-coyote.jar:8.5.24]
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_91]
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_91]
      at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-util.jar:8.5.24]
      at java.lang.Thread.run(Thread.java:745) [?:1.8.0_91]
  Caused by: java.lang.NullPointerException
      at sun.reflect.annotation.TypeAnnotationParser.mapTypeAnnotations(TypeAnnotationParser.java:356) ~[?:1.8.0_91]
      at sun.reflect.annotation.AnnotatedTypeFactory$AnnotatedTypeBaseImpl.&lt;init&gt;(AnnotatedTypeFactory.java:139) ~[?:1.8.0_91]
      at sun.reflect.annotation.AnnotatedTypeFactory.buildAnnotatedType(AnnotatedTypeFactory.java:65) ~[?:1.8.0_91]
      at sun.reflect.annotation.TypeAnnotationParser.buildAnnotatedType(TypeAnnotationParser.java:79) ~[?:1.8.0_91]
      at java.lang.reflect.Field.getAnnotatedType(Field.java:1170) ~[?:1.8.0_91]
      at org.hibernate.validator.internal.metadata.provider.TypeAnnotationAwareMetaDataProvider.findTypeAnnotationConstraintsForMember(TypeAnnotationAwareMetaDataProvider.java:65) ~[hibernate-validator-5.3.4.Final.jar:5.3.4.Final]
      at org.hibernate.validator.internal.metadata.provider.AnnotationMetaDataProvider.findPropertyMetaData(AnnotationMetaDataProvider.java:244) ~[hibernate-validator-5.3.4.Final.jar:5.3.4.Final]
      at org.hibernate.validator.internal.metadata.provider.AnnotationMetaDataProvider.getFieldMetaData(AnnotationMetaDataProvider.java:227) ~[hibernate-validator-5.3.4.Final.jar:5.3.4.Final]
      at org.hibernate.validator.internal.metadata.provider.AnnotationMetaDataProvider.retrieveBeanConfiguration(AnnotationMetaDataProvider.java:137) ~[hibernate-validator-5.3.4.Final.jar:5.3.4.Final]
      at org.hibernate.validator.internal.metadata.provider.AnnotationMetaDataProvider.getBeanConfiguration(AnnotationMetaDataProvider.java:125) ~[hibernate-validator-5.3.4.Final.jar:5.3.4.Final]
      at org.hibernate.validator.internal.metadata.provider.AnnotationMetaDataProvider.getBeanConfigurationForHierarchy(AnnotationMetaDataProvider.java:108) ~[hibernate-validator-5.3.4.Final.jar:5.3.4.Final]
      at org.hibernate.validator.internal.metadata.BeanMetaDataManager.createBeanMetaData(BeanMetaDataManager.java:203) ~[hibernate-validator-5.3.4.Final.jar:5.3.4.Final]
      at org.hibernate.validator.internal.metadata.BeanMetaDataManager.getOrCreateBeanMetaData(BeanMetaDataManager.java:231) ~[hibernate-validator-5.3.4.Final.jar:5.3.4.Final]
      at org.hibernate.validator.internal.metadata.BeanMetaDataManager.getBeanMetaData(BeanMetaDataManager.java:178) ~[hibernate-validator-5.3.4.Final.jar:5.3.4.Final]
      at org.hibernate.validator.internal.engine.ValidatorImpl.buildNewLocalExecutionContext(ValidatorImpl.java:775) ~[hibernate-validator-5.3.4.Final.jar:5.3.4.Final]
      at org.hibernate.validator.internal.engine.ValidatorImpl.validateCascadedConstraint(ValidatorImpl.java:758) ~[hibernate-validator-5.3.4.Final.jar:5.3.4.Final]
      at org.hibernate.validator.internal.engine.ValidatorImpl.validateCascadedConstraints(ValidatorImpl.java:684) ~[hibernate-validator-5.3.4.Final.jar:5.3.4.Final]
      at org.hibernate.validator.internal.engine.ValidatorImpl.validateInContext(ValidatorImpl.java:419) ~[hibernate-validator-5.3.4.Final.jar:5.3.4.Final]
      at org.hibernate.validator.internal.engine.ValidatorImpl.validateCascadedConstraint(ValidatorImpl.java:761) ~[hibernate-validator-5.3.4.Final.jar:5.3.4.Final]
      at org.hibernate.validator.internal.engine.ValidatorImpl.validateCascadedConstraints(ValidatorImpl.java:684) ~[hibernate-validator-5.3.4.Final.jar:5.3.4.Final]
      at org.hibernate.validator.internal.engine.ValidatorImpl.validateParametersInContext(ValidatorImpl.java:1125) ~[hibernate-validator-5.3.4.Final.jar:5.3.4.Final]
      at org.hibernate.validator.internal.engine.ValidatorImpl.validateParameters(ValidatorImpl.java:301) ~[hibernate-validator-5.3.4.Final.jar:5.3.4.Final]
      at org.hibernate.validator.internal.engine.ValidatorImpl.validateParameters(ValidatorImpl.java:255) ~[hibernate-validator-5.3.4.Final.jar:5.3.4.Final]
      at org.glassfish.jersey.server.validation.internal.DefaultConfiguredValidator.onValidate(DefaultConfiguredValidator.java:175) ~[jersey-bean-validation-2.25.1.jar:?]
      at org.glassfish.jersey.server.validation.internal.ValidationInterceptorExecutor.proceed(ValidationInterceptorExecutor.java:113) ~[jersey-bean-validation-2.25.1.jar:?]
      at org.glassfish.jersey.server.validation.internal.DefaultConfiguredValidator.validateResourceAndInputParams(DefaultConfiguredValidator.java:146) ~[jersey-bean-validation-2.25.1.jar:?]
      at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:134) ~[jersey-server-2.25.1.jar:?]
      at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) ~[jersey-server-2.25.1.jar:?]
      at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) ~[jersey-server-2.25.1.jar:?]
      at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) ~[jersey-server-2.25.1.jar:?]
      at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) ~[jersey-server-2.25.1.jar:?]
      at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) ~[jersey-server-2.25.1.jar:?]
      at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) ~[jersey-server-2.25.1.jar:?]
      at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) ~[jersey-common-2.25.1.jar:?]
      at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) ~[jersey-common-2.25.1.jar:?]
      at org.glassfish.jersey.internal.Errors.process(Errors.java:315) ~[jersey-common-2.25.1.jar:?]
      at org.glassfish.jersey.internal.Errors.process(Errors.java:297) ~[jersey-common-2.25.1.jar:?]
      at org.glassfish.jersey.internal.Errors.process(Errors.java:267) ~[jersey-common-2.25.1.jar:?]
      at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) ~[jersey-common-2.25.1.jar:?]
      at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) ~[jersey-server-2.25.1.jar:?]
      at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) ~[jersey-server-2.25.1.jar:?]
      at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:473) ~[jersey-container-servlet-core-2.25.1.jar:?]
      ... 52 more
  </code></pre>
  
  <p>And I have no idea where and how to start to find the problem. I made some changes, but I haven't add any new dependency to my pom, this is the pom.xml:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;project xmlns="http://maven.apache.org/POM/4.0.0"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
      &lt;artifactId&gt;myapp&lt;/artifactId&gt;
      &lt;packaging&gt;war&lt;/packaging&gt;
  
      &lt;parent&gt;
          &lt;artifactId&gt;myapp-parent&lt;/artifactId&gt;
          &lt;groupId&gt;com.my.app&lt;/groupId&gt;
          &lt;version&gt;1.0.0&lt;/version&gt;
      &lt;/parent&gt;
  
      &lt;properties&gt;
          &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
          &lt;swagger_host&gt;localhost:8080&lt;/swagger_host&gt;
          &lt;swagger_protocol&gt;http&lt;/swagger_protocol&gt;
          &lt;swagger_base-path&gt;/myapp/api/v3&lt;/swagger_base-path&gt;
          &lt;sonar.tests&gt;src/test/groovy&lt;/sonar.tests&gt;
      &lt;/properties&gt;
  
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;${project.groupId}&lt;/groupId&gt;
              &lt;artifactId&gt;myapp-commons&lt;/artifactId&gt;
              &lt;version&gt;${project.version}&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-web&lt;/artifactId&gt;
              &lt;exclusions&gt;
                  &lt;exclusion&gt;
                      &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
                      &lt;artifactId&gt;spring-boot-starter-logging&lt;/artifactId&gt;
                  &lt;/exclusion&gt;
              &lt;/exclusions&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-configuration-processor&lt;/artifactId&gt;
              &lt;optional&gt;true&lt;/optional&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-tomcat&lt;/artifactId&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-jersey&lt;/artifactId&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-test&lt;/artifactId&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.commons&lt;/groupId&gt;
              &lt;artifactId&gt;commons-lang3&lt;/artifactId&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;commons-codec&lt;/groupId&gt;
              &lt;artifactId&gt;commons-codec&lt;/artifactId&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;commons-lang&lt;/groupId&gt;
              &lt;artifactId&gt;commons-lang&lt;/artifactId&gt;
              &lt;version&gt;2.6&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.commons&lt;/groupId&gt;
              &lt;artifactId&gt;commons-csv&lt;/artifactId&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;com.microsoft.sqlserver&lt;/groupId&gt;
              &lt;artifactId&gt;mssql-jdbc&lt;/artifactId&gt;
          &lt;/dependency&gt;
  
          &lt;!-- Log4j Start --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.logging.log4j&lt;/groupId&gt;
              &lt;artifactId&gt;log4j-api&lt;/artifactId&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.logging.log4j&lt;/groupId&gt;
              &lt;artifactId&gt;log4j-core&lt;/artifactId&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.logging.log4j&lt;/groupId&gt;
              &lt;artifactId&gt;log4j-web&lt;/artifactId&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.logging.log4j&lt;/groupId&gt;
              &lt;artifactId&gt;log4j-slf4j-impl&lt;/artifactId&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.logging.log4j&lt;/groupId&gt;
              &lt;artifactId&gt;log4j-jul&lt;/artifactId&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.logging.log4j&lt;/groupId&gt;
              &lt;artifactId&gt;log4j-jcl&lt;/artifactId&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.dblock.log4jna&lt;/groupId&gt;
              &lt;artifactId&gt;log4jna-api&lt;/artifactId&gt;
          &lt;/dependency&gt;
          &lt;!-- Log4j End --&gt;
  
          &lt;!-- Spock Dependencies --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.spockframework&lt;/groupId&gt;
              &lt;artifactId&gt;spock-spring&lt;/artifactId&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;!-- enables mocking of classes (in addition to interfaces) --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;cglib&lt;/groupId&gt;
              &lt;artifactId&gt;cglib-nodep&lt;/artifactId&gt;
              &lt;version&gt;${cglib.nodep.version}&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;!-- enables mocking of classes without default constructor (together with
              CGLIB) --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.objenesis&lt;/groupId&gt;
              &lt;artifactId&gt;objenesis&lt;/artifactId&gt;
              &lt;version&gt;${org.objenesis.version}&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.codehaus.groovy.modules.http-builder&lt;/groupId&gt;
              &lt;artifactId&gt;http-builder&lt;/artifactId&gt;
              &lt;version&gt;${groovy.modules.http-builder.version}&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;!-- Spock End --&gt;
      &lt;/dependencies&gt;
  
      &lt;build&gt;
          &lt;finalName&gt;${project.artifactId}&lt;/finalName&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;artifactId&gt;maven-resources-plugin&lt;/artifactId&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;id&gt;copy-api-doc&lt;/id&gt;
                          &lt;phase&gt;generate-resources&lt;/phase&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;copy-resources&lt;/goal&gt;
                          &lt;/goals&gt;
                          &lt;configuration&gt;
                              &lt;outputDirectory&gt;${basedir}/src/main/webapp/apidoc&lt;/outputDirectory&gt;
                              &lt;resources&gt;
                                  &lt;resource&gt;
                                      &lt;directory&gt;${project.parent.basedir}/automation/myapp/templates
                                      &lt;/directory&gt;
                                      &lt;includes&gt;
                                          &lt;include&gt;myapp.yaml&lt;/include&gt;
                                      &lt;/includes&gt;
                                      &lt;filtering&gt;true&lt;/filtering&gt;
                                  &lt;/resource&gt;
                              &lt;/resources&gt;
                              &lt;delimiters&gt;
                                  &lt;delimiter&gt;@@&lt;/delimiter&gt;
                              &lt;/delimiters&gt;
                          &lt;/configuration&gt;
                      &lt;/execution&gt;
                      &lt;execution&gt;
                          &lt;id&gt;copy-api-doc-test&lt;/id&gt;
                          &lt;phase&gt;generate-test-resources&lt;/phase&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;copy-resources&lt;/goal&gt;
                          &lt;/goals&gt;
                          &lt;configuration&gt;
                              &lt;outputDirectory&gt;${basedir}/src/test/resources&lt;/outputDirectory&gt;
                              &lt;resources&gt;
                                  &lt;resource&gt;
                                      &lt;directory&gt;${project.parent.basedir}/automation/myapp/templates
                                      &lt;/directory&gt;
                                      &lt;includes&gt;
                                          &lt;include&gt;myapp.yaml&lt;/include&gt;
                                      &lt;/includes&gt;
                                      &lt;filtering&gt;true&lt;/filtering&gt;
                                  &lt;/resource&gt;
                              &lt;/resources&gt;
                              &lt;delimiters&gt;
                                  &lt;delimiter&gt;@@&lt;/delimiter&gt;
                              &lt;/delimiters&gt;
                          &lt;/configuration&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-war-plugin&lt;/artifactId&gt;
                  &lt;configuration&gt;
                      &lt;packagingExcludes&gt;
                          WEB-INF/classes/application.yml,
                          WEB-INF/classes/application-local.yml
                      &lt;/packagingExcludes&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
                  &lt;artifactId&gt;spring-boot-maven-plugin&lt;/artifactId&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-surefire-plugin&lt;/artifactId&gt;
                  &lt;configuration&gt;
                      &lt;includes&gt;
                          &lt;include&gt;**/*Spec.*&lt;/include&gt;
                          &lt;include&gt;**/*Test.*&lt;/include&gt;
                      &lt;/includes&gt;
                      &lt;excludes&gt;
                          &lt;exclude&gt;**/*EndPointTest*&lt;/exclude&gt;
                      &lt;/excludes&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-failsafe-plugin&lt;/artifactId&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;integration-test&lt;/goal&gt;
                              &lt;goal&gt;verify&lt;/goal&gt;
                          &lt;/goals&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
                  &lt;configuration&gt;
                      &lt;includes&gt;
                          &lt;include&gt;**/*EndPointTest.*&lt;/include&gt;
                      &lt;/includes&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.codehaus.gmavenplus&lt;/groupId&gt;
                  &lt;artifactId&gt;gmavenplus-plugin&lt;/artifactId&gt;
                  &lt;version&gt;1.5&lt;/version&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;compile&lt;/goal&gt;
                              &lt;goal&gt;testCompile&lt;/goal&gt;
                          &lt;/goals&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.jacoco&lt;/groupId&gt;
                  &lt;artifactId&gt;jacoco-maven-plugin&lt;/artifactId&gt;
                  &lt;version&gt;0.7.7.201606060606&lt;/version&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;id&gt;default-prepare-agent&lt;/id&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;prepare-agent&lt;/goal&gt;
                          &lt;/goals&gt;
                      &lt;/execution&gt;
                      &lt;execution&gt;
                          &lt;id&gt;default-report&lt;/id&gt;
                          &lt;phase&gt;prepare-package&lt;/phase&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;report&lt;/goal&gt;
                          &lt;/goals&gt;
                      &lt;/execution&gt;
                      &lt;execution&gt;
                          &lt;id&gt;default-check&lt;/id&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;check&lt;/goal&gt;
                          &lt;/goals&gt;
                          &lt;configuration&gt;
                              &lt;rules&gt;
                                  &lt;rule&gt;
                                      &lt;element&gt;BUNDLE&lt;/element&gt;
                                      &lt;limits&gt;
                                          &lt;limit&gt;
                                              &lt;counter&gt;COMPLEXITY&lt;/counter&gt;
                                              &lt;value&gt;COVEREDRATIO&lt;/value&gt;
                                              &lt;minimum&gt;0&lt;/minimum&gt;
                                          &lt;/limit&gt;
                                      &lt;/limits&gt;
                                  &lt;/rule&gt;
                              &lt;/rules&gt;
                          &lt;/configuration&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
          &lt;pluginManagement&gt;
              &lt;plugins&gt;
                  &lt;!--This plugin's configuration is used to store Eclipse m2e settings
                      only. It has no influence on the Maven build itself. --&gt;
                  &lt;plugin&gt;
                      &lt;groupId&gt;org.eclipse.m2e&lt;/groupId&gt;
                      &lt;artifactId&gt;lifecycle-mapping&lt;/artifactId&gt;
                      &lt;version&gt;1.0.0&lt;/version&gt;
                      &lt;configuration&gt;
                          &lt;lifecycleMappingMetadata&gt;
                              &lt;pluginExecutions&gt;
                                  &lt;pluginExecution&gt;
                                      &lt;pluginExecutionFilter&gt;
                                          &lt;groupId&gt;
                                              org.codehaus.gmavenplus
                                          &lt;/groupId&gt;
                                          &lt;artifactId&gt;
                                              gmavenplus-plugin
                                          &lt;/artifactId&gt;
                                          &lt;versionRange&gt;
                                              [1.5,)
                                          &lt;/versionRange&gt;
                                          &lt;goals&gt;
                                              &lt;goal&gt;compile&lt;/goal&gt;
                                              &lt;goal&gt;testCompile&lt;/goal&gt;
                                          &lt;/goals&gt;
                                      &lt;/pluginExecutionFilter&gt;
                                      &lt;action&gt;
                                          &lt;ignore/&gt;
                                      &lt;/action&gt;
                                  &lt;/pluginExecution&gt;
                              &lt;/pluginExecutions&gt;
                          &lt;/lifecycleMappingMetadata&gt;
                      &lt;/configuration&gt;
                  &lt;/plugin&gt;
              &lt;/plugins&gt;
          &lt;/pluginManagement&gt;
      &lt;/build&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>Did anyone have the same issue? I would be really happy if I could find out what went wrong.</p>