Slackbot
10/23/2023, 11:16 PMTom
10/24/2023, 12:11 AMEric Deandrea
10/24/2023, 11:42 AM╰─ ./mvnw --version
Apache Maven 3.9.3 (21122926829f1ead511c958d89bd2f672198ae9f)
Maven home: /Users/edeandre/.m2/wrapper/dists/apache-maven-3.9.3-bin/326f10f4/apache-maven-3.9.3
Java version: 17.0.8, vendor: Eclipse Adoptium, runtime: /Users/edeandre/.sdkman/candidates/java/17.0.8-tem
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "14.0", arch: "aarch64", family: "mac"Eric Deandrea
10/24/2023, 11:44 AMEric Deandrea
10/24/2023, 11:45 AMwiremock-grpc-extension pom (https://central.sonatype.com/artifact/org.wiremock/wiremock-grpc-extension) it clearly defines a jar dependency on grpc-bomEric Deandrea
10/24/2023, 11:46 AMEric Deandrea
10/24/2023, 11:46 AM<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<!-- This module was also published with a richer model, Gradle metadata, -->
<!-- which should be used instead. Do not delete the following line which -->
<!-- is to indicate to Gradle or any Gradle module metadata file consumer -->
<!-- that they should prefer consuming it instead. -->
<!-- do_not_remove: published-with-gradle-metadata -->
<modelVersion>4.0.0</modelVersion>
<groupId>org.wiremock</groupId>
<artifactId>wiremock-grpc-extension</artifactId>
<version>0.2.0</version>
<dependencies>
<dependency>
<groupId>org.wiremock</groupId>
<artifactId>wiremock</artifactId>
<version>3.2.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-bom</artifactId>
<version>1.58.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-protobuf</artifactId>
<version>1.58.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-stub</artifactId>
<version>1.58.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-servlet-jakarta</artifactId>
<version>1.58.0</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java-util</artifactId>
<version>3.24.0</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
<version>1.3.2</version>
<scope>runtime</scope>
</dependency>
</dependencies>
<description>Mock gRPC services with WireMock</description>
<name>WireMock Extension for gRPC</name>
<url>https://wiremock.org</url>
<scm>
<connection>https://github.com/wiremock/wiremock-grpc-extension.git</connection>
<developerConnection>https://github.com/wiremock/wiremock-grpc-extension.git</developerConnection>
<url>https://github.com/wiremock/wiremock-grpc-extension</url>
</scm>
<licenses>
<license>
<name>The Apache Software License, Version 2.0</name>
<url>http://www.apache.org/license/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
</license>
</licenses>
<developers>
<developer>
<id>tomakehurst</id>
<name>Tom Akehurst</name>
</developer>
</developers>
</project>Eric Deandrea
10/24/2023, 11:47 AM<dependencyManagement>
<dependencies>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-bom</artifactId>
<version>1.58.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>Eric Deandrea
10/25/2023, 6:08 PM<dependency>
<groupId>org.wiremock</groupId>
<artifactId>wiremock-grpc-extension</artifactId>
<version>${wiremock-grpc.version}</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>io.grpc</groupId>
<artifactId>grpc-bom</artifactId>
</exclusion>
</exclusions>
</dependency>Eric Deandrea
10/25/2023, 6:08 PMTom
10/25/2023, 9:44 PMEric Deandrea
10/26/2023, 1:36 PMbuild.gradle file, the grpc-bom dependency is declared as api "io.grpc:grpc-bom:$versions.grpc"
You could change the dependencies block to be this:
api "org.wiremock:wiremock:$versions.wiremock"
api platform("io.grpc:grpc-bom:$versions.grpc")
api "io.grpc:grpc-protobuf"
api "io.grpc:grpc-stub"
implementation "io.grpc:grpc-servlet-jakarta"
implementation "com.google.protobuf:protobuf-java-util:$versions.protobuf"
implementation 'javax.annotation:javax.annotation-api:1.3.2'
// testImplementation project(":")
testImplementation(platform('org.junit:junit-bom:5.10.0'))
testImplementation "org.junit.jupiter:junit-jupiter"
testImplementation "org.hamcrest:hamcrest-core:2.2"
testImplementation "org.hamcrest:hamcrest-library:2.2"
testImplementation 'org.awaitility:awaitility:4.2.0'
testImplementation "io.grpc:grpc-okhttp"
And this would produce
?xml version="1.0" encoding="UTF-8"?
<project xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<!-- This module was also published with a richer model, Gradle metadata, -->
<!-- which should be used instead. Do not delete the following line which -->
<!-- is to indicate to Gradle or any Gradle module metadata file consumer -->
<!-- that they should prefer consuming it instead. -->
<!-- do_not_remove: published-with-gradle-metadata -->
modelVersion4.0.0/modelVersion
groupIdorg.wiremock/groupId
artifactIdwiremock-grpc-extension/artifactId
version0.1.0/version
dependencyManagement
dependencies
dependency
groupIdio.grpc/groupId
artifactIdgrpc-bom/artifactId
version1.58.0/version
typepom/type
scopeimport/scope
/dependency
/dependencies
/dependencyManagement
dependencies
dependency
groupIdorg.wiremock/groupId
artifactIdwiremock/artifactId
version3.2.0/version
scopecompile/scope
/dependency
dependency
groupIdio.grpc/groupId
artifactIdgrpc-protobuf/artifactId
scopecompile/scope
/dependency
dependency
groupIdio.grpc/groupId
artifactIdgrpc-stub/artifactId
scopecompile/scope
/dependency
dependency
groupIdio.grpc/groupId
artifactIdgrpc-servlet-jakarta/artifactId
scoperuntime/scope
/dependency
dependency
groupIdcom.google.protobuf/groupId
artifactIdprotobuf-java-util/artifactId
version3.24.0/version
scoperuntime/scope
/dependency
dependency
groupIdjavax.annotation/groupId
artifactIdjavax.annotation-api/artifactId
version1.3.2/version
scoperuntime/scope
/dependency
/dependencies
descriptionMock gRPC services with WireMock/description
nameWireMock Extension for gRPC/name
urlhttps://wiremock.org/url
scm
connectionhttps://github.com/wiremock/wiremock-grpc-extension.git/connection
developerConnectionhttps://github.com/wiremock/wiremock-grpc-extension.git/developerConnection
urlhttps://github.com/wiremock/wiremock-grpc-extension/url
/scm
licenses
license
nameThe Apache Software License, Version 2.0/name
urlhttp://www.apache.org/license/LICENSE-2.0.txt/url
distributionrepo/distribution
/license
/licenses
developers
developer
idtomakehurst/id
nameTom Akehurst/name
/developer
/developers
/projectEric Deandrea
10/26/2023, 1:38 PMEric Deandrea
10/26/2023, 1:39 PM./gradlew clean check to make sure tests all still passEric Deandrea
10/30/2023, 5:18 PM