@Mojo(name="resolve-kafka-range",
defaultPhase=VALIDATE,
threadSafe=true,
requiresProject=false)
public class ResolveKafkaVersionRangeMojo
extends org.apache.maven.plugin.AbstractMojo
For the version range format, see GenericVersionScheme
Command-line example:
mvn io.confluent:resolver-maven-plugin:resolve-kafka-range \
-Dresolve.groupId=org.apache.kafka -Dresolve.artifactId=kafka-client "-Dresolve.versionRange=[6.0.0-1, 6.0.1-1]" \
-Dresolve.CEprint -q
-Dresolve.CCSprint -1
| Modifier and Type | Field and Description |
|---|---|
protected java.util.List<org.eclipse.aether.repository.RemoteRepository> |
remoteRepositories |
| Constructor and Description |
|---|
ResolveKafkaVersionRangeMojo() |
| Modifier and Type | Method and Description |
|---|---|
void |
createInstalledPom(java.lang.String ceVersion,
java.lang.String ccsVersion)
Loads the current pom file, sets the values for the kafka properties to the newest versions,
and then writes out that pom file.
|
void |
execute() |
java.lang.String |
fetchHighestKafkaVersion(java.lang.String kafkaType,
org.eclipse.aether.resolution.VersionRangeResult result,
java.lang.String constraintText,
boolean failIfNotFound) |
protected org.codehaus.mojo.versions.rewriting.ModifiedPomXMLEventReader |
newModifiedPomXER(java.lang.StringBuilder input)
Creates a
ModifiedPomXMLEventReader from a
StringBuilder. |
protected void |
writeFile(java.io.File outFile,
java.lang.StringBuilder input)
Writes a StringBuilder into a file.
|
@Parameter(defaultValue="${project.remoteProjectRepositories}",
readonly=true)
protected java.util.List<org.eclipse.aether.repository.RemoteRepository> remoteRepositories
public void execute()
throws org.apache.maven.plugin.MojoExecutionException,
org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureExceptionpublic java.lang.String fetchHighestKafkaVersion(java.lang.String kafkaType,
org.eclipse.aether.resolution.VersionRangeResult result,
java.lang.String constraintText,
boolean failIfNotFound)
throws org.apache.maven.plugin.MojoExecutionException,
org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureExceptionpublic void createInstalledPom(java.lang.String ceVersion,
java.lang.String ccsVersion)
throws org.apache.maven.plugin.MojoExecutionException
ceVersion - The version of CE KafkaccsVersion - The version of CCS Kafkaorg.apache.maven.plugin.MojoExecutionException - If there is a failure creating the pom file or setting the
propertiesprotected final org.codehaus.mojo.versions.rewriting.ModifiedPomXMLEventReader newModifiedPomXER(java.lang.StringBuilder input)
ModifiedPomXMLEventReader from a
StringBuilder.input - The XML to read and modify.ModifiedPomXMLEventReader.protected final void writeFile(java.io.File outFile,
java.lang.StringBuilder input)
throws java.io.IOException
outFile - The file to read.input - The contents of the file.java.io.IOException - when things go wrong.Copyright © 2021. All rights reserved.