spring-cloud / spring-cloud-contract

Support for Consumer Driven Contracts in Spring
https://cloud.spring.io/spring-cloud-contract
Apache License 2.0
719 stars 438 forks source link

Exception when start stubs using stub-runner-boot-1.1.0.RELEASE.jar #409

Closed pastel001 closed 7 years ago

pastel001 commented 7 years ago

I create a contract example depository after reading this http://cloud-samples.spring.io/spring-cloud-contract-samples/tutorials/contracts_external.html stubs can success generated,but when i use stub runner to start the stub,an exception occur this is the exception

F:\interfaceTest\pact>java -jar stub-runner-boot-1.1.0.RELEASE.jar   --stubrunner.workOffline="true" --stubrunner.ids="com.example:dwl-contracts:+:10001"

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v1.5.3.RELEASE)

2017-09-01 22:48:45.537  INFO 4720 --- [           main] com.example.StubRunnerBoot               : Starting StubRunnerBoot v1.1.0.RELEASE on VULCAN with PID 4720 (F:\interfaceTest\pact\stub-runner-boot-1.1.0.RELEASE.jar started by Administrator in F:\interfaceTest\pact)
2017-09-01 22:48:45.540  INFO 4720 --- [           main] com.example.StubRunnerBoot               : No active profile set, falling back to default profiles: default
2017-09-01 22:48:45.811  INFO 4720 --- [           main] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@15327b79: startup date [Fri Sep 01 22:48:45 CST 2017]; root of context hierarchy
2017-09-01 22:48:46.544  INFO 4720 --- [           main] o.s.b.f.s.DefaultListableBeanFactory     : Overriding bean definition for bean 'messageCollector' with a different definition: replacing [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=true; factoryBeanName=org.springframework.cloud.contract.stubrunner.server.StreamConfiguration; factoryMethodName=messageCollector; initMethodName=null; destroyMethodName=(inferred); defined in org.springframework.cloud.contract.stubrunner.server.StreamConfiguration] with [Root bean: class [null];
2017-09-01 22:48:46.664  INFO 4720 --- [           main] o.s.i.config.IntegrationRegistrar        : No bean named 'integrationHeaderChannelRegistry' has been explicitly defined. Therefore, a default DefaultHeaderChannelRegistry will be created.
2017-09-01 22:48:46.986  INFO 4720 --- [           main] faultConfiguringBeanFactoryPostProcessor : No bean named 'errorChannel' has been explicitly defined. Therefore, a default PublishSubscribeChannel will be created.
2017-09-01 22:48:46.994  INFO 4720 --- [           main] faultConfiguringBeanFactoryPostProcessor : No bean named 'taskScheduler' has been explicitly defined. Therefore, a default ThreadPoolTaskScheduler will be created.
2017-09-01 22:48:47.006  INFO 4720 --- [           main] f.a.AutowiredAnnotationBeanPostProcessor : JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
2017-09-01 22:48:47.238  INFO 4720 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'integrationGlobalProperties' of type [org.springframework.beans.factory.config.PropertiesFactoryBean] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2017-09-01 22:48:47.247  INFO 4720 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'integrationGlobalProperties' of type [java.util.Properties] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2017-09-01 22:48:47.284  INFO 4720 --- [           main] f.a.AutowiredAnnotationBeanPostProcessor : JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
2017-09-01 22:48:47.929  INFO 4720 --- [           main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat initialized with port(s): 8083 (http)
2017-09-01 22:48:47.944  INFO 4720 --- [           main] o.apache.catalina.core.StandardService   : Starting service Tomcat
2017-09-01 22:48:47.945  INFO 4720 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet Engine: Apache Tomcat/8.5.14
2017-09-01 22:48:48.040  INFO 4720 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2017-09-01 22:48:48.040  INFO 4720 --- [ost-startStop-1] o.s.web.context.ContextLoader            : Root WebApplicationContext: initialization completed in 2231 ms
2017-09-01 22:48:48.325  INFO 4720 --- [ost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean  : Mapping servlet: 'dispatcherServlet' to [/]
2017-09-01 22:48:48.330  INFO 4720 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'metricsFilter' to: [/*]
2017-09-01 22:48:48.330  INFO 4720 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'characterEncodingFilter' to: [/*]
2017-09-01 22:48:48.331  INFO 4720 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
2017-09-01 22:48:48.331  INFO 4720 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'httpPutFormContentFilter' to: [/*]
2017-09-01 22:48:48.331  INFO 4720 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'requestContextFilter' to: [/*]
2017-09-01 22:48:48.332  INFO 4720 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'webRequestLoggingFilter' to: [/*]
2017-09-01 22:48:48.332  INFO 4720 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'applicationContextIdFilter' to: [/*]
2017-09-01 22:48:48.462  INFO 4720 --- [           main] o.s.c.c.stubrunner.AetherStubDownloader  : Remote repos not passed but the switch to work offline was set. Stubs will be used from your local Maven repository.
2017-09-01 22:48:48.612  INFO 4720 --- [           main] o.s.c.c.stubrunner.AetherStubDownloader  : Desired version is [+] - will try to resolve the latest version
2017-09-01 22:48:48.624  WARN 4720 --- [           main] ationConfigEmbeddedWebApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.cloud.contract.stubrunner.server.HttpStubsController': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'batchStubRunner' defined in org.springframework.cloud.contract.stubrunner.spring.StubRunnerConfigu
2017-09-01 22:48:48.627  INFO 4720 --- [           main] o.apache.catalina.core.StandardService   : Stopping service Tomcat
2017-09-01 22:48:48.640  INFO 4720 --- [           main] utoConfigurationReportLoggingInitializer :

Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled.
2017-09-01 22:48:48.649 ERROR 4720 --- [           main] o.s.boot.SpringApplication               : Application startup failed

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.cloud.contract.stubrunner.server.HttpStubsController': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'batchStubRunner' defined in org.springframework.cloud.contract.stubrunner.spring.StubRunnerConfiguration: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.cloud.contr
        at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:749) ~[spring-beans-4.3.8.RELEASE.jar!/:4.3.8.RELEASE]
        at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:189) ~[spring-beans-4.3.8.RELEASE.jar!/:4.3.8.RELEASE]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1193) ~[spring-beans-4.3.8.RELEASE.jar!/:4.3.8.RELEASE]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1095) ~[spring-beans-4.3.8.RELEASE.jar!/:4.3.8.RELEASE]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513) ~[spring-beans-4.3.8.RELEASE.jar!/:4.3.8.RELEASE]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483) ~[spring-beans-4.3.8.RELEASE.jar!/:4.3.8.RELEASE]
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) ~[spring-beans-4.3.8.RELEASE.jar!/:4.3.8.RELEASE]
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.3.8.RELEASE.jar!/:4.3.8.RELEASE]
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) ~[spring-beans-4.3.8.RELEASE.jar!/:4.3.8.RELEASE]
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) ~[spring-beans-4.3.8.RELEASE.jar!/:4.3.8.RELEASE]
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:761) ~[spring-beans-4.3.8.RELEASE.jar!/:4.3.8.RELEASE]
        at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:866) ~[spring-context-4.3.8.RELEASE.jar!/:4.3.8.RELEASE]
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:542) ~[spring-context-4.3.8.RELEASE.jar!/:4.3.8.RELEASE]
        at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122) ~[spring-boot-1.5.3.RELEASE.jar!/:1.5.3.RELEASE]
        at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:737) [spring-boot-1.5.3.RELEASE.jar!/:1.5.3.RELEASE]
        at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:370) [spring-boot-1.5.3.RELEASE.jar!/:1.5.3.RELEASE]
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:314) [spring-boot-1.5.3.RELEASE.jar!/:1.5.3.RELEASE]
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:1162) [spring-boot-1.5.3.RELEASE.jar!/:1.5.3.RELEASE]
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:1151) [spring-boot-1.5.3.RELEASE.jar!/:1.5.3.RELEASE]
        at com.example.StubRunnerBoot.main(StubRunnerBoot.java:12) [classes!/:1.1.0.RELEASE]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_101]
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_101]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_101]
        at java.lang.reflect.Method.invoke(Unknown Source) ~[na:1.8.0_101]
        at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48) [stub-runner-boot-1.1.0.RELEASE.jar:1.1.0.RELEASE]
        at org.springframework.boot.loader.Launcher.launch(Launcher.java:87) [stub-runner-boot-1.1.0.RELEASE.jar:1.1.0.RELEASE]
        at org.springframework.boot.loader.Launcher.launch(Launcher.java:50) [stub-runner-boot-1.1.0.RELEASE.jar:1.1.0.RELEASE]
        at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:51) [stub-runner-boot-1.1.0.RELEASE.jar:1.1.0.RELEASE]
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'batchStubRunner' defined in org.springframework.cloud.contract.stubrunner.spring.StubRunnerConfiguration: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.cloud.contract.stubrunner.BatchStubRunner]: Factory method 'batchStubRunner' threw exception; nested exception is java.lang.IllegalArgumentException: For groupId [com.example] artifactId [dwl-contracts] and classifier [stubs] the version was not resolved!
        at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:599) ~[spring-beans-4.3.8.RELEASE.jar!/:4.3.8.RELEASE]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1173) ~[spring-beans-4.3.8.RELEASE.jar!/:4.3.8.RELEASE]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1067) ~[spring-beans-4.3.8.RELEASE.jar!/:4.3.8.RELEASE]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513) ~[spring-beans-4.3.8.RELEASE.jar!/:4.3.8.RELEASE]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483) ~[spring-beans-4.3.8.RELEASE.jar!/:4.3.8.RELEASE]
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) ~[spring-beans-4.3.8.RELEASE.jar!/:4.3.8.RELEASE]
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.3.8.RELEASE.jar!/:4.3.8.RELEASE]
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) ~[spring-beans-4.3.8.RELEASE.jar!/:4.3.8.RELEASE]
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-4.3.8.RELEASE.jar!/:4.3.8.RELEASE]
        at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:208) ~[spring-beans-4.3.8.RELEASE.jar!/:4.3.8.RELEASE]
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1138) ~[spring-beans-4.3.8.RELEASE.jar!/:4.3.8.RELEASE]
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1066) ~[spring-beans-4.3.8.RELEASE.jar!/:4.3.8.RELEASE]
        at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:835) ~[spring-beans-4.3.8.RELEASE.jar!/:4.3.8.RELEASE]
        at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:741) ~[spring-beans-4.3.8.RELEASE.jar!/:4.3.8.RELEASE]
        ... 27 common frames omitted
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.cloud.contract.stubrunner.BatchStubRunner]: Factory method 'batchStubRunner' threw exception; nested exception is java.lang.IllegalArgumentException: For groupId [com.example] artifactId [dwl-contracts] and classifier [stubs] the version was not resolved!
        at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:189) ~[spring-beans-4.3.8.RELEASE.jar!/:4.3.8.RELEASE]
        at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588) ~[spring-beans-4.3.8.RELEASE.jar!/:4.3.8.RELEASE]
        ... 40 common frames omitted
Caused by: java.lang.IllegalArgumentException: For groupId [com.example] artifactId [dwl-contracts] and classifier [stubs] the version was not resolved!
        at org.springframework.cloud.contract.stubrunner.AetherStubDownloader.resolveHighestArtifactVersion(AetherStubDownloader.java:217) ~[spring-cloud-contract-stub-runner-1.1.0.RELEASE.jar!/:1.1.0.RELEASE]
        at org.springframework.cloud.contract.stubrunner.AetherStubDownloader.getVersion(AetherStubDownloader.java:176) ~[spring-cloud-contract-stub-runner-1.1.0.RELEASE.jar!/:1.1.0.RELEASE]
        at org.springframework.cloud.contract.stubrunner.AetherStubDownloader.downloadAndUnpackStubJar(AetherStubDownloader.java:183) ~[spring-cloud-contract-stub-runner-1.1.0.RELEASE.jar!/:1.1.0.RELEASE]
        at org.springframework.cloud.contract.stubrunner.StubRunnerFactory.createStubsFromServiceConfiguration(StubRunnerFactory.java:60) ~[spring-cloud-contract-stub-runner-1.1.0.RELEASE.jar!/:1.1.0.RELEASE]
        at org.springframework.cloud.contract.stubrunner.BatchStubRunnerFactory.buildBatchStubRunner(BatchStubRunnerFactory.java:55) ~[spring-cloud-contract-stub-runner-1.1.0.RELEASE.jar!/:1.1.0.RELEASE]
        at org.springframework.cloud.contract.stubrunner.spring.StubRunnerConfiguration.batchStubRunner(StubRunnerConfiguration.java:78) ~[spring-cloud-contract-stub-runner-1.1.0.RELEASE.jar!/:1.1.0.RELEASE]
        at org.springframework.cloud.contract.stubrunner.spring.StubRunnerConfiguration$$EnhancerBySpringCGLIB$$ecf9407e.CGLIB$batchStubRunner$0(<generated>) ~[spring-cloud-contract-stub-runner-1.1.0.RELEASE.jar!/:1.1.0.RELEASE]
        at org.springframework.cloud.contract.stubrunner.spring.StubRunnerConfiguration$$EnhancerBySpringCGLIB$$ecf9407e$$FastClassBySpringCGLIB$$d5b44ca9.invoke(<generated>) ~[spring-cloud-contract-stub-runner-1.1.0.RELEASE.jar!/:1.1.0.RELEASE]
        at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228) ~[spring-core-4.3.8.RELEASE.jar!/:4.3.8.RELEASE]
        at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:358) ~[spring-context-4.3.8.RELEASE.jar!/:4.3.8.RELEASE]
        at org.springframework.cloud.contract.stubrunner.spring.StubRunnerConfiguration$$EnhancerBySpringCGLIB$$ecf9407e.batchStubRunner(<generated>) ~[spring-cloud-contract-stub-runner-1.1.0.RELEASE.jar!/:1.1.0.RELEASE]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_101]
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_101]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_101]
        at java.lang.reflect.Method.invoke(Unknown Source) ~[na:1.8.0_101]
        at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162) ~[spring-beans-4.3.8.RELEASE.jar!/:4.3.8.RELEASE]
        ... 41 common frames omitted

the project is like this image the pom to generate stubs liket this

<?xml version="1.0" encoding="UTF-8"?>
<!-- tag::config[] -->
<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">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.example</groupId>
    <artifactId>dwl-contracts</artifactId>
    <version>0.0.1-SNAPSHOT</version>

    <name>example-dwl-contract stubs</name>
    <description>POM used to install locally stubs for consumer side</description>

    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>1.5.4.RELEASE</version>
        <relativePath />
    </parent>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <java.version>1.8</java.version>
        <!--<spring-cloud-contract.version>1.2.0.BUILD-SNAPSHOT</spring-cloud-contract.version>-->
        <spring-cloud-contract.version>1.1.3.RELEASE</spring-cloud-contract.version>
        <!--<spring-cloud-dependencies.version>Edgware.BUILD-SNAPSHOT</spring-cloud-dependencies.version>-->
        <spring-cloud-dependencies.version>Camden.RELEASE</spring-cloud-dependencies.version>
        <!-- We don't want to run tests -->
        <skipTests>true</skipTests>
        <!-- We don't want to add build folders to the generated jar -->
        <excludeBuildFolders>true</excludeBuildFolders>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-dependencies</artifactId>
                <version>${spring-cloud-dependencies.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.19.1</version>
                <configuration>
                    <skipTests>true</skipTests>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-contract-maven-plugin</artifactId>
                <version>${spring-cloud-contract.version}</version>
                <extensions>true</extensions>
                <configuration>
                    <!-- By default it would search under src/test/resources/ -->
                    <contractsDirectory>${project.basedir}</contractsDirectory>
                </configuration>
            </plugin>
        </plugins>
    </build>
    <!-- end::config[] -->
</project>

need to help,Thanks

marcingrzejszczak commented 7 years ago

You have pasted the reason for this exception yourself

Caused by: java.lang.IllegalArgumentException: For groupId [com.example] artifactId [dwl-contracts+] and classifier [stubs] the version was not resolved!

You have forgotten to pass a : between the artifact id and version it seems.

pastel001 commented 7 years ago

sorry, i have update the start command

java -jar stub-runner-boot-1.1.0.RELEASE.jar   --stubrunner.workOffline="true" --stubrunner.ids="com.example:dwl-contracts:+:10001"

the exception like this

nested exception is java.lang.IllegalArgumentException: For groupId [com.example] artifactId [dwl-contracts] and classifier [stubs] the version was not resolved!

but i just have one version, why it cant to resolve? thank you

marcingrzejszczak commented 7 years ago

I have no idea why. Are you sure you have this installed? You're using an ancient version of StubRunner Boot (<spring-cloud-dependencies.version>Camden.RELEASE</spring-cloud-dependencies.version>) please use the latest one and let's try again

pastel001 commented 7 years ago

I use the comment out version,it have the same question, and then i use a old verison

<!--<spring-cloud-contract.version>1.2.0.BUILD-SNAPSHOT</spring-cloud-contract.version>-->
<spring-cloud-contract.version>1.1.3.RELEASE</spring-cloud-contract.version>
<!--<spring-cloud-dependencies.version>Edgware.BUILD-SNAPSHOT</spring-cloud-dependencies.version>-->
<spring-cloud-dependencies.version>Camden.RELEASE</spring-cloud-dependencies.version>
marcingrzejszczak commented 7 years ago

Can you show the logs from running the new version?

pastel001 commented 7 years ago

generate stubs log

"D:\Program Files\Java\jdk1.8.0_101\bin\java" -Dmaven.multiModuleProjectDirectory=F:\interfaceTest\pact\Contract\src\main\resources\contracts\com\example\dwl\1.0.0\client "-Dmaven.home=D:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2017.1.4\plugins\maven\lib\maven3" "-Dclassworlds.conf=D:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2017.1.4\plugins\maven\lib\maven3\bin\m2.conf" "-javaagent:D:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2017.1.4\lib\idea_rt.jar=62147:D:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2017.1.4\bin" -Dfile.encoding=UTF-8 -classpath "D:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2017.1.4\plugins\maven\lib\maven3\boot\plexus-classworlds-2.5.2.jar" org.codehaus.classworlds.Launcher -Didea.version=2017.1.4 -s D:\apache-maven-3.3.9\conf\settings.xml -Dmaven.repo.local=D:\Repositories\Maven install
[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building example-dwl-contract stubs 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ dwl-contracts ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory F:\interfaceTest\pact\Contract\src\main\resources\contracts\com\example\dwl\1.0.0\client\src\main\resources
[INFO] skip non existing resourceDirectory F:\interfaceTest\pact\Contract\src\main\resources\contracts\com\example\dwl\1.0.0\client\src\main\resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ dwl-contracts ---
[INFO] No sources to compile
[INFO] 
[INFO] --- spring-cloud-contract-maven-plugin:1.2.0.BUILD-SNAPSHOT:generateTests (default-generateTests) @ dwl-contracts ---
[INFO] Skipping Spring Cloud Contract Verifier execution: skipTeststrue
[INFO] 
[INFO] --- spring-cloud-contract-maven-plugin:1.2.0.BUILD-SNAPSHOT:convert (default-convert) @ dwl-contracts ---
[INFO] Will use contracts provided in the folder [F:\interfaceTest\pact\Contract\src\main\resources\contracts\com\example\dwl\1.0.0\client]
[INFO] Directory with contract is present at [F:\interfaceTest\pact\Contract\src\main\resources\contracts\com\example\dwl\1.0.0\client]
[INFO] Copying Spring Cloud Contract Verifier contracts. Only files matching [.*] pattern will end up in the final JAR with stubs.
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] ignoreDelta true
[INFO] Copying 4 resources
[INFO] Copying file dwl-contracts.iml
[INFO] Copying file pom.xml
[INFO] Copying file rest\shouldGrantABeerIfOldEnoughFromFile.groovy
[INFO] Copying file rest\shouldReturnSuccessIFOrderValid.groovy
[INFO] Converting from Spring Cloud Contract Verifier contracts to WireMock stubs mappings
[INFO]      Spring Cloud Contract Verifier contracts directory: F:\interfaceTest\pact\Contract\src\main\resources\contracts\com\example\dwl\1.0.0\client
[INFO] WireMock stubs mappings directory: F:\interfaceTest\pact\Contract\src\main\resources\contracts\com\example\dwl\1.0.0\client\target\stubs\META-INF\com.example\dwl-contracts\0.0.1-SNAPSHOT\mappings
[INFO] Creating new stub [F:\interfaceTest\pact\Contract\src\main\resources\contracts\com\example\dwl\1.0.0\client\target\stubs\META-INF\com.example\dwl-contracts\0.0.1-SNAPSHOT\mappings\rest\shouldGrantABeerIfOldEnoughFromFile.json]
[INFO] Creating new stub [F:\interfaceTest\pact\Contract\src\main\resources\contracts\com\example\dwl\1.0.0\client\target\stubs\META-INF\com.example\dwl-contracts\0.0.1-SNAPSHOT\mappings\rest\shouldReturnSuccessIFOrderValid.json]
[INFO] Creating new stub [F:\interfaceTest\pact\Contract\src\main\resources\contracts\com\example\dwl\1.0.0\client\target\stubs\META-INF\com.example\dwl-contracts\0.0.1-SNAPSHOT\mappings\target\stubs\META-INF\com.example\dwl-contracts\0.0.1-SNAPSHOT\contracts\rest\shouldGrantABeerIfOldEnoughFromFile.json]
[INFO] Creating new stub [F:\interfaceTest\pact\Contract\src\main\resources\contracts\com\example\dwl\1.0.0\client\target\stubs\META-INF\com.example\dwl-contracts\0.0.1-SNAPSHOT\mappings\target\stubs\META-INF\com.example\dwl-contracts\0.0.1-SNAPSHOT\contracts\rest\shouldReturnSuccessIFOrderValid.json]
[INFO] 
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ dwl-contracts ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory F:\interfaceTest\pact\Contract\src\main\resources\contracts\com\example\dwl\1.0.0\client\src\test\resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ dwl-contracts ---
[INFO] No sources to compile
[INFO] 
[INFO] --- maven-surefire-plugin:2.19.1:test (default-test) @ dwl-contracts ---
[INFO] Tests are skipped.
[INFO] 
[INFO] --- spring-cloud-contract-maven-plugin:1.2.0.BUILD-SNAPSHOT:generateStubs (default-generateStubs) @ dwl-contracts ---
[INFO] Files matching this pattern will be excluded from stubs generation [**/*.groovy]
[INFO] Building jar: F:\interfaceTest\pact\Contract\src\main\resources\contracts\com\example\dwl\1.0.0\client\target\dwl-contracts-0.0.1-SNAPSHOT-stubs.jar
[INFO] 
[INFO] --- maven-jar-plugin:2.6:jar (default-jar) @ dwl-contracts ---
[WARNING] JAR will be empty - no content was marked for inclusion!
[INFO] Building jar: F:\interfaceTest\pact\Contract\src\main\resources\contracts\com\example\dwl\1.0.0\client\target\dwl-contracts-0.0.1-SNAPSHOT.jar
[INFO] 
[INFO] --- maven-install-plugin:2.5.2:install (default-install) @ dwl-contracts ---
[INFO] Installing F:\interfaceTest\pact\Contract\src\main\resources\contracts\com\example\dwl\1.0.0\client\target\dwl-contracts-0.0.1-SNAPSHOT.jar to D:\Repositories\Maven\com\example\dwl-contracts\0.0.1-SNAPSHOT\dwl-contracts-0.0.1-SNAPSHOT.jar
[INFO] Installing F:\interfaceTest\pact\Contract\src\main\resources\contracts\com\example\dwl\1.0.0\client\pom.xml to D:\Repositories\Maven\com\example\dwl-contracts\0.0.1-SNAPSHOT\dwl-contracts-0.0.1-SNAPSHOT.pom
[INFO] Installing F:\interfaceTest\pact\Contract\src\main\resources\contracts\com\example\dwl\1.0.0\client\target\dwl-contracts-0.0.1-SNAPSHOT-stubs.jar to D:\Repositories\Maven\com\example\dwl-contracts\0.0.1-SNAPSHOT\dwl-contracts-0.0.1-SNAPSHOT-stubs.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.944 s
[INFO] Finished at: 2017-09-01T23:20:35+08:00
[INFO] Final Memory: 34M/495M
[INFO] ------------------------------------------------------------------------

Process finished with exit code 0

run stubs log

F:\interfaceTest\pact>java -jar stub-runner-boot-1.1.0.RELEASE.jar   --stubrunner.workOffline="true" --stubrunner.ids="com.example:dwl-contracts:+:10001"

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v1.5.3.RELEASE)

2017-09-01 23:21:33.122  INFO 2080 --- [           main] com.example.StubRunnerBoot               : Starting StubRunnerBoot v1.1.0.RELEASE on VULCAN with PID 2080 (F:\interfaceTest\pact\stub-runner-boot-1.1.0.RELEASE.jar started by Administrator in F:\interfaceTest\pact)
2017-09-01 23:21:33.125  INFO 2080 --- [           main] com.example.StubRunnerBoot               : No active profile set, falling back to default profiles: default
2017-09-01 23:21:33.437  INFO 2080 --- [           main] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@15327b79: startup date [Fri Sep 01 23:21:33 CST 2017]; root of context hierarchy
2017-09-01 23:21:34.116  INFO 2080 --- [           main] o.s.b.f.s.DefaultListableBeanFactory     : Overriding bean definition for bean 'messageCollector' with a different definition: replacing [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=true; factoryBeanName=org.springframework.cloud.contract.stubrunner.server.StreamConfiguration; factoryMethodName=messageCollector; initMethodName=null; destroyMethodName=(inferred); defined in org.springframework.cloud.contract.stubrunner.server.StreamConfiguration] with [Root bean: class [null]; sco
2017-09-01 23:21:34.252  INFO 2080 --- [           main] o.s.i.config.IntegrationRegistrar        : No bean named 'integrationHeaderChannelRegistry' has been explicitly defined. Therefore, a default DefaultHeaderChannelRegistry will be created.
2017-09-01 23:21:34.578  INFO 2080 --- [           main] faultConfiguringBeanFactoryPostProcessor : No bean named 'errorChannel' has been explicitly defined. Therefore, a default PublishSubscribeChannel will be created.
2017-09-01 23:21:34.586  INFO 2080 --- [           main] faultConfiguringBeanFactoryPostProcessor : No bean named 'taskScheduler' has been explicitly defined. Therefore, a default ThreadPoolTaskScheduler will be created.
2017-09-01 23:21:34.598  INFO 2080 --- [           main] f.a.AutowiredAnnotationBeanPostProcessor : JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
2017-09-01 23:21:34.831  INFO 2080 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'integrationGlobalProperties' of type [org.springframework.beans.factory.config.PropertiesFactoryBean] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2017-09-01 23:21:34.839  INFO 2080 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'integrationGlobalProperties' of type [java.util.Properties] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2017-09-01 23:21:34.877  INFO 2080 --- [           main] f.a.AutowiredAnnotationBeanPostProcessor : JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
2017-09-01 23:21:35.512  INFO 2080 --- [           main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat initialized with port(s): 8083 (http)
2017-09-01 23:21:35.530  INFO 2080 --- [           main] o.apache.catalina.core.StandardService   : Starting service Tomcat
2017-09-01 23:21:35.531  INFO 2080 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet Engine: Apache Tomcat/8.5.14
2017-09-01 23:21:35.644  INFO 2080 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2017-09-01 23:21:35.645  INFO 2080 --- [ost-startStop-1] o.s.web.context.ContextLoader            : Root WebApplicationContext: initialization completed in 2211 ms
2017-09-01 23:21:35.951  INFO 2080 --- [ost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean  : Mapping servlet: 'dispatcherServlet' to [/]
2017-09-01 23:21:35.956  INFO 2080 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'metricsFilter' to: [/*]
2017-09-01 23:21:35.957  INFO 2080 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'characterEncodingFilter' to: [/*]
2017-09-01 23:21:35.958  INFO 2080 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
2017-09-01 23:21:35.958  INFO 2080 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'httpPutFormContentFilter' to: [/*]
2017-09-01 23:21:35.958  INFO 2080 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'requestContextFilter' to: [/*]
2017-09-01 23:21:35.959  INFO 2080 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'webRequestLoggingFilter' to: [/*]
2017-09-01 23:21:35.959  INFO 2080 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'applicationContextIdFilter' to: [/*]
2017-09-01 23:21:36.097  INFO 2080 --- [           main] o.s.c.c.stubrunner.AetherStubDownloader  : Remote repos not passed but the switch to work offline was set. Stubs will be used from your local Maven repository.
2017-09-01 23:21:36.262  INFO 2080 --- [           main] o.s.c.c.stubrunner.AetherStubDownloader  : Desired version is [+] - will try to resolve the latest version
2017-09-01 23:21:36.277  WARN 2080 --- [           main] ationConfigEmbeddedWebApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.cloud.contract.stubrunner.server.HttpStubsController': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'batchStubRunner' defined in org.springframework.cloud.contract.stubrunner.spring.StubRunnerConfigurat
2017-09-01 23:21:36.280  INFO 2080 --- [           main] o.apache.catalina.core.StandardService   : Stopping service Tomcat
2017-09-01 23:21:36.298  INFO 2080 --- [           main] utoConfigurationReportLoggingInitializer :

Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled.
2017-09-01 23:21:36.308 ERROR 2080 --- [           main] o.s.boot.SpringApplication               : Application startup failed

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.cloud.contract.stubrunner.server.HttpStubsController': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'batchStubRunner' defined in org.springframework.cloud.contract.stubrunner.spring.StubRunnerConfiguration: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.cloud.contract
        at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:749) ~[spring-beans-4.3.8.RELEASE.jar!/:4.3.8.RELEASE]
        at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:189) ~[spring-beans-4.3.8.RELEASE.jar!/:4.3.8.RELEASE]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1193) ~[spring-beans-4.3.8.RELEASE.jar!/:4.3.8.RELEASE]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1095) ~[spring-beans-4.3.8.RELEASE.jar!/:4.3.8.RELEASE]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513) ~[spring-beans-4.3.8.RELEASE.jar!/:4.3.8.RELEASE]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483) ~[spring-beans-4.3.8.RELEASE.jar!/:4.3.8.RELEASE]
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) ~[spring-beans-4.3.8.RELEASE.jar!/:4.3.8.RELEASE]
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.3.8.RELEASE.jar!/:4.3.8.RELEASE]
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) ~[spring-beans-4.3.8.RELEASE.jar!/:4.3.8.RELEASE]
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) ~[spring-beans-4.3.8.RELEASE.jar!/:4.3.8.RELEASE]
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:761) ~[spring-beans-4.3.8.RELEASE.jar!/:4.3.8.RELEASE]
        at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:866) ~[spring-context-4.3.8.RELEASE.jar!/:4.3.8.RELEASE]
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:542) ~[spring-context-4.3.8.RELEASE.jar!/:4.3.8.RELEASE]
        at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122) ~[spring-boot-1.5.3.RELEASE.jar!/:1.5.3.RELEASE]
        at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:737) [spring-boot-1.5.3.RELEASE.jar!/:1.5.3.RELEASE]
        at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:370) [spring-boot-1.5.3.RELEASE.jar!/:1.5.3.RELEASE]
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:314) [spring-boot-1.5.3.RELEASE.jar!/:1.5.3.RELEASE]
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:1162) [spring-boot-1.5.3.RELEASE.jar!/:1.5.3.RELEASE]
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:1151) [spring-boot-1.5.3.RELEASE.jar!/:1.5.3.RELEASE]
        at com.example.StubRunnerBoot.main(StubRunnerBoot.java:12) [classes!/:1.1.0.RELEASE]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_101]
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_101]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_101]
        at java.lang.reflect.Method.invoke(Unknown Source) ~[na:1.8.0_101]
        at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48) [stub-runner-boot-1.1.0.RELEASE.jar:1.1.0.RELEASE]
        at org.springframework.boot.loader.Launcher.launch(Launcher.java:87) [stub-runner-boot-1.1.0.RELEASE.jar:1.1.0.RELEASE]
        at org.springframework.boot.loader.Launcher.launch(Launcher.java:50) [stub-runner-boot-1.1.0.RELEASE.jar:1.1.0.RELEASE]
        at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:51) [stub-runner-boot-1.1.0.RELEASE.jar:1.1.0.RELEASE]
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'batchStubRunner' defined in org.springframework.cloud.contract.stubrunner.spring.StubRunnerConfiguration: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.cloud.contract.stubrunner.BatchStubRunner]: Factory method 'batchStubRunner' threw exception; nested exception is java.lang.IllegalArgumentException: For groupId [com.example] artifactId [dwl-contracts] and classifier [stubs] the version was not resolved!
        at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:599) ~[spring-beans-4.3.8.RELEASE.jar!/:4.3.8.RELEASE]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1173) ~[spring-beans-4.3.8.RELEASE.jar!/:4.3.8.RELEASE]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1067) ~[spring-beans-4.3.8.RELEASE.jar!/:4.3.8.RELEASE]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513) ~[spring-beans-4.3.8.RELEASE.jar!/:4.3.8.RELEASE]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483) ~[spring-beans-4.3.8.RELEASE.jar!/:4.3.8.RELEASE]
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) ~[spring-beans-4.3.8.RELEASE.jar!/:4.3.8.RELEASE]
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.3.8.RELEASE.jar!/:4.3.8.RELEASE]
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) ~[spring-beans-4.3.8.RELEASE.jar!/:4.3.8.RELEASE]
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-4.3.8.RELEASE.jar!/:4.3.8.RELEASE]
        at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:208) ~[spring-beans-4.3.8.RELEASE.jar!/:4.3.8.RELEASE]
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1138) ~[spring-beans-4.3.8.RELEASE.jar!/:4.3.8.RELEASE]
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1066) ~[spring-beans-4.3.8.RELEASE.jar!/:4.3.8.RELEASE]
        at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:835) ~[spring-beans-4.3.8.RELEASE.jar!/:4.3.8.RELEASE]
        at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:741) ~[spring-beans-4.3.8.RELEASE.jar!/:4.3.8.RELEASE]
        ... 27 common frames omitted
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.cloud.contract.stubrunner.BatchStubRunner]: Factory method 'batchStubRunner' threw exception; nested exception is java.lang.IllegalArgumentException: For groupId [com.example] artifactId [dwl-contracts] and classifier [stubs] the version was not resolved!
        at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:189) ~[spring-beans-4.3.8.RELEASE.jar!/:4.3.8.RELEASE]
        at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588) ~[spring-beans-4.3.8.RELEASE.jar!/:4.3.8.RELEASE]
        ... 40 common frames omitted
Caused by: java.lang.IllegalArgumentException: For groupId [com.example] artifactId [dwl-contracts] and classifier [stubs] the version was not resolved!
        at org.springframework.cloud.contract.stubrunner.AetherStubDownloader.resolveHighestArtifactVersion(AetherStubDownloader.java:217) ~[spring-cloud-contract-stub-runner-1.1.0.RELEASE.jar!/:1.1.0.RELEASE]
        at org.springframework.cloud.contract.stubrunner.AetherStubDownloader.getVersion(AetherStubDownloader.java:176) ~[spring-cloud-contract-stub-runner-1.1.0.RELEASE.jar!/:1.1.0.RELEASE]
        at org.springframework.cloud.contract.stubrunner.AetherStubDownloader.downloadAndUnpackStubJar(AetherStubDownloader.java:183) ~[spring-cloud-contract-stub-runner-1.1.0.RELEASE.jar!/:1.1.0.RELEASE]
        at org.springframework.cloud.contract.stubrunner.StubRunnerFactory.createStubsFromServiceConfiguration(StubRunnerFactory.java:60) ~[spring-cloud-contract-stub-runner-1.1.0.RELEASE.jar!/:1.1.0.RELEASE]
        at org.springframework.cloud.contract.stubrunner.BatchStubRunnerFactory.buildBatchStubRunner(BatchStubRunnerFactory.java:55) ~[spring-cloud-contract-stub-runner-1.1.0.RELEASE.jar!/:1.1.0.RELEASE]
        at org.springframework.cloud.contract.stubrunner.spring.StubRunnerConfiguration.batchStubRunner(StubRunnerConfiguration.java:78) ~[spring-cloud-contract-stub-runner-1.1.0.RELEASE.jar!/:1.1.0.RELEASE]
        at org.springframework.cloud.contract.stubrunner.spring.StubRunnerConfiguration$$EnhancerBySpringCGLIB$$ecf9407e.CGLIB$batchStubRunner$0(<generated>) ~[spring-cloud-contract-stub-runner-1.1.0.RELEASE.jar!/:1.1.0.RELEASE]
        at org.springframework.cloud.contract.stubrunner.spring.StubRunnerConfiguration$$EnhancerBySpringCGLIB$$ecf9407e$$FastClassBySpringCGLIB$$d5b44ca9.invoke(<generated>) ~[spring-cloud-contract-stub-runner-1.1.0.RELEASE.jar!/:1.1.0.RELEASE]
        at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228) ~[spring-core-4.3.8.RELEASE.jar!/:4.3.8.RELEASE]
        at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:358) ~[spring-context-4.3.8.RELEASE.jar!/:4.3.8.RELEASE]
        at org.springframework.cloud.contract.stubrunner.spring.StubRunnerConfiguration$$EnhancerBySpringCGLIB$$ecf9407e.batchStubRunner(<generated>) ~[spring-cloud-contract-stub-runner-1.1.0.RELEASE.jar!/:1.1.0.RELEASE]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_101]
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_101]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_101]
        at java.lang.reflect.Method.invoke(Unknown Source) ~[na:1.8.0_101]
        at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162) ~[spring-beans-4.3.8.RELEASE.jar!/:4.3.8.RELEASE]
        ... 41 common frames omitted

F:\interfaceTest\pact>
marcingrzejszczak commented 7 years ago

Can you please use Stub Runner Boot in version 1.1.3.RELEASE? It has more information in the logs.

pastel001 commented 7 years ago

Can I send the project to you by mail? and to run it in your local many thanks

marcingrzejszczak commented 7 years ago

Please upload it somewhere on GitHub. Also I've done exactly the same procedure with the samples from https://github.com/spring-cloud-samples/spring-cloud-contract-samples/ and everything is working as expected (when Stub Runner is running the stubs it's failing cause it requires some additional JARs on the classpath but the stubs are reused at runtime). So please check if your configuration looks the same as the one in the samples.

pastel001 commented 7 years ago

i just know this urlhttps://dl.bintray.com/marcingrzejszczak/maven/ where to download 1.1.3.RELEASE?

marcingrzejszczak commented 7 years ago
$ git clone https://github.com/spring-cloud-samples/stub-runner-boot.git
$ ./mvnw clean install
$ java -jar target/stub-runner-boot-1.1.3.RELEASE.jar --stubrunner.workOffline=true --stubrunner.ids=com.example:dwl-contracts:+:10001
pastel001 commented 7 years ago

F:\interfaceTest\pact\stub-runner-boot>mvn clean install
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building stub-runner-boot 1.1.3.RELEASE
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.6.1:clean (default-clean) @ stub-runner-boot ---
[INFO] Deleting F:\interfaceTest\pact\stub-runner-boot\target
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ stub-runner-boot ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ stub-runner-boot ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to F:\interfaceTest\pact\stub-runner-boot\target\classes
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.810 s
[INFO] Finished at: 2017-09-01T23:38:18+08:00
[INFO] Final Memory: 22M/308M
[INFO] ------------------------------------------------------------------------
[WARNING] The requested profile "spring" could not be activated because it does not exist.
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project stub-runner-boot: Fatal error compiling: 无效的目标发行版: 1.8 -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

F:\interfaceTest\pact\stub-runner-boot>

build fail i almost copy the beer_contract porject,just modiy the pom artifactId i upload contract project herehttps://github.com/Pastel001/contract need your help,thanks

marcingrzejszczak commented 7 years ago

You have some local setup completely screwed up. You can't even compile a simple project. I don't understand Chinese so I can't help you with that.

This is what I did and it works fine:

Stub installation:

$ git clone https://github.com/Pastel001/contract.git
$ cd contract
$ cd src/main/resources/contracts/com/example/dwl/1.0.0/client
$ mvn clean install

Running Stub Runner Boot

$ git clone https://github.com/spring-cloud-samples/stub-runner-boot.git
$ ./mvnw clean install
$ java -jar target/stub-runner-boot-1.1.3.RELEASE.jar --stubrunner.workOffline=true --stubrunner.ids=com.example:dwl-contracts:+:8765

Logs from running the app

➜  target git:(master) java -jar stub-runner-boot-1.1.3.RELEASE.jar --stubrunner.workOffline=true --stubrunner.ids=com.example:dwl-contracts:+:stubs:8765

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v1.5.6.RELEASE)

2017-09-01 17:55:02.007  INFO 41499 --- [           main] com.example.StubRunnerBoot               : Starting StubRunnerBoot v1.1.3.RELEASE on 3432.local with PID 41499 (/Users/mgrzejszczak/repo/stub-runner-boot/target/stub-runner-boot-1.1.3.RELEASE.jar started by mgrzejszczak in /Users/mgrzejszczak/repo/stub-runner-boot/target)
2017-09-01 17:55:02.009  INFO 41499 --- [           main] com.example.StubRunnerBoot               : No active profile set, falling back to default profiles: default
2017-09-01 17:55:02.258  INFO 41499 --- [           main] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@4ee285c6: startup date [Fri Sep 01 17:55:02 CEST 2017]; root of context hierarchy
2017-09-01 17:55:02.753  INFO 41499 --- [           main] o.s.b.f.s.DefaultListableBeanFactory     : Overriding bean definition for bean 'messageCollector' with a different definition: replacing [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=true; factoryBeanName=org.springframework.cloud.contract.stubrunner.server.StreamConfiguration; factoryMethodName=messageCollector; initMethodName=null; destroyMethodName=(inferred); defined in org.springframework.cloud.contract.stubrunner.server.StreamConfiguration] with [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=org.springframework.cloud.stream.test.binder.TestSupportBinderAutoConfiguration; factoryMethodName=messageCollector; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [org/springframework/cloud/stream/test/binder/TestSupportBinderAutoConfiguration.class]]
2017-09-01 17:55:02.861  INFO 41499 --- [           main] o.s.i.config.IntegrationRegistrar        : No bean named 'integrationHeaderChannelRegistry' has been explicitly defined. Therefore, a default DefaultHeaderChannelRegistry will be created.
2017-09-01 17:55:03.155  INFO 41499 --- [           main] faultConfiguringBeanFactoryPostProcessor : No bean named 'errorChannel' has been explicitly defined. Therefore, a default PublishSubscribeChannel will be created.
2017-09-01 17:55:03.162  INFO 41499 --- [           main] faultConfiguringBeanFactoryPostProcessor : No bean named 'taskScheduler' has been explicitly defined. Therefore, a default ThreadPoolTaskScheduler will be created.
2017-09-01 17:55:03.172  INFO 41499 --- [           main] f.a.AutowiredAnnotationBeanPostProcessor : JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
2017-09-01 17:55:03.397  INFO 41499 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'integrationGlobalProperties' of type [org.springframework.beans.factory.config.PropertiesFactoryBean] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2017-09-01 17:55:03.403  INFO 41499 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'integrationGlobalProperties' of type [java.util.Properties] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2017-09-01 17:55:03.437  INFO 41499 --- [           main] f.a.AutowiredAnnotationBeanPostProcessor : JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
2017-09-01 17:55:03.724  INFO 41499 --- [           main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat initialized with port(s): 8083 (http)
2017-09-01 17:55:03.736  INFO 41499 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2017-09-01 17:55:03.737  INFO 41499 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet Engine: Apache Tomcat/8.5.16
2017-09-01 17:55:03.809  INFO 41499 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2017-09-01 17:55:03.810  INFO 41499 --- [ost-startStop-1] o.s.web.context.ContextLoader            : Root WebApplicationContext: initialization completed in 1553 ms
2017-09-01 17:55:04.000  INFO 41499 --- [ost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean  : Mapping servlet: 'dispatcherServlet' to [/]
2017-09-01 17:55:04.004  INFO 41499 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'metricsFilter' to: [/*]
2017-09-01 17:55:04.004  INFO 41499 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'characterEncodingFilter' to: [/*]
2017-09-01 17:55:04.004  INFO 41499 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
2017-09-01 17:55:04.004  INFO 41499 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'httpPutFormContentFilter' to: [/*]
2017-09-01 17:55:04.004  INFO 41499 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'requestContextFilter' to: [/*]
2017-09-01 17:55:04.004  INFO 41499 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'webRequestLoggingFilter' to: [/*]
2017-09-01 17:55:04.004  INFO 41499 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'applicationContextIdFilter' to: [/*]
2017-09-01 17:55:04.094  INFO 41499 --- [           main] o.s.c.c.s.StubDownloaderBuilderProvider  : Will download stubs using Aether
2017-09-01 17:55:04.097  INFO 41499 --- [           main] o.s.c.c.stubrunner.AetherStubDownloader  : Remote repos not passed but the switch to work offline was set. Stubs will be used from your local Maven repository.
2017-09-01 17:55:04.244  INFO 41499 --- [           main] o.s.c.c.stubrunner.AetherStubDownloader  : Desired version is [+] - will try to resolve the latest version
2017-09-01 17:55:04.258  INFO 41499 --- [           main] o.s.c.c.stubrunner.AetherStubDownloader  : Resolved version is [0.0.1-SNAPSHOT]
2017-09-01 17:55:04.259  INFO 41499 --- [           main] o.s.c.c.stubrunner.AetherStubDownloader  : Resolving artifact [com.example:dwl-contracts:jar:stubs:0.0.1-SNAPSHOT] using remote repositories []
2017-09-01 17:55:04.268  INFO 41499 --- [           main] o.s.c.c.stubrunner.AetherStubDownloader  : Resolved artifact [com.example:dwl-contracts:jar:stubs:0.0.1-SNAPSHOT] to /Users/mgrzejszczak/.m2/repository/com/example/dwl-contracts/0.0.1-SNAPSHOT/dwl-contracts-0.0.1-SNAPSHOT-stubs.jar
2017-09-01 17:55:04.275  INFO 41499 --- [           main] o.s.c.c.stubrunner.AetherStubDownloader  : Unpacking stub from JAR [URI: file:/Users/mgrzejszczak/.m2/repository/com/example/dwl-contracts/0.0.1-SNAPSHOT/dwl-contracts-0.0.1-SNAPSHOT-stubs.jar]
2017-09-01 17:55:04.278  INFO 41499 --- [           main] o.s.c.c.stubrunner.AetherStubDownloader  : Unpacked file to [/var/folders/dr/4q2932wd67g1rkkclh52h_pc0000gq/T/contracts7638820996018266596]
2017-09-01 17:55:05.285  INFO 41499 --- [           main] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@5a45133e: startup date [Fri Sep 01 17:55:05 CEST 2017]; root of context hierarchy
2017-09-01 17:55:05.324  INFO 41499 --- [           main] f.a.AutowiredAnnotationBeanPostProcessor : JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
2017-09-01 17:55:05.359  INFO 41499 --- [           main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat initialized with port(s): 8765 (http)
2017-09-01 17:55:05.360  INFO 41499 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2017-09-01 17:55:05.360  INFO 41499 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet Engine: Apache Tomcat/8.5.16
2017-09-01 17:55:05.366  INFO 41499 --- [ost-startStop-1] o.a.c.c.C.[Tomcat-1].[localhost].[/]     : Initializing Spring embedded WebApplicationContext
2017-09-01 17:55:05.366  INFO 41499 --- [ost-startStop-1] o.s.web.context.ContextLoader            : Root WebApplicationContext: initialization completed in 81 ms
2017-09-01 17:55:05.386  INFO 41499 --- [ost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean  : Mapping servlet: 'stub' to [/]
2017-09-01 17:55:05.386  INFO 41499 --- [ost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean  : Mapping servlet: 'admin' to [/__admin/*]
2017-09-01 17:55:05.559  INFO 41499 --- [           main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat started on port(s): 8765 (http)
2017-09-01 17:55:05.563  INFO 41499 --- [           main] o.s.c.contract.stubrunner.StubServer     : Started stub server for project [com.example:dwl-contracts:0.0.1-SNAPSHOT:stubs] on port 8765
2017-09-01 17:55:05.746  INFO 41499 --- [nio-8765-exec-1] o.a.c.c.C.[Tomcat-1].[localhost].[/]     : RequestHandlerClass from context returned com.github.tomakehurst.wiremock.http.AdminRequestHandler. Normalized mapped under returned 'null'
2017-09-01 17:55:05.939  INFO 41499 --- [           main] o.s.c.c.stubrunner.StubRunnerExecutor    : All stubs are now running RunningStubs [namesAndPorts={com.example:dwl-contracts:0.0.1-SNAPSHOT:stubs=8765}]
2017-09-01 17:55:06.181  INFO 41499 --- [           main] s.w.s.m.m.a.RequestMappingHandlerAdapter : Looking for @ControllerAdvice: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@4ee285c6: startup date [Fri Sep 01 17:55:02 CEST 2017]; root of context hierarchy
2017-09-01 17:55:06.248  INFO 41499 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/stubs/{ivy:.*}],produces=[application/json]}" onto public org.springframework.http.ResponseEntity<java.lang.Integer> org.springframework.cloud.contract.stubrunner.server.HttpStubsController.consumer(java.lang.String)
2017-09-01 17:55:06.249  INFO 41499 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/stubs],produces=[application/json]}" onto public java.util.Map<java.lang.String, java.lang.Integer> org.springframework.cloud.contract.stubrunner.server.HttpStubsController.stubs()
2017-09-01 17:55:06.252  INFO 41499 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/triggers/{label:.*}],methods=[POST],produces=[application/json]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.util.Collection<java.lang.String>>> org.springframework.cloud.contract.stubrunner.server.TriggerController.trigger(java.lang.String)
2017-09-01 17:55:06.252  INFO 41499 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/triggers],methods=[GET],produces=[application/json]}" onto public java.util.Map<java.lang.String, java.util.Collection<java.lang.String>> org.springframework.cloud.contract.stubrunner.server.TriggerController.labels()
2017-09-01 17:55:06.252  INFO 41499 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/triggers/{ivyNotation:.*}/{label:.*}],methods=[POST],produces=[application/json]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.util.Collection<java.lang.String>>> org.springframework.cloud.contract.stubrunner.server.TriggerController.triggerByArtifact(java.lang.String,java.lang.String)
2017-09-01 17:55:06.254  INFO 41499 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.springframework.boot.autoconfigure.web.BasicErrorController.error(javax.servlet.http.HttpServletRequest)
2017-09-01 17:55:06.254  INFO 41499 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
2017-09-01 17:55:06.287  INFO 41499 --- [           main] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path [/webjars/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2017-09-01 17:55:06.288  INFO 41499 --- [           main] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2017-09-01 17:55:06.321  INFO 41499 --- [           main] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2017-09-01 17:55:06.495  INFO 41499 --- [           main] o.s.s.c.ThreadPoolTaskScheduler          : Initializing ExecutorService  'taskScheduler'
2017-09-01 17:55:06.667  INFO 41499 --- [           main] o.s.b.a.e.mvc.EndpointHandlerMapping     : Mapped "{[/mappings || /mappings.json],methods=[GET],produces=[application/vnd.spring-boot.actuator.v1+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2017-09-01 17:55:06.668  INFO 41499 --- [           main] o.s.b.a.e.mvc.EndpointHandlerMapping     : Mapped "{[/configprops || /configprops.json],methods=[GET],produces=[application/vnd.spring-boot.actuator.v1+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2017-09-01 17:55:06.669  INFO 41499 --- [           main] o.s.b.a.e.mvc.EndpointHandlerMapping     : Mapped "{[/loggers/{name:.*}],methods=[GET],produces=[application/vnd.spring-boot.actuator.v1+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.LoggersMvcEndpoint.get(java.lang.String)
2017-09-01 17:55:06.669  INFO 41499 --- [           main] o.s.b.a.e.mvc.EndpointHandlerMapping     : Mapped "{[/loggers/{name:.*}],methods=[POST],consumes=[application/vnd.spring-boot.actuator.v1+json || application/json],produces=[application/vnd.spring-boot.actuator.v1+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.LoggersMvcEndpoint.set(java.lang.String,java.util.Map<java.lang.String, java.lang.String>)
2017-09-01 17:55:06.670  INFO 41499 --- [           main] o.s.b.a.e.mvc.EndpointHandlerMapping     : Mapped "{[/loggers || /loggers.json],methods=[GET],produces=[application/vnd.spring-boot.actuator.v1+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2017-09-01 17:55:06.670  INFO 41499 --- [           main] o.s.b.a.e.mvc.EndpointHandlerMapping     : Mapped "{[/trace || /trace.json],methods=[GET],produces=[application/vnd.spring-boot.actuator.v1+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2017-09-01 17:55:06.670  INFO 41499 --- [           main] o.s.b.a.e.mvc.EndpointHandlerMapping     : Mapped "{[/info || /info.json],methods=[GET],produces=[application/vnd.spring-boot.actuator.v1+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2017-09-01 17:55:06.671  INFO 41499 --- [           main] o.s.b.a.e.mvc.EndpointHandlerMapping     : Mapped "{[/env/{name:.*}],methods=[GET],produces=[application/vnd.spring-boot.actuator.v1+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EnvironmentMvcEndpoint.value(java.lang.String)
2017-09-01 17:55:06.671  INFO 41499 --- [           main] o.s.b.a.e.mvc.EndpointHandlerMapping     : Mapped "{[/env || /env.json],methods=[GET],produces=[application/vnd.spring-boot.actuator.v1+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2017-09-01 17:55:06.672  INFO 41499 --- [           main] o.s.b.a.e.mvc.EndpointHandlerMapping     : Mapped "{[/heapdump || /heapdump.json],methods=[GET],produces=[application/octet-stream]}" onto public void org.springframework.boot.actuate.endpoint.mvc.HeapdumpMvcEndpoint.invoke(boolean,javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse) throws java.io.IOException,javax.servlet.ServletException
2017-09-01 17:55:06.672  INFO 41499 --- [           main] o.s.b.a.e.mvc.EndpointHandlerMapping     : Mapped "{[/dump || /dump.json],methods=[GET],produces=[application/vnd.spring-boot.actuator.v1+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2017-09-01 17:55:06.673  INFO 41499 --- [           main] o.s.b.a.e.mvc.EndpointHandlerMapping     : Mapped "{[/auditevents || /auditevents.json],methods=[GET],produces=[application/vnd.spring-boot.actuator.v1+json || application/json]}" onto public org.springframework.http.ResponseEntity<?> org.springframework.boot.actuate.endpoint.mvc.AuditEventsMvcEndpoint.findByPrincipalAndAfterAndType(java.lang.String,java.util.Date,java.lang.String)
2017-09-01 17:55:06.673  INFO 41499 --- [           main] o.s.b.a.e.mvc.EndpointHandlerMapping     : Mapped "{[/beans || /beans.json],methods=[GET],produces=[application/vnd.spring-boot.actuator.v1+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2017-09-01 17:55:06.674  INFO 41499 --- [           main] o.s.b.a.e.mvc.EndpointHandlerMapping     : Mapped "{[/metrics/{name:.*}],methods=[GET],produces=[application/vnd.spring-boot.actuator.v1+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.MetricsMvcEndpoint.value(java.lang.String)
2017-09-01 17:55:06.674  INFO 41499 --- [           main] o.s.b.a.e.mvc.EndpointHandlerMapping     : Mapped "{[/metrics || /metrics.json],methods=[GET],produces=[application/vnd.spring-boot.actuator.v1+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2017-09-01 17:55:06.674  INFO 41499 --- [           main] o.s.b.a.e.mvc.EndpointHandlerMapping     : Mapped "{[/health || /health.json],methods=[GET],produces=[application/vnd.spring-boot.actuator.v1+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.HealthMvcEndpoint.invoke(javax.servlet.http.HttpServletRequest,java.security.Principal)
2017-09-01 17:55:06.675  INFO 41499 --- [           main] o.s.b.a.e.mvc.EndpointHandlerMapping     : Mapped "{[/autoconfig || /autoconfig.json],methods=[GET],produces=[application/vnd.spring-boot.actuator.v1+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2017-09-01 17:55:06.738  INFO 41499 --- [           main] f.a.AutowiredAnnotationBeanPostProcessor : JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
2017-09-01 17:55:06.817  INFO 41499 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Registering beans for JMX exposure on startup
2017-09-01 17:55:06.824  INFO 41499 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Bean with name 'integrationMbeanExporter' has been autodetected for JMX exposure
2017-09-01 17:55:06.826  INFO 41499 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Located managed bean 'integrationMbeanExporter': registering with JMX server as MBean [org.springframework.integration.monitor:name=integrationMbeanExporter,type=IntegrationMBeanExporter]
2017-09-01 17:55:06.857  INFO 41499 --- [           main] o.s.i.monitor.IntegrationMBeanExporter   : Registering beans for JMX exposure on startup
2017-09-01 17:55:06.857  INFO 41499 --- [           main] o.s.i.monitor.IntegrationMBeanExporter   : Registering MessageChannel errorChannel
2017-09-01 17:55:06.860  INFO 41499 --- [           main] o.s.i.monitor.IntegrationMBeanExporter   : Located managed bean 'org.springframework.integration:type=MessageChannel,name=errorChannel': registering with JMX server as MBean [org.springframework.integration:type=MessageChannel,name=errorChannel]
2017-09-01 17:55:06.893  INFO 41499 --- [           main] o.s.i.monitor.IntegrationMBeanExporter   : Registering MessageChannel nullChannel
2017-09-01 17:55:06.894  INFO 41499 --- [           main] o.s.i.monitor.IntegrationMBeanExporter   : Located managed bean 'org.springframework.integration:type=MessageChannel,name=nullChannel': registering with JMX server as MBean [org.springframework.integration:type=MessageChannel,name=nullChannel]
2017-09-01 17:55:06.901  INFO 41499 --- [           main] o.s.i.monitor.IntegrationMBeanExporter   : Registering MessageHandler errorLogger
2017-09-01 17:55:06.902  INFO 41499 --- [           main] o.s.i.monitor.IntegrationMBeanExporter   : Located managed bean 'org.springframework.integration:type=MessageHandler,name=errorLogger,bean=internal': registering with JMX server as MBean [org.springframework.integration:type=MessageHandler,name=errorLogger,bean=internal]
2017-09-01 17:55:06.917  INFO 41499 --- [           main] o.s.c.support.DefaultLifecycleProcessor  : Starting beans in phase 0
2017-09-01 17:55:06.938  INFO 41499 --- [           main] o.s.i.endpoint.EventDrivenConsumer       : Adding {logging-channel-adapter:_org.springframework.integration.errorLogger} as a subscriber to the 'errorChannel' channel
2017-09-01 17:55:06.938  INFO 41499 --- [           main] o.s.i.channel.PublishSubscribeChannel    : Channel 'stubrunner:8083.errorChannel' has 1 subscriber(s).
2017-09-01 17:55:06.938  INFO 41499 --- [           main] o.s.i.endpoint.EventDrivenConsumer       : started _org.springframework.integration.errorLogger
2017-09-01 17:55:06.951  INFO 41499 --- [           main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat started on port(s): 8083 (http)
2017-09-01 17:55:06.953  INFO 41499 --- [           main] com.example.StubRunnerBoot               : Started StubRunnerBoot in 5.467 seconds (JVM running for 5.88)

Please fix your local setup to be able to compile the application. Maybe you have some old version of Java - I have no idea. I have proven to you that everything is working as expected.

pastel001 commented 7 years ago

@marcingrzejszczak Thank you very much I try to check my local environment

pastel001 commented 7 years ago

@marcingrzejszczak I find the problem when i use stub runner 1,1.3,it told me it find stub in local (C:\Users\Administrator.m2\repository)

nested exception is java.lang.IllegalArgumentException: For groupId [com.example] artifactId [dwl-contracts] and classifier [stubs] the version was not resolved! The following exceptions took place [org.eclipse.aether.transfer.MetadataNotFoundException: Could not find metadata com.example:dwl-contracts/maven-metadata.xml in local (C:\Users\Administrator\.m2\repository)]

infact i have config my maven hone (D:\apache-maven-3.3.9) and local repository(D:\Repositories\Maven) image image

i dont know why it also try to find stubs in "C:\Users\Administrator.m2\repository" Thank you for your patience and help Thanks again Get sleepy and go to sleep,2017-9-2 00:33:14 now