Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Marcin Grzejszczak
    @marcingrzejszczak
    just add this
     <profiles>
            <profile>
                <id>spring</id>
                <activation>
                    <activeByDefault>true</activeByDefault>
                </activation>
                <repositories>
                    <repository>
                        <id>spring-snapshots</id>
                        <name>Spring Snapshots</name>
                        <url>http://repo.spring.io/libs-snapshot-local</url>
                        <snapshots>
                            <enabled>true</enabled>
                        </snapshots>
                    </repository>
                    <repository>
                        <id>spring-milestones</id>
                        <name>Spring Milestones</name>
                        <url>http://repo.spring.io/libs-milestone-local</url>
                        <snapshots>
                            <enabled>false</enabled>
                        </snapshots>
                    </repository>
                    <repository>
                        <id>spring-releases</id>
                        <name>Spring Releases</name>
                        <url>http://repo.spring.io/release</url>
                        <snapshots>
                            <enabled>false</enabled>
                        </snapshots>
                    </repository>
                </repositories>
                <pluginRepositories>
                    <pluginRepository>
                        <id>spring-snapshots</id>
                        <name>Spring Snapshots</name>
                        <url>http://repo.spring.io/libs-snapshot-local</url>
                        <snapshots>
                            <enabled>true</enabled>
                        </snapshots>
                    </pluginRepository>
                    <pluginRepository>
                        <id>spring-milestones</id>
                        <name>Spring Milestones</name>
                        <url>http://repo.spring.io/libs-milestone-local</url>
                        <snapshots>
                            <enabled>false</enabled>
                        </snapshots>
                    </pluginRepository>
                    <pluginRepository>
                        <id>spring-plugin-snapshots</id>
                        <name>Spring Snapshots</name>
                        <url>http://repo.spring.io/plugins-snapshot-local</url>
                        <snapshots>
                            <enabled>true</enabled>
                        </snapshots>
                    </pluginRepository>
                    <pluginRepository>
                        <id>spring-plugin-milestones</id>
                        <name>Spring Milestones</name>
                        <url>http://repo.spring.io/plugins-milestone-local</url>
                        <snapshots>
                            <enabled>false</enabled>
                        </snapshots>
                    </pluginRepository>
                </pluginRepositories>
            </profile>
        </profiles>
    snapshots will be enough actually
    or not (I might be using some milestones in verifier itself (which is not good))
    Matt Reynolds
    @mattreyuk
    I added those repos, deleted the contract dir in my .m2 local maven, did mvn clean install on both the producer and consumer and still get the same error. I think it must be something in my setup somehow but I'm not sure what.
    Here's the relevant section of my consumer pom:
            <dependency>
                <groupId>org.springframework.cloud.contract</groupId>
                <artifactId>spring-cloud-contract-stub-runner</artifactId>
                <scope>test</scope>
                <version>1.0.0.BUILD-SNAPSHOT</version>
            </dependency>
            <dependency>
                <groupId>org.springframework.cloud.contract</groupId>
                <artifactId>spring-cloud-contract-stub-runner-stream</artifactId>
                <scope>test</scope>
                <version>1.0.0.BUILD-SNAPSHOT</version>
            </dependency>
        </dependencies>
    
        <build>
            <finalName>${project.artifactId}</finalName>
            <plugins>
                <plugin>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-maven-plugin</artifactId>
                </plugin>
                <plugin>
                    <groupId>org.springframework.cloud.contract</groupId>
                    <artifactId>spring-cloud-contract-verifier-maven-plugin</artifactId>
                    <version>1.0.0.BUILD-SNAPSHOT</version>
                    <executions>
                        <execution>
                            <goals>
                                <goal>run</goal>
                            </goals>
                            <!-- <configuration> -->
                            <!-- <stubs>com.staples.ecom:order-svc:+</stubs> -->
                            <!-- </configuration> -->
                        </execution>
                    </executions>
                    <dependencies>
                        <dependency>
                            <groupId>org.springframework.cloud.contract</groupId>
                            <artifactId>spring-cloud-contract-verifier-core</artifactId>
                            <version>1.0.0.BUILD-SNAPSHOT</version>
                        </dependency>
                        <dependency>
                            <groupId>com.toomuchcoding.jsonassert</groupId>
                            <artifactId>jsonassert</artifactId>
                            <version>0.4.7</version>
                        </dependency>
                    </dependencies>
                </plugin>
            </plugins>
        </build>
    
        <repositories>
            <repository>
                <id>spring-snapshots</id>
                <name>Spring Snapshots</name>
                <url>http://repo.spring.io/libs-snapshot-local</url>
                <snapshots>
                    <enabled>true</enabled>
                </snapshots>
            </repository>
            <repository>
                <id>spring-milestones</id>
                <name>Spring Milestones</name>
                <url>http://repo.spring.io/libs-milestone-local</url>
                <snapshots>
                    <enabled>false</enabled>
                </snapshots>
            </repository>
            <repository>
                <id>spring-releases</id>
                <url>https://repo.spring.io/libs-release</url>
            </repository>
        </repositories>
        <pluginRepositories>
            <pluginRepository>
                <id>spring-snapshots</id>
                <name>Spring Snapshots</name>
                <url>http://repo.spring.io/libs-snapshot-local</url>
                <snapshots>
                    <enabled>true</enabled>
                </snapshots>
            </pluginRepository>
            <pluginRepository>
                <id>spring-milestones</id>
                <name>Spring Milestones</name>
                <url>http://repo.spring.io/libs-milestone-local</url>
                <snapshots>
                    <enabled>false</enabled>
                </snapshots>
            </pluginRepository>
            <pluginRepository>
                <id>spring-plugin-snapshots</id>
                <name>Spring Snapshots</name>
                <url>http://repo.spring.io/plugins-snapshot-local</url>
                <snapshots>
                    <enabled>true</enabled>
                </snapshots>
            </pluginRepository>
            <pluginRepository>
                <id>spring-plugin-milestones</id>
                <name>Spring Milestones</name>
                <url>http://repo.spring.io/plugins-milestone-local</url>
                <snapshots>
                    <enabled>false</enabled>
                </snapshots>
            </pluginRepository>
            <pluginRepository>
                <id>spring-releases</id>
                <url>https://repo.spring.io/libs-release</url>
            </pluginRepository>
        </pluginRepositories>
    </project>
    Marcin Grzejszczak
    @marcingrzejszczak
    so you deleted the verifier dir from .m2 ?
    I'll check one more thing
    Matt Reynolds
    @mattreyuk
    I deleted org/springframework/cloud/contract so that should take everything related to the project right?
    Marcin Grzejszczak
    @marcingrzejszczak
    yeah
    I think I might know what's going on
    I'll confirm it in a sec
    ha! I think it was a bug
    I'm rebuilding the project and will push snapshots
    Matt Reynolds
    @mattreyuk
    so the unit test works but something else wasn't calling that function or something?
    Marcin Grzejszczak
    @marcingrzejszczak
    it's a different place
    I was checking if the transformer is working fine
    so the guy on the stream side
    but actually I was sending a wrong message
    the message that transformer got was already converted improperly
    Matt Reynolds
    @mattreyuk
    got it
    Marcin Grzejszczak
    @marcingrzejszczak
    I'll have to add more tests with those client server sides
    the snapshots will be there in a couple of minutes
    Matt Reynolds
    @mattreyuk
    great! I have to head into a meeting but I'll pull and try as soon as I get out of that.
    Marcin Grzejszczak
    @marcingrzejszczak
    snapshots uploaded
    Matt Reynolds
    @mattreyuk
    yep - that fixed it thanks :)
    Marcin Grzejszczak
    @marcingrzejszczak
    great!!
    Marcin Grzejszczak
    @marcingrzejszczak
    @here - big change! the Contract class is under a new package
    org.springframework.cloud.contract.spec.Contract
    you have to do a find and replace
    org.springframework.cloud.contract.verifier.dsl.Contract -> org.springframework.cloud.contract.spec.Contract
    Marcin Grzejszczak
    @marcingrzejszczak
    I'm on the verge of fixing Gradle Plugin to an extent where you don't have to pass anything
    other than
    apply plugin: 'contract-verifier'
    apply plugin: 'maven-publish'
    Marcin Grzejszczak
    @marcingrzejszczak
    and @mariuszs has updated the docs of maven-plugin
    Marcin Grzejszczak
    @marcingrzejszczak
    the problem is related to checking sizes of parts of json
    this is an incubating feature (I'm updating the docs)
    I think that it will be better to turn it off by default
    and turn it on only on demand
    Jakub Nabrdalik
    @jakubnabrdalik
    +1
    Marcin Grzejszczak
    @marcingrzejszczak
    I'm also adding a possibility to pass it from Gradle prop
    I mean contractVerifier
    that way it will also work from Maven
    without the -D
    Jakub Nabrdalik
    @jakubnabrdalik
    +1
    Marcin Grzejszczak
    @marcingrzejszczak
    @a
    /all Since the rebranding process of Accurest is almost at its end we're more than happy to invite you to the new Gitter channel https://gitter.im/spring-cloud/spring-cloud-contract !
    @all Since the rebranding process of Accurest is almost at its end we're more than happy to invite you to the new Gitter channel https://gitter.im/spring-cloud/spring-cloud-contract !
    I don't know how to send a message to everybody :P
    Luis Muniz
    @LuisMuniz
    Hi, do we have to use maven to run your contract verifier, or is there a gradle plugin too?