Skip to content

Instantly share code, notes, and snippets.

@riprasad
Created September 15, 2021 09:45
Show Gist options
  • Save riprasad/cf31ab90383c8384afc4014457b2e8c3 to your computer and use it in GitHub Desktop.
Save riprasad/cf31ab90383c8384afc4014457b2e8c3 to your computer and use it in GitHub Desktop.
import org.apache.maven.model.Exclusion
import org.commonjava.maven.ext.core.groovy.BaseScript
import org.commonjava.maven.ext.core.groovy.InvocationStage
import org.commonjava.maven.ext.core.groovy.PMEBaseScript
import org.commonjava.maven.ext.core.groovy.InvocationPoint
@InvocationPoint(invocationPoint = InvocationStage.FIRST)
@PMEBaseScript BaseScript pme
String fge = 'com.github.fge'
String coreutils = 'jackson-coreutils'
String msgSimple = 'msg-simple'
String btf = 'btf'
static Exclusion exclusion(String groupId, String artifactId) {
new Exclusion(artifactId: artifactId, groupId: groupId)
}
def apicurioRegistryProject = pme.projects.find {
it.groupId == "io.apicurio" && it.artifactId == "apicurio-registry"
}
def apicurioRegistryDependencies = apicurioRegistryProject.model.dependencyManagement.dependencies
apicurioRegistryDependencies.find {
it.groupId == "io.confluent" && it.artifactId == "kafka-protobuf-serializer"
}.addExclusion(exclusion("com.github.everit-org.json-schema", "org.everit.json.schema"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment